Scheduling and Archiving
For an Interface , i am defining a Job that will be scheuled by an external Scheduler .
The interface will be posting data into SAP .
SAP will recieve two files from two different systems into a single directory . The filenames will be different and the format of the data will be ORDERS01 .
the Job will have three steps:
1) Run the unix script to fetch the files.
2) call RSEINB00 from a program , fetch the filenames from directory and submit the program .
3) Archive only the file that was succesfuly posted .
The problem that i m facing is :
As these are job steps : The Zprogram will fetch the files, call the RSEINB00 for each file .
Suppose if File 1 fails , it will still go and fetch the secon file and post . Suppose after the step 2 the situation is :
File 1 fails.
File 2 successful .
Then , if i want to archive only the file 2 , how to do that , how to tell the Unix Script that only file 2 will be archived ?? or shall I create two spereate jobs ( but this doesnt looks a good way . suppose if num of files increses in future ?)
If some one has any idea , Pls guide me thru .
Ferry Lianto replied
I don't think it is good idea to have separate jobs for each file. You may want to keep the process as generic as possible.
Perhaps you can create a signal file in UNIX if process file is successful (2nd step). Then 3rd step will read the file, perform the archive activity and at the end delete the signal file. If there no file then do not perform archive activity.
Again, hope this will help and give you an idea.
Please reward points if helpful.