Creating a background job involves multiple steps, and in this article, I would like to show you how to create an SAP background job with an actual scenario and set up the system to send the generated report by email, which I believe can add value to busy managers.
How to create SAP Background Job?
Scenario: We require a particular user who needs a report for all supplier invoices created each week for a company (1710). They also want to receive this report directly by email id.
Step 1: Finding the name of the program
The first thing we are going to do is find the name of the program that we are going to set up the job for, and this is a very as you are setting up your background job.
MIR5: is a transaction code used to Display List of Invoice Documents in SAP
Step 2: Creating a Variant
Variants allow you to save your selection parameters in the input screen, and this is needed since you will tell the system to use these parameters in your job’s requirements.
Go to transaction code SE38 to open the program and create a variant depending on your requirement
Step 3: Copy the program name and go to SM36:
Step 4: Enter the Job name:
Step 5: Choose Job Class:
SAP background jobs can be divided into three categories −
- Class A (High Priority) − this is used for urgent or critical task and must be scheduled with class A priority job. Class A job reserves one or more background work processes.
- Class B (Medium Priority) − these jobs are executed after the completion of Class A high priority jobs.
- Class C (Low Priority) − these job runs once class A and class B jobs are completed.
Step 5: Click on step:
Select Variant that we created before:
Check and Save
Step 6:Now we will setup E-MAIL notification
Step 7: Create a condition
Here we have different options
Immediate: If you press immediate, it means that you want to run the job in the background immediately.
Date/Time: if you want to start it on a specific day and time
But for the test purpose I will run this immediately because I want to show you the result right now
Now go to SM37 to monitor it:
Step 8: Execute
As you can see the Status is finished that means our report is ready. If you enjoy such tutorials, make sure you check my other article on SAP ABAP
- SAP S4/HANA migration using LTMC and LTMOM - February 28, 2022
- Background jobs in SAP S4/HANA - January 11, 2022
- How to Debug in SAP - December 2, 2021
0 Comments