01-21-2009 4:45 PM
Trying to define a background job 'FINREP' in SM36 to start after job 'FINRUN1'.
Job 'FINRUN1' is currently in 'Active' status in SM37.
In SM36, when scheduling 'FINREP', I enter 'FINRUN1' in SM36 in the 'after job' box there is a message "Job FINRUN1 does not exist or does not have status 'scheduled'/'released' ".
This is true because the job is 'Active' but how do we schedule job to run after this active job?
01-21-2009 5:03 PM
01-21-2009 5:06 PM
01-21-2009 5:12 PM
Hi,
While scheduling the Job you need to specify the sequence of Job steps (i.e i each step which job has to be scheduled) ..then after completion of each job other job get's triggered.
01-21-2009 5:18 PM
>
> Yes, but how do i schedule after an 'Active' job?
You can't. The dependencies must be setup first, only then the first job in the chain may start.
Thomas
01-21-2009 5:55 PM
Hi Gemini,
You can achieve your requirement by creating event in your last program and using this event as triggering point for subsequent program.
Please read SAP help link provided which talks about it.
http://help.sap.com/saphelp_40b/helpdata/EN/fa/096f33543b11d1898e0000e8322d00/content.htm
Best Regards,
Krishna
01-21-2009 5:58 PM
Hi Gemini,
Here comes SAP example how to use the function module
Use function module BP_EVENT_RAISE to trigger an event from an ABAP program.
Example
Report processing before triggering event...
Trigger event to start background jobs waiting for the event.
DATA: EVENTID LIKE TBTCJOB-EVENTID.
DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.
EVENTID = 'SP_TEST_EVENT'. " Event name must be defined
" with transaction SM62.
EVENTPARM = 'EVENT1'. " Optional: a job can be
" scheduled to wait for an
" EVENTID or combination of
" EVENTID and EVENTPARM.
CALL FUNCTION 'BP_EVENT_RAISE' " Event is triggered. Jobs
EXPORTING " waiting for event will be
EVENTID = EVENTID " started.
EVENTPARM = EVENTPARM
TARGET_INSTANCE = u2018 u2018 " Instance at which an event
" should be processed. Can
" generally be omitted.
EXCEPTIONS OTHERS = 1. " Exceptions include event not
" defined, no EVENTID
" exported, etc.
BestRegards,
Krishna