Thursday 5 September 2013

SAP-Successive background Jobs

There might be situations where you might need to execute periodic background jobs subsequently.

In the normal way of background job schedule with "After Job" as trigger will work for single instance of sequential background job execution, but the same will not work with periodic schedule.

The same can be achieved by a standard methodology explained in SAP Note 919458.

SAP Note 919458 - Program 'BTC_EVENT_RAISE'

Setps:--

1) Goto SM64 T-code (Bg event administration)

  
SM64 Screen

      Create a new Event with a name of your own choice


Do not select system option
  2) Goto SE38 T-code and execute report BTC_EVENT_RAISE
           
                   
              Fill in the Event name Z_BJ_TRIGGER which we have created and provide the background job as               parameter.    

 

              Save the values as variant for BTC_EVENT_RAISE program


3) Goto SM37 or SM36,  create / change a background job (Ex:- RSPFPAR) with repeat schedule

           


   Add a new step to the job with the ABAP program BTC_EVENT_RAISE and keep the variant we had      saved.
             
     
         Job step should be displayed as below

       
The event trigger step should be defined as the next step of the primary step
4) The subsequent job should be scheduled with "After Event" as the job start condition.
   
Ex:- Schedule RSUSR002 job


   Set the "After Event" as start condition and provide the event trigger name we had created                             (Z_BJ_TRIGGER), and select the periodic checkbox



5) Now you can see the background jobs ran subsequently and repeat schedule will work.


You can perform the same actions set to schedule more than one subsequent jobs.      
















































































































Pages