Application Development and Automation 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: 
Read only

background job

Former Member
0 Likes
1,346

Hi,

I need to schedule job when i execute my program,I don't want to goto SM 36 to schedule it as batch job

Madhu

Hi,

I need to schedule job when i execute my program,I don't want to goto SM 36 to schedule it as batch job

Madhu

6 REPLIES 6
Read only

Former Member
0 Likes
1,130

try this command

SUBMIT repoprt USER user VIA JOB job NUMBER n

Read only

Former Member
0 Likes
1,130

Hi,

There are FMs that you can use.

BP_JOB_CRETE , search SE37 BPJOB

Reward if useful!

Read only

Former Member
0 Likes
1,130

Hi

Use Job_open ....Job_Close function module to run a program in background.

Reward me if its helpful.

Ravi

Read only

Former Member
0 Likes
1,130

Execute ur report..

Go to <b>Program -> Execute in Background</b> or press F9.

It will create a background job without going to SM36.

Regards

Prax

Read only

Former Member
0 Likes
1,130

Hi,

There are 3 ways to schedule a background job without going to SM36.

1. Using FM's : JOB_OPEN, JOB_INSERT and JOB_CLOSE

2. Using SUMBIT <i>report_name</i> VIA JOB <i>job</i> NUMBER <i>job_number</i>

3. If the program has a selection-screen, then go to the Selection-Screen. In Menu, select Program->Execute In Background.

Reward points if the answer is helpful.

Regards,

Mukul

Read only

marina_plag
Explorer
0 Likes
1,130

Hi,

here is a code sample:

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = jobname

IMPORTING

jobcount = jobcount.

SUBMIT rfkk_mass_act_single_job

USER sy-uname

VIA JOB jobname NUMBER jobcount

WITH p_jobno = t_jobtab-jobno " parameters of report

WITH p_jobnam = t_jobtab-jobname

WITH p_jobcnt = t_jobtab-jobcount

WITH p_progn = c_progn

WITH p_laufi = p_basics-runkey-laufi

WITH p_laufd = p_basics-runkey-laufd

WITH p_interv = 'X'

WITH p_xdebg = ' '

AND RETURN.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = jobcount

jobname = jobname

strtimmed = 'X'

IMPORTING

job_was_released = l_job_released.

Regards, Marina