Introduction to Job Scheduling in ABAP

 

  • In Advance Business Application Programming, we have two types of Jobs.
  1. Foreground Jobs :-

    • They are also known as interactive jobs.

    • User can interact i.e. User will give the input and get the output.

    • So, basically whatever you create in SAP systems i.e. Reports, Tables, Classes, Objects etc. All are basically foreground jobs,

    • For, example Suppose I have this below report.



    • When, I will execute my program,



    • I will have to pass the input, and based on my input.

    • The system will show the output, So this kinds of jobs in which user can interact are called as Foreground jobs.


    2. Background Jobs :-

    • Background jobs are non interactive jobs i.e. users cannot interact with the job.
    • The background jobs are the non - interactive jobs in the SAP system that perform their work in the background without affecting the normal operations.
    • Once the background job is defined, the system makes sure that it runs the defined job at a specific time.

    Features of Background Jobs :-

    • Background jobs run in the background without any user input and can be scheduled to run when the system load is low.
    • They are used to reduce the manual efforts and automate the process.

Transaction Code For Background Jobs :-

  • SM36 :- This transaction code is used to schedule the background job.



  • SM37 :- This transaction code is used to check the status of background job.




Background Jobs Classification :-



1. Class A ( High Priority ) :-

  • Some tasks are urgent or critical and must be scheduled with class A priority job.
  • Class A priority jobs reserves one or more background work processes.

2. Class B ( Medium Priority ) :-

  • Jobs in class B have less priority as compare to jobs in class A.
  • Once class A jobs are completed, class B job will start executing in the background.

3. Class C ( Low Priority ) :-

  • Class C jobs runs after both class A and class B jobs are completed.

Background Jobs Status :-



  • There are 6 status of background jobs in SAP :-

1. Scheduled :-

  • Scheduled Status means that all steps required to create the job are completed but the start conditions like start date, end date, frequency etc. are still not defined.

2. Released :-

  • Release status means that all the steps including start conditions, that are required for creating a job are finished.


3. Ready :-

  • Jobs is ready for execution but it is not executing because it has been put into the queue by Job Scheduler.
  • Since, work process is not available, therefore this job is waiting in the queue, once the work process will be available, It will simply go to the active status.

4. Active :-

  • Active status means that the job is currently active and running.
  • We cannot change the status of the job once it is in active status.

5. Finished :-

  • It means the desired task is completed without any error

6. Cancelled :-

  • For Cancelled status, there can be mainly two possibilities :-
    1. The administrator forcefully cancelled the job or
    2. There might be any issue with the job.
  • We can check the reason for the same with the help of job logs.

Comments

Popular posts from this blog

Understanding Different Types of SAP Function Modules: Normal, RFC, and Update

Mastering ABAP: A Step-by-Step Guide to Function Modules and Groups for Modularized Programming

Introduction to SAP