You can run programs that don’t require any user dialog in background process. It is very useful if the process to be executed is time-consuming and requires much system resources. Therefore the process should be performed when there is a minimal workload on the system. Performing long-running process online would block a dialog process for the entire duration and thereby disturb other dialog users.
To prevent users from executing time-consuming report interactively, you can set a runtime limit for a dialog process. The processing will terminate after reaching the limited time. You can set this limit in the system profile using parameter rdisp/max_wprun_time. The default limit is 600 seconds. Background processing is not restricted by this parameter.
Three important things related in defining SAP Background Jobs.
- General data such as job name, job class, and target machine.
- About the start time
- List of programs to be executed.
1. To define a SAP Background Job you can access from SAP Menu -> Tools -> CCMS -> Background Processing or directory call transaction code SM36.
2. You have to fill the general information:
- Job name:
- Job Class
- Exec Target
You should fill the job name as descriptive as possible to make you easy in analyzing the job log.
The job class control the priority when executing a job. It has three classes:
- A: Highest priority, for time-critical jobs.
- B: Medium priority, for periodic job.
- C: Normal priority, the usual job for users.
If you have more than one SAP application servers, you can assign the execution target job to any SAP instance with a background work process.
3. Now you set the parameters that determine the start time.
You can choose the job to start immediately.
Or start on particular Date/Time.
Here you can also specify a time periodic job.
Instead of time base schedule, you can also specify after job. You can select Start status-dependent option to ensure that job starts after the preceding job has been completed.
Or you can schedule the job after event.
Operation mode switching is defined as an event to ensure that the background job can also be started after the switching.
For specific workday/time you can set it according to your work calendar.
Save your start time parameter. It will show you the summary
4. Now you define the job steps to be run.
Here you can choose ABAP program to run.
Or external command
or external program
In this example i use ABAP program. Now save your job definition. You can add additional job step if needed.
Click Back button. You will see a message like this.
5. On initial screen you just need to click Save button.
You will see that your SAP Background Job has been defined successfully.