Sunday 8 July 2012

SAP Background Jobs

1.     Definition


·           Background jobs are a means of running reports without having to wait for the report to finish.
·           Background jobs can be scheduled to run immediately or at specific times or the day or night.
·           Background jobs can be scheduled to run automatically on a periodic basis (eg daily, weekly, monthly etc)
·           A background job can consist of one or more reports. Each report is run in sequence.

2.     Prerequisites


·           A selection variant must be be created for any report run as a background job in order to supply the report with the required selection criteria.
·           To create a background job you will need to know the ABAP program name. This can be found by running the report and using System>Status to view the Program field. For example the ABAP program name for the Cost Centre Line Item Report (transaction KSB1) is RKAEP000. 
  

3.        Creating a Background Job Using the Job Wizard


·           From the main menu select System>Services>Jobs>Define Job (transaction SM36).
·           Press the Job Wizard button and step through the screens as follows: 
·           Screen 1:   
Continue
·           Screen 2:   
Enter a name for your job. Continue.
·           Screen 3:   
Continue with ABAP Program Step selected 
·           Screen 4:    
Enter the ABAP Program Name and variant name.
Press the Print Parameters button, specify the required printer and set the "Time of Print" to "Send to Print Spooler for now".
Press green tick
Continue
·           Screen 5:   
If more reports need to be added to the job tick the checkbox, press continue and repeat screens 3 and 4.
·           Screen 6:   
Select how the job is to scheduled (eg Date and Time)
·           Screen 7:   
Enter the required scheduling information ( eg Date and Time) and if required tick "Periodic Jobs"
·           Screen 8:   
If "Periodic Job" was selected select the frequency (eg Monthly)
·           Screen 9:   
Check the job details and press Complete


4.        Viewing Background Jobs


·           From the main menu select System>Services>Jobs>Job Overview (transaction SM37).
·           Enter the required selection criteria and press Execute
·           To view the job log, tick the required job and press the "Job Log" button.
·           To view the output from the job, tick the required job and press the "Spool" button.

No comments:

Post a Comment