Register Login

Scheduling Background Job

Updated Jun 02, 2021

What is Background Jobs in SAP?

The background jobs are the non-interactive jobs in the SAP system that perform their work in the background without affecting the normal operations. These background jobs not only decrease manual effort and brings automation into the process but also optimize the use of SAP computing resource.

The background job can be an ABAP program, External command, or an external program. Once the background job is defined, the system makes sure that it runs the defined job at a specific time.

Users can schedule the background job using t-code SM36 and see the status of background jobs using t-code SM37.

Type of Background Job

Background jobs in SAP can be divided into three following categories:

Class A (High Priority)

Class A jobs are used for any critical task or urgent work which needs to be scheduled as a priority job.  This type of background jobreserves one or more background work procedures.

Class B (Medium Priority)

Class B are the types of jobs that are executed once the system completes Class A aka priority jobs.

Class C (Low Priority)

Class C jobs are the least priority jobs in SAP system. These jobs are executed once the execution of class A and class B jobs are completed.

Status of Background Jobs

Here is the list of status which is used for defining the phases of background jobs:

Scheduled

Scheduled status implies that all steps required to create the job are completed but the start conditions are still not defined.

Released

Released status implies that all the steps including start conditions that are required for creating a job are finished but the hob is still not running because the job is still not released by the administrator who has the proper authorizations.

Ready

Ready status implies that a job is completely ready for execution but still not running because it has been put in a queue by the job scheduler. This job has to waits for the next free background work process to assign the same.

Active

Active status implies that a job is currently active and running. Now this job can’t be deleted or changed.

Advantages of SAP Background Jobs

  • Users can schedule jobs any time and an infinite number of times.
  • SAP background jobs can decrease manual effort and automates the task.
  • It optimizes the SAP computing resources
  • It can decrease the system load by scheduling a job in non-working hours.

How to Schedule a Background Job in SAP?

The planned & immediate background jobs can be directly scheduled using transaction code T-code SM36.

Please follow the steps below to schedule a background job:

Enter T-code SM36 in the SAP command box and press Enter.

T-code SM36
 
Next, enter the Name, Class, and Status of the job.. Then click on the Spool list recipient button.

Spool List
 
Enter your SAP Username in the Recipient box and then click the Copy button. 

Recipient Determination

Now click the Step button to define ABAP program details.

Define Job
 
Enter your Abap program & Variant name in their respective fields, and then click the Save icon.

Enter Program Details

Note: If the variant is not created, leave it blank.

After your Job is scheduled, this screen will appear.

Step List Overview
 
Next, click on the Start conditions button to specify the Job's date, time, and conditions.

Start Condition

Now, click the Date/Time button and define the start and end date/time of a job and the Timezone.  Then click the Period Values button

Choose Date/Time of Job

Note: If you select the Immediate option then the Job will start running immediately and will not be set as a periodic job.

Next set the job frequency, i.e., Hourly/Daily/Weekly as per your requirement (here we set it to daily), and then click the Check button.

Period Values
 
Now click on the Save button or press Ctrl + S to save the frequency of the Job.


 
Next, click on the Save icon again to save the Start Condition.

Save Start Condition
 
Once you define the Job step and start conditions, you will see the following window. Click the Save icon to save your scheduled Job. 

Click save to save schedule job

At last, we have Scheduled a new Job

JOB1

.                                                                                                                                                             .

Scheduled Job

How to Check the Status of Scheduled Jobs?

Please follow the steps below to check the status of the scheduled job:

Enter T-code SM37 in the SAP command box and press Enter.

T-code 37

Now, enter the following details and click Execute

  • Job Name
  • Username
  • Status of the Job
  • Date Range
  • ABAP program

Simple Job Selection

On the next screen, you will see the status of your job.

JOB overview

How to Delete or Stop a Background Job?

First, enter  T-code SM37 in the SAP command box and press Enter.

SM37

Now, Enter the following details and click Execute

  • Job Name
  • Username
  • Status of the Job
  • Date Range
  • ABAP program

Simple Job Selection

Finally, click on the check box on the left of Job to select the Job you want to delete/stop, and then click the Stop or Delete button.

Delete Stop Job

Conclusion

So it was the brief information of background jobs in SAP and the procedure to easily use them in the system. Background jobs are helpful to complete the tasks with minimum or no human interaction. However, it is important to have complete knowledge to use this system without having any troubles.


Comments

  • 20 Mar 2013 9:11 am Guest
    It is not accepting to setup a job without a variant !!
  • 31 Mar 2014 3:01 pm Guest

    It works. One has to define a variant for a normal batch job !!

     

    Kumar / Germany


×