‎2008 Mar 27 7:19 PM
Hi folks,
I am trying to upload a CSV file from the application server (SAP PRd server) in the background. How can I set this process in the background. Suppose if I have the file name as newfilemmddyyyy. and mmddyyyy being the sy-datum.
Any thoughts? Because I shall have new file dumped into the SAP server 2 to 3 times in a week, that needs to be uploaded into the system and I am looking to automate this process
Thanks in advance,
VG
‎2008 Mar 27 11:25 PM
Hi,
You can schedule your program in the background processing using the following tcodes.
SM36 - for creating sessions
SM37 : for executing or processing the sessions.
SM35: for session overview.
You can directly run the session or schedule using programs RSBDCSUB / RSBDCBTC from within the program.
AL11 is the tcode for the SAP directories where we can get the application server path.
The LOGIC is as follows:
If the name of the program i.e. newfilemmddyyyy where 'newfile' is constant then there is no problem.
eg: filename is 'myfile02282008'.
in the program take variables like
path1 path2 and filepath are string variables.
path1 = filename+0(6).
path2 = sydatum.
*date format must be adjusted.
concatenate path1 path2 into filepath .
Use 'OPEN DATASET ..................'
Now the dataset is ready.
We have to take into consideration the day of processing the program.
Reward points if helpful.
Thanks and Rewards.
Edited by: Ammavajjala Narayana on Mar 28, 2008 12:28 AM
‎2008 Mar 27 7:32 PM
hi go to sm 37 tcode then u can see the options for the job selection like immidiate and at a particular time ...
go to sm37> choose extended job selection-->
reward points if useful,
venkat.
‎2008 Mar 27 7:32 PM
You can concatenate the filename and the system date into a variable and do an OPEN DATASET lv_filename.
lv_dataset type string (or char100).
You can then schedule a job which will run every day for example. The program will then check if a file with the current name is available. If so, upload and process the file otherwise, STOP processing.
To schedule a job you can use transaction SM36 (SM37).
regards,
Micky.
‎2008 Mar 27 11:25 PM
Hi,
You can schedule your program in the background processing using the following tcodes.
SM36 - for creating sessions
SM37 : for executing or processing the sessions.
SM35: for session overview.
You can directly run the session or schedule using programs RSBDCSUB / RSBDCBTC from within the program.
AL11 is the tcode for the SAP directories where we can get the application server path.
The LOGIC is as follows:
If the name of the program i.e. newfilemmddyyyy where 'newfile' is constant then there is no problem.
eg: filename is 'myfile02282008'.
in the program take variables like
path1 path2 and filepath are string variables.
path1 = filename+0(6).
path2 = sydatum.
*date format must be adjusted.
concatenate path1 path2 into filepath .
Use 'OPEN DATASET ..................'
Now the dataset is ready.
We have to take into consideration the day of processing the program.
Reward points if helpful.
Thanks and Rewards.
Edited by: Ammavajjala Narayana on Mar 28, 2008 12:28 AM
‎2008 Mar 28 2:31 PM
thanks guys. I knew how to schedule the job. I needed some help to get the filepath info to run the process in the backgorund.
Got it. Shall reward the points accordingly.
VG