SAP Background Job Processing SM36

โšก Smart Summary

Background job processing in SAP enables non-interactive execution of time-consuming programs behind normal operations, scheduled via SM36 and monitored through SM37. It supports three priority classes and six lifecycle statuses to ensure efficient workload management.

  • ๐Ÿ”ง Automation Benefit: Background jobs eliminate manual effort by running resource-intensive programs during off-peak hours without user interaction.
  • ๐Ÿ“Š Priority Management: Assign Class A, B, or C priority to control execution order and allocate background work processes effectively.
  • ๐Ÿ“‹ Lifecycle Tracking: Monitor job progression through six statuses โ€” Scheduled, Released, Ready, Active, Finished, and Cancelled โ€” using SM37.
  • โš™๏ธ Scheduling Precision: Define start conditions, end dates, and periodic intervals to automate recurring job execution reliably.
  • ๐Ÿ”„ Deschedule Control: Revert released or ready jobs back to scheduled status to prevent future execution when requirements change.

SAP SM36 Transaction Code for Background Job Scheduling

What is a Background Job in SAP?

A background job is a non-interactive process that runs behind normal interactive operations in an SAP system. Background jobs execute in parallel and do not disturb foreground processes or operations. They are scheduled using transaction code SM36 and monitored through SM37 by viewing job logs.

Advantages of Background Jobs in SAP

  • It reduces manual effort and automates repetitive tasks that would otherwise require user interaction.
  • It can be scheduled as per the user’s choice, allowing flexible execution timing.
  • It runs seamlessly in the background without requiring user input, freeing up the system for interactive work.
  • Once you define the variant for a background job, the user does not have to worry about providing field values each time. This also reduces the possibility of input errors.
  • It is ideal for time-consuming or resource-intensive programs, which can be scheduled to run during off-peak hours when system load is low.

Types of Background Job Priority Classes

SAP categorizes background jobs into three priority classes that determine execution order and resource allocation.

  1. Class A (High/Critical Priority): Urgent or critical tasks must use Class A priority. It reserves one or more background work processes. Available processes for Class B and C = Total work processes (set in RZ03) minus processes reserved for Class A.
  2. Class B (Medium Priority): Once Class A jobs complete, Class B jobs begin executing before Class C jobs.
  3. Class C (Low Priority): Runs only after both Class A and Class B jobs have completed. Suitable for non-urgent, routine tasks.

Possible Statuses of a Background Job

Every background job in SAP passes through a defined lifecycle. These statuses help administrators track job progress.

  1. Scheduled: Program name and variant are defined, but start conditions (Start Date, End Date, Frequency) have not been specified. The job will not execute until start conditions are set.
  2. Released: All required criteria are fulfilled including start conditions. The job is waiting for its scheduled start time.
  3. Ready: All conditions are met, but the job is in a queue waiting for a background work process to become available.
  4. Active: The job is running in the background. Its status cannot be changed once Active.
  5. Finished: The job executed successfully without any errors.
  6. Cancelled: The job did not complete. Either the administrator forcefully cancelled it, or an error occurred. Investigate from the job logs in SM37.

How to Schedule a Background Job Using SM36

You can schedule a background job using transaction code SM36. Both planned and immediate jobs can be configured.

Step 1) Execute T-code SM36.

SAP SM36 Transaction Code for Background Job Scheduling

Step 2) Fill in the job name, priority class (A/B/C), and the target server. Defining a target server helps with workload balancing across application servers.

Define Background Job Name and Priority in SM36

Step 3) Click on “Spool List Recipient” to receive output in your mailbox. Check email from SBWP.

Spool List Recipient Configuration for Background Job

Step 4) Insert your SAP username and click the Copy button.

Enter SAP Username for Spool Recipient

Step 5) Click the Step button to define the ABAP program and variant details.

Click Step Button to Define ABAP Program

Step 6) Define the program name and variant details.

  1. Enter your program name and variant name. If you have not created a variant, leave it blank.
  2. Press Save.

Enter Program Name and Variant for Background Job Step

Step 7) Once the job step is saved, you will see the confirmation screen.

Background Job Step Confirmation Screen

Step 8) Click Start Condition to fill start date, end date, and frequency. Without a start condition, the job will always remain in Scheduled status and will never run.

  1. Click on Date/Time for periodic jobs. Selecting “Immediate” runs the job right away as a one-time execution.
  2. Define start date/time and end date/time. The job is released only when it meets its scheduled start date/time.
  3. Press Periodic Values.

Define Start Condition and Periodic Schedule for Background Job

Step 9) Select the period โ€” Hourly, Daily, Weekly, or Other Period. We select Other Period.

Select Periodic Frequency for Background Job

Step 10) Specify the recurring criteria. For example, run every 5 days from the start date. Here we select every 10 minutes.

Set Custom Recurring Interval for Background Job

Step 11) Click Save.

Save Periodic Values for Background Job

Step 12) Click Save again.

Confirm Start Condition for Background Job

Step 13) Click Save on the main screen.

Save Complete Background Job Definition in SM36

Step 14) Once job step and start conditions are defined, the summary window appears.

Background Job Configuration Summary Window

Step 15) Press Save to finalize the background job.

Finalize and Release Background Job

How to Monitor a Background Job Using SM37

After scheduling, verify job status using transaction code SM37, which provides a centralized view of all background jobs.

Step 1) Execute T-code SM37.

SAP SM37 Transaction Code for Job Monitoring

Step 2) Select your criteria for the job you want to monitor.

  1. Enter the job name and username who scheduled the job.
  2. Select the status of the job.
  3. Specify the date range. Here, we specify only the end date while keeping From Date open.

Set Job Selection Criteria in SM37

Step 3) The status shows Released, meaning start conditions are met and the job is in the queue waiting for a background work process to become available.

Background Job Status Released in SM37 Job Overview

How to Deschedule a Background Job

Descheduling reverts a job from Released back to Scheduled status so it will not run in the future. You cannot deschedule a job once it reaches Active status.

Step 1) Execute SM37.

Open SM37 for Descheduling a Background Job

Step 2) Fill the criteria.

  1. Job name and username who scheduled the job.
  2. Select status โ€” only Released or Ready jobs can be descheduled.
  3. Specify the date range.
  4. Press Execute (F8).

Filter Criteria for Descheduling Background Job

Step 3) Select the job and press Job โ†’ Released โ†’ Scheduled.

Change Job Status from Released to Scheduled

Step 4) A confirmation message appears in the status bar once the job is descheduled.

Confirmation Message for Descheduled Background Job

Background Job Processing vs Foreground Processing

Foreground processing requires an active user session and blocks the screen until the task completes, making it unsuitable for long-running operations. Background processing runs independently without locking the user interface. Foreground jobs suit quick interactive tasks like data entry and configuration changes. Background jobs are better for mass data uploads, period-end closings, large report generation, and scheduled data transfers. SAP best practice recommends running resource-intensive programs as background jobs during off-peak hours.

FAQs

SM36 is used to define and schedule background jobs, while SM37 is used to monitor, view logs, and manage existing background jobs. Together they cover the full job lifecycle.

Yes. In SM36, select “Immediate” as the start condition. The job executes right away as a one-time run but will not be configured as a periodic recurring job.

A cancelled job appears with “Cancelled” status in SM37. Review the job log to identify the error. Common causes include program errors, missing authorizations, or insufficient background work processes.

AI-powered tools like SAP Business AI can predict job failures, optimize scheduling windows, and automatically reallocate work processes based on historical performance patterns.

AI-driven monitoring tools analyze job logs in real time, detect anomalies, and trigger alerts before failures occur. This reduces manual oversight and enables proactive system administration.

Summarize this post with: