2008 Nov 20 11:18 AM
Hi All
I have a program with selection screen. The selection screen has Job name as one of the parameters. When I press F8 (Execute), this program should get scheduled in the background with the job name taken from selection screen. How to submit a program by itself in background.
Please suggest.
Thanks
Shakir
2008 Nov 20 11:21 AM
SUBMIT z_prog_name
AND RETURN
VIA JOB wf_jobname NUMBER wf_jobcount
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
KEEP IN SPOOL 'X'.
this will execute the report z_prog_name in backgroung..and report will go to spool.
2008 Nov 20 11:21 AM
SUBMIT z_prog_name
AND RETURN
VIA JOB wf_jobname NUMBER wf_jobcount
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
KEEP IN SPOOL 'X'.
this will execute the report z_prog_name in backgroung..and report will go to spool.
2008 Nov 20 11:22 AM
Hi,
Press F9 from the program itself after entering the selection parameters
Or
Create a selection variant and go to SM36 and give some valid name , program name with variant and save and schedule.
Regards,
Nandha
2008 Nov 20 11:24 AM
Hello,
Try this code.
submit ZPROGRAM USING SELECTION-SET VARIANT
with batch = 'X' AND RETURN.
Hope it helps!
Thanks,
Jayant
2008 Nov 20 11:30 AM
Hi
U should create a checkbox in the selection-screen in order to decide which action to be done:
- Run the report
- Schedule the job
Anyway it should be better u schedule the job by another report, because you avoid a recursive process.
Maxt