on 03-08-2006 7:50 PM
I have a batch job for std. SAP program that needs to pick up a file. My only problem is file name has a counter and will increment every day.
How can I automatically schedule this job?
The reason why I asked for the program name is becuase some programs allow logical filenames to be entered. But not this one.
You options are:
1) Have an external program to rename the file to a constant name while keeping a backup of the original file. That constant name will be used by the variant.
2) Have a wrapper ABAP program that checks for the counter based file and then submits the standard program using that file name.
3) Change the variant as sugegsted before, but be cautious about the timing of the change.
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the standard program?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think that rather than trying to change a variant dynamically, I'd put some logic in the program to look for the file with the highest counter and process that one.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This would probably work most of the time. But it's possible that the counter will be incremented without the job being run. That's why I think it's better to look for the correct file to process just before the program is run. In any event you would have to use FM RS_CHANGE_CREATED_VARIANT (or something like it) to change the variant.
I take it back about using RS_CHANGE_CREATED_VARIANT. You would just:
SUBMIT (report) with
p_file = file_name.
or some other variation of submit.
Rob
Message was edited by: Rob Burbank
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.