Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8709

Re: Discussion about Background Jobs in SAP

$
0
0

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


Viewing all articles
Browse latest Browse all 8709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>