2009 Nov 24 7:11 PM
Hi All
I have two jobs A and B. Job A runs every sunday at 10 AM. And Job B should run after Job A every sunday. But I could not find any option in SM36 to run job B all the time when ever Job A runs. I tried Job dependant option, but Job B ran just once.
Can any one let me know hot to schedule Job B so that it will run after Job A All the Time.
Thanks in advance
2009 Nov 24 7:19 PM
You can create one job with 2 steps in it where step 1 would be your job A and step 2 would be your job B. You can achieve this using SM36 -> Step.
Alternatively you can also try scheduling job B every sunday after Job A.
rgds,
PB
Edited by: PBHATT on Nov 24, 2009 1:23 PM
2009 Nov 24 7:19 PM
You can create one job with 2 steps in it where step 1 would be your job A and step 2 would be your job B. You can achieve this using SM36 -> Step.
Alternatively you can also try scheduling job B every sunday after Job A.
rgds,
PB
Edited by: PBHATT on Nov 24, 2009 1:23 PM
2009 Nov 24 7:21 PM
I think u should try After JOb and set A as periodic Job
Regard's
Anmol
2009 Nov 24 7:23 PM
Hi ,
try this way..
all the Jobs are stored in TBTCP and TBTCO table..
try this way..
select * from TBTCP where progname = 'Report name'.
select single * from TBTCO where jobname = tbtcp-jobname
and Jobcount = tbtcp-jobcount.
if sy-subrc = 0.
if TBTCO-status = 'F'.
that means job A is finished.
start second Job.....Else wait for some time and try to fetch again from table and check the status...
endif.
ENdif.
endselect.
regards,
Prabhudas
2009 Nov 24 8:39 PM
Option "after job" is not available for periodic scheduling. Either try the 2 step approach described above or have job A trigger an event inside the program code and let job B wait for that event (periodic).
Thomas
2009 Dec 01 2:45 PM
Thank you very much for all your responses......I used step approach and that served my purpose....Thanks once again