‎2009 Aug 24 3:03 PM
Hi experts, I have a requirement wherein when a file is written into application server by third party application, based on the name of the file an ABAP program should get executed that reads the file and uploads data into SAP. Can you please let me know of the different possibilities for achieving this?
‎2009 Aug 24 3:09 PM
Hi,
Something has to trigger SAP to start the program. Possible solutions are a job who checks every hour (or other time frequence) if the file is there and starts the program. Or let the third party call a RFC to start the program after placing the file on the server.
‎2009 Aug 24 3:09 PM
Run periodically a job (i.e once an hour) which will scan Application Server directories (actually there can be only directory which the file will be written to) and looks for any new file (creation date and name will matter here). If new file found, then run your program that reads that file and imports it to SAP (check SUBMIT statement for running program). If no file found, the run program will finish without any action.
Regards
Marcin
‎2009 Aug 24 3:10 PM
Hi,
Schedule a Batch job Program in sm36 which runs for regular periods of time that checks whether file is available in app.server or not.
If it is available the program will be executed otherwise exit.
Alternatively create one more program(as per ur requirement) which does the process once the file is available
Use SUBMIT Statement in Batch program.Put a condition check before submit for chking file availability
Regards,
Lakshman.
Edited by: Lakshman N on Aug 24, 2009 4:10 PM
‎2009 Aug 24 3:11 PM
Hello,
A possible solution can be something like this:
Soln#1. Schedule a Z-Report (which runs every 15mins, scheduling can be done based on the frequency in which the 3rd Party writes the file) to read the files from the application server folder.
If the corres. file names are found process the files & upload the data to SAP Table.
Soln#2. When the file is written to the application server, then an SAP event is raised (event needs to be defined in SM62) which in turn will call the processing program.
Please refer to this [blog|http://www.sapfans.com/sapfans/sapfaq/robert.htm] for further details.
BR,
Suhas
‎2009 Aug 24 3:16 PM