cancel
Showing results for 
Search instead for 
Did you mean: 

Discussion about Background Jobs in SAP

SAPlearner7861
Participant
0 Kudos

Hi ,

I would like to more about Back ground Jobs  in SAP.

I just know how to schedule a Simpe  background job , Create a Variant for background Job and how can we check the status of the Job.

.

But I am very much intersted to know morw about background Jobs.

Can body Please share their experieces with Background Jobs in real time scenarios( Creating a background JObs,Monitoring, Status, error handling, Any complexities .... etc.....)

Please Share...

Cheers - Sj

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI,

Background jobs are simply a sequence of SAP programs which are executed step by step automatically in the background. They can be scheduled to run run automatically at pre-defined days or with a pre-defined frequency.

1. COMPONENTS OF A BACKGROUND JOB:

In order to set up any background job we need to have the following information:

- The program to be executed

- The variant to be used for the program. The variant defines the input parameters which will be used by the program. The variants can be set up for each program using the T Code SE38.

- The user ID with which the program is to be executed. The user ID is very important from an authorizations point of you. By using the correct user ID for a particular program being used in the job, we can restrict the users who can run that job successfully.

2. SETTING UP A BACKGROUND JOB:

You have already stated that you know about setting up of simple background jobs. A simple background job can be set up by going to a T Code or program in SAP, entering the selection paramters and then selecting the menu path Program --> Execute in background. This sets up a simple, single step background job which can then be montored using T Code SM37.

To set up background jobs with multiple steps, we can use the T Code SM36. To use the T Code SM36, we need the same 3 sets of information as mentioned above and the same is defined for every step of the job.

The various steps of a multiple step job run sequentially, i.e. step 002 starts once step 001 has been finished successfully, step 003 starts once step 002 is finished and so on till the last step is finished successfully.

3. OUTPUT OF A BACKROUND JOB - EMAILING IT TO AN EMAIL ID

The output produced by a background job is called spool and it can be emailed, if required to an email ID or a distribution list containing multiple email IDs by defining the spool recepient of the job.

This can be defined while setting up the job in SM36. Once this setting is done, the spool i.e. the output produced by the job is emailed to the email IDs mentioned in the spool recepient once the job has completed successfully.

4. DEBUGGING A JOB FAILURE

There are multiple occassions when a background job might fail. The reason for the same can be found using the job log which is availabe in T Code SM37. Go to T Code SM37 and display the job. Then select the job log which will show the execution log of the job.

We can scroll down to the point where the job gets cancelled and then double click on the line to display the detailed ABAP dump which shows the reason for the job failure.

The ABAP dump can also be seen using the T Code ST22. Usually ABAP dumps are technical in nature so ABAP consultants can analyze the same and identify the exact cause of the job failure.

Hope this helps strengthen your understanding further on background jobs.

Regards

Sudhir Makhija

former_member184065
Active Contributor
0 Kudos

Hi,

If there are 100 sales order to create outbound devilries then we will create variant instead of creation each and every OBD by sales order..After creation of variant ,we need to create job in SM36 and maintain at what time ,you want to create OBD's.You an check status of job in SM37.

Ex: your variant will have key fields.Through this key fields,you should have created 100 sales orders to create OBD's by variant.

Thanks

Naren

srinu_s1
Active Contributor
0 Kudos

Please check the below.

Srinu.

Message was edited by: Srinu S