Ads

Background Job Schedule in SAP ABAP

Background Job Schedule in SAP ABAP

What is Background Job?
Background job is a invisible process that is running behind the screens of SAP .It can be handled by the system without human effort,once ,we run the background job which will automatically works as per time schedule by sap system .We do not need any one interaction to run it.It run simultaneously without disturbing four ground SAP application operations.We can process the background job in SM36 Transaction code and we can check status of job in the SM37 Tcode.

Uses of Background Job

It automatically starts the process without manual effort.
It can be scheduled as per user requirement convenient time.
It can take user input without any one interaction for which we have to create variant for job input.
We do not require time to spend for it,once job configuration completed.

There are three types of Background Jobs

High/critical priority:Urgent and critical jobs.
Medium priority:we can run the one job after completing first processed jobs.
Low Priority:We can process this job after processing all its preceding jobs.


Structure of Background Jobs

Scheduled:Here,we defining the job program name and job variant.
Released: Here,we have to define the all job starting conditions to run the job.
Ready:Job will be putting in the queue to run the job in background work process.
Active:Job has started in the background process.
Finished:Job has ran successfully.
Cancelled:If administrator cancelled the job,job will be cancelled.

Scheduling Background Job

We can schedule the background job using  SM36. 

1) Execute T-code SM36. 

 2) You have to fill the job name, priority(A/B/C) and the target server.

3) Now ,click on spool list recipient. You will get output in your mailbox and check email from SBWP. 

4)There,enter your SAP username and click on copy button. 

 5) Click Step button to define ABAP program, variant's details, etc. 

6)  where,give the program name, variant details. 

      Then,Press save button.

 7) Click on Start conditions to fill start date, end date, frequency and other details for job. 

Enter  Date/Time for periodic jobs. If you click Immediate then job will start running Immediately. 

8) As per your requirement ,select Hourly/Daily/Weekly period to define the frequency of the job.

9) Click on save button. 

10) Click on save again. 

11) After completing Job steps and start conditions.

12) Press save. 

Now ,your background job configuration completed in SM36 transaction code ,Next you can check your job status in SM37.

13) Go to SM37 to check the status of the job. 

14) Select your criteria for the job .

Put your job name and username who scheduled the job.
Select the status of the job.
Specify the date range.

Calling the Background Job through Report Program

We can call the background job by the report program for which we have to create structures ,data type and input parameters and call the below function modules.
CALL FUNCTION 'JOB_OPEN'
CALL FUNCTION 'JOB_SUBMIT'
CALL FUNCTION 'JOB_CLOSE'
CALL FUNCTION 'SHOW_JOBSTATE'

Now ,system will display your job status ,Finally we have learn ,what is background job and advantages of it and how to schedule background job

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced