Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Submit job in background

abdulazeez12
Active Contributor
0 Kudos
155

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

1 ACCEPTED SOLUTION

former_member195383
Active Contributor
0 Kudos
49

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.

4 REPLIES 4

former_member195383
Active Contributor
0 Kudos
50

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.

Former Member
0 Kudos
49

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

Former Member
0 Kudos
49

Hello,

Try this code.

submit ZPROGRAM USING SELECTION-SET VARIANT

with batch = 'X' AND RETURN.

Hope it helps!

Thanks,

Jayant

Former Member
0 Kudos
49

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