Contents
Introduction ... 2
How to find the associated program name of a transaction ... 2
Using menu option “Execute in Background” ... 3
Using define background job schedule transaction ... 4
Background job setup tasks ... 7
Define dependent background jobs ... 9
Setup period values for batch jobs ... 11
Using Job Wizard option ... 13
How to find batch jobs ... 18
How to stop a background job ... 19
How to “Release” a batch job that is “Scheduled ... 20
How to monitor background jobs ... 21
View Spool Requests ... 21
Introduction
It’s often required to run certain programs in background to avoid performance issues in SAP or to automate routine tasks. Most of the time we schedule customer invoice creation, delivery creation are background jobs in SAP. Sometimes if you have to do large number of data uploads to SAP, it’s advisable to run those programs in background as well. There are various methods to run / schedule programs in background. The advantage of background processing is that you can schedule the job to be run any time you want.
How to find the associated program name of a transaction
Let’s say to schedule delivery creation transaction “VL10C’ as a background job. First thing you need know is the ABAP program name associated with it. In order to find that you need to follow these steps;
Call the transaction (Eg: VL10C)
Click on the menu System / Status
Using menu option “Execute in Background”
Most of the standard SAP transactions SAP has given a menu options to run that program/ transaction in background.
Eg: Run VL10A transaction in background
First you need to maintain the required selection options in the selection screens
Using define background job schedule transaction
Transaction: SM36You can also access same transaction from the below menu path in the Easy Access Screen.
Click on button
IMPORTANT:
When you’re setting up a background job, you can schedule it under your name. But to execute the program it’s advisable to have a “system user” created and assigned under “USER” field.
This way, you can ensure the job will run, even though your user ID is locked.
Such user ID is created as “System users” with SAP_ALL access; where as normal users are dialog users with limited access. System user does not have a SAP login whereas dialog users have a SAP login.
Background job setup tasks
When you’re going to setup a background job, below steps needs to be completed to specify the required data / time that the job needs to be executed.
You will get the below pop up to set the desired start time for your background job. Depend on the requirement you can set whether it needs to start immediately or at a given date/time.
Save the job using button Now go back to
o Click on , if you want to set a different date / time to start your program in background. Once you click on that, system will give you a popup to specify the date / time criteria
In this example, I will set my job to start at 04.08.2014 at 6 PM
Define dependent background jobs
If you want to run your program after a certain batch job, then select the option For example, in IS-AFS, the delivery creation batch job should run only after the allocation batch job
Save the job using button
o In case if you cannot use any of above date / time options, but need to run in different calendar, you can do that via factory calendar option. In order to do that, you will have to select the button
Maintain the factory calendar options. If you want to learn about, how to create your own factory calendar, please click here.
Save the job using button
Setup period values for batch jobs
Specify the period value.
Save the job using button
Using Job Wizard option
You can also follow same steps from the button in the SM36 transaction
Enter your job name, priority and select button
Enter program name and select the variant and click on button
If you want to setup multi step background jobs, you can define it by selecting check box
Now you can define the frequency you want your job to be scheduled in the below screen. Click
on button
Click on button
How to find batch jobs
Transaction: SM37You can find your batch job using the above transaction.
“Status” released are the batch jobs that will run next. Any batch job that is marked as “Scheduled” will not run.
You can access all batch jobs created under your user ID using below menu path
How to stop a background job
If you want to stop any batch from running, you can set the “Released” status to “Scheduled”. From transaction SM37, select the batch job and click on menu
Result:
Since the batch job is “Scheduled”, this will not run until you set it back to “Released”
How to “Release” a batch job that is “Scheduled
” Transaction: SM37How to monitor background jobs
Transaction: SM37You can use the transaction SM37 to monitor background jobs.
View Spool Requests
Transaction: SP01You can also access same transaction using below menu option
You will see list of spool requests
After selecting the correct spool, by using button you can preview results
List of collective run
As an example, if you schedule billing documents in batch job using program RV60SBAT, you can view those billing documents that got created using transaction V.21
Author: Anupa Wijesinghe
E-Mail: [email protected] / [email protected] Website: www.learnsaptips.com
View my profile in LinkedIn Follow me on Twitter
Disclaimer
This article is done based on my research and readings, unless otherwise stated. The views expressed are my own and not of anyone else.
Author accepts no liability for the content of the articles in this website or for the consequences of any actions taken on the basis of the information provided. Using this information is at the users own discretion and responsibility.