07-09-2007 4:27 PM
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
07-09-2007 4:36 PM
07-09-2007 4:42 PM
Hi,
There are FMs that you can use.
BP_JOB_CRETE , search SE37 BPJOB
Reward if useful!
07-09-2007 5:52 PM
Hi
Use Job_open ....Job_Close function module to run a program in background.
Reward me if its helpful.
Ravi
07-09-2007 6:12 PM
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
07-09-2007 6:33 PM
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
07-09-2007 7:04 PM
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