on 08-20-2007 8:02 PM
XI experts,
We have SAP XI 3.0 in our landscape and have a unique requirement in XI where the business wants to pull files from File system only those files that are 2 or more days old .
I can do this by pulling all files thru a file adapter and then calling a proxy in R/3 to check the File Timestamp .. This file time-stamp will be mapped in XI using a Java function for accessing adapter specific attributes .
BUT , can we have some selection criteria in the file adapter itself where it will pull only those files that are 2 or more days old .... Maybe something in the Adapter modules ??? Would appreciate your reply .
Ashutosh,
I think as suggested writing an small command level script would be easy way to check file date..
Otherwise you need to write File Adapter -module before to validate date-time.
Check out this blog if you are planning to write a module...
/people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
Hope this will help you.
Nilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nilesh ,
Thanks for your reply .. I think i can use feature of writing an OS level command to check the file date .... BUT i have one more question ..
Can the OS command that i write in the ' Run Operating System Command After Message Processing ' section of the sender File adapter , STOP file adapter processing according to the date identified in the command ....
Like , if the command finds that the file date is recent , then somehow it should let file adapter know that file should not be processed .. Is this possible ??? If yes. HOW ??? This way i will not un-necessary process a messsage in XI , only those messages with old file date-stamp will be processed ...
I would like to stop the processing at the adapter framework itself if the condition is not met .......Would appreciate your reply .
Nilesh ,
Thanks for the tip and the Blog link ... Well , i think Guru's trick might help...One last question ( i guess ) .. Where do we save this command file that we will use in the adapter before/after message processing ??? I am still confused in this area .... We have SAP R/3 4.7 as the application system and SAP XI 3.0 ,,, so where does this command file reside ??
Would appreciate your reply .
Ashutosh
Hi Ashutosh,
Check out this Michal Blog..
/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
Some usefull tips /trics are mention in question forum..I mean in comment..
Also check out this thread and blog as well..
/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
Hope this will help.
Nilesh
Nilesh ,
Writing after some weeks gap , BUT if you remember this discussion , i was trying to execute an OS command file from File adapter , i was going to try Guru' trick ... AND FYI -> I tried his trick of having a dummy file and then writing a Unix shell script command file to be called from File adapter which changes the name to the file name that adapter is suppose to poll....... BUT i found out that adpater executes the OS file only when it finds the file ,,, therefore the file that the adapter is polling should be present in the source directory and then it executes the OS command file .. ANYWAY , what i did is i am having a dummy.txt file which my adapter will always poll and then my OS command file will find old files on the directory that i want and change the filenames to (filename)_OLD.txt and i am calling a ABAP proxy which will then connect to the directory i want and access all files that have _OLD as suffix in the filenames.
Well , i think i can even do this without XI by triggering my ABAP program and doing the same stuff as mentioned above , BUT bottom-line , the OS command file works and point to mention is : OS command file is executed by adapter only when the file it polls is found by the adapter. ....
Thanks for everything and Convey my Thanks to Guru if you happen to be in touch with him ..
Regards,
Ashutosh
Hello,
You can use the option
"Run Operating System Command Before Message Processing".
Check if the file is old enough or not to be processed from the Filename.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) Try Using Processing Sequence (for transport protocol File System (NFS))
If you use placeholders when specifying the file name, define the processing
sequence of the files:
○ By Name: Files are processed alphabetically by file name.
○ By Date: Files are processed according to their time stamp in the file
system, starting with the oldest file.
2)Try developing a module for achieving the functionality, and deploy the same.
3)Use the Adapter-Specific Message Attribute
<b>Source File Timestamp</b> and ,Use the value of the same for discarding te file content of those files which are not 2 days old..
*Reward points if helpful*
Regards,
Sushil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.