Creating a Standard Background Job in SAP: A Step-by-Step Guide

 

How to Create a Standard Background Job in SAP: A Step-by-Step Guide

In SAP, background jobs play a crucial role in automating tasks, improving system performance, and enabling processes to run without manual intervention. SAP background jobs are often used for tasks like report generation, data processing, or batch updates. This guide provides a step-by-step process for creating a standard background job in SAP using the transaction code SM36.



What is a Background Job in SAP?

A background job in SAP is a scheduled program that runs in the background without user intervention. This is beneficial for time-consuming processes or those that should be executed during off-peak hours, like nightly batch jobs. It can handle different tasks such as:

  • Running reports
  • Performing data transfers or updates
  • Housekeeping tasks (e.g., archiving)

Step-by-Step Process to Create a Standard Background Job

1. Access Transaction SM36

To start, log in to your SAP system and access the transaction SM36. You can enter this code in the command bar at the top of your SAP Easy Access screen. 

Job Class: You can choose the priority level of the job:
  • Class A: High priority
  • Class B: Medium priority
  • Class C: Low priority (default)
Click on Standard Jobs.


Select SAP Component as BC Basis Component and Job name as SAP_CCMS_MONI_BATCH.


SELECT SAP Component BC Basis Components.


Select BC SAP_CCMS_MONI_BATCH_DP.


Assign a Target Server (Optional)

If your SAP system is configured with multiple application servers, you can assign the job to run on a specific server. This helps balance the load across servers. By default, SAP will select an available server.


Schedule Job Timing

After defining the steps, the next step is to set the job’s execution time:

  • Immediate: If you want the job to start running immediately after it's created.
  • Date/Time: Set a specific date and time for the job to start. This is useful for jobs that need to be run during off-hours.
  • Recurring Job: You can schedule the job to repeat at specific intervals, such as daily, weekly, or monthly.

Save and Activate the Job
Once all the configurations are complete, save the job by clicking the Save button on the main screen. Your background job is now scheduled and will run based on the time and frequency settings you defined.

Monitoring the Background Job

To monitor the background job, you can use the SM37 transaction:

  1. Access SM37.

  • Enter the job name or relevant selection criteria (such as job status, date range, etc.).
  • Press Execute to see the list of jobs.


  • Check the status of the job:
    • Scheduled: Job is planned but has not started yet.
    • Released: Job is ready to be executed at the specified time.
    • Running: Job is currently being executed.
    • Finished: Job has successfully completed.
    • Canceled: Job encountered an error or was manually canceled.

    Click on job to see detail job log.


    Change username to * For All Users and click on check on Sched. to see Scheduled jobs.


    Here you can see all jobs of all users for date  of 17.10.2024.

    Conclusion

    Creating Standard background jobs in SAP through transaction SM36 is a straightforward process that allows you to automate and schedule repetitive tasks. With the ability to manage job steps, define execution schedules, and monitor their status, SAP background jobs offer robust functionality to ensure smooth and efficient operations. Regular monitoring of background jobs will help you maintain system performance and ensure important processes are running without interruptions.

    By following this guide, you can successfully set up and manage your SAP background jobs.


    Comments