02-09-2012 12:05 PM
Hi
My client's requirement is a selection screen so that user will select certain criteria.
Thereafter the program will select data from a table and dump it in a text file.
I got all this working ,but now the requirement is that after the selection was made by the user,the rest of the data extract and creating of text file must happen as a batch job .
How would I add this requirement ?
Many thanks
Gerhard
02-09-2012 12:12 PM
You can use the below code for submitting ur original program from the main program
* Open Job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = w_jobcount.
SUBMIT <program> WITH <parameter1> = <ur parameter>
WITH<parameter1> = <ur parameter>
..
VIA JOB jobname NUMBER w_jobcount
USER <User Name>
AND RETURN.
* Schedule and close job.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobcount
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit.
02-09-2012 12:16 PM