You are on page 1of 8

What is the purpose and importence of background scheduling!

To have an idea about the background scheduling let us take an example of a long report. Suppose we execute this
report in interactive mode, it takes several minutes and during time the SAP System is blocked for any further input.
As a result, you will not be able to interact with SAP sessions anymore.

However, when you run the report non-interactively, you can interact with the SAP sessions while processing the
report in the background. For executing jobs in non-interactive mode, schedule the job for background processing. To
create a background processing job you should specify:

The name of the report

The name of any variant it needs

What to do with output

When to start it

After this, the SAP system does not require users intervention and can proceed with the job even without you. It
executes the report and prints the output using printer or output controller. While scheduling a job in background
process, three parameters should be specified. These parameters are:

Definition of programs

Its start time

The printing specification for getting the prints as required

After this, you can check whether your job was executed successfully and display a log of any system messages.

For scheduling background processing, you have to direct the system to process an ABAP/4 or external program in
the background. This is a two-step process:

Scheduling the program

Releasing the job

This needs to have a special authorization for releasing and scheduling the job. Generally, the system administrator,
who organizes and monitors background processing, supervises the release of these jobs. Many users are also
authorized to schedule background processing of reports. You cannot schedule a job unless and until you have a
release authorization. If a user is authorized and has specified a start date or selected "start immediately," he or she
can release the job.

Authorized users can change start time. A program can be scheduled as a separate job or you can append it to an
existing job, which has not yet been processed. Background process can be run while doing some other online work.
However, this can adversely affect online operation and should be avoided. For example, if you run a program that
locks the database, the work of online users will be hampered or stopped. Often, long-running reports are scheduled
automatically or semi-automatically for background processing.
First Step

Initiate the job scheduling function. Standard job scheduling must be used in case of scheduling of an external
command or external program as a background job and ABAP job scheduling function can be used to schedule ABAP
programs. For starting a standard job scheduling function choose the following:

Administration menu bar option CCMS option Jobs option Definition option.

For starting ABAP job scheduling function, navigate to ABAP Editor and choose Program menu bar option Execute
option Background option.

Second Step

Now define a job. Using the Job Wizard you can define your job. From the Application toolbar, choose the wizard
button. After this, the initial screen of the SAP Job Wizard appears. The Job Wizard is available only from the
standard job scheduling function.

Third Step

Now, you have to save the job. When it displays the message "Job saved" it means the job has been successfully
scheduled. We know that a job must be released before it is scheduled. Only authorized users can release the job,
otherwise your system administrator will release your job.

Fourth Step

This is the last step of scheduling. In this step you have to check the status of your job. For this you need to choose
System menu bar option Own jobs option.

In SAP System, the background processing runs according to your instructions. In case a list is generated by the
report, the report either prints directly or waits for you in the SAP output controller. The status of background
processing can be checked for its correctness.

Advantages of Background Processing

Background processing system has many advantages.

First, when you run a report in the background, the SAP System is not tied up or blocked. However, if you run the
process in the interactive session, the SAP session, in which the process is running, is always blocked for any further
inputs. On the other hand, in a non-interactive mode, the R/3 system starts the report in the background. Running the
report in this manner has no influence on your interactive work with the R/3 system.

Second, in background processing of the system you can schedule the processes, i.e. a report or external program
can run at any scheduled time when R/3 system is active, during the night or other periods of low load on the R/3
system. Automatic periodic repetition of the jobs can be scheduled using background-processing system.

Third, background processing is an efficient way to execute long-running jobs. For interactive sessions, the SAP
System has a built-in time limit. Therefore, whenever a report exceeds that specified limit, the R/3 system terminates
the processing of the report automatically. This is the only way to run long-running ABAP/4 reports. Mostly ABAP/ 4
reports do not require any scheduling, since such reports are automatically scheduled for execution in the
background system.

What is the difference between batch jobs and background jobs


Batch job are the jobs created with sessions. You can process those sessions in SM35. These are not
direct update methods.

Where as the background jobs are the jobs running in the background with out user interaction. Once you
schedule the job for the background job it will run with out user interaction according to the given
schedule.

You can run the batch jobs also in background.

To create a background job in SAP, enter the Define Background Job screen by using transaction
code SM36 or menu path System Services Background jobs Job definition.

You can call the Job Selection transaction (transaction SM37) and check whether the jobs actually ran
without errors.

Understanding Background Job Processing


In background processing, the SAP System automatically runs any report or program in the specified time or
time intervals. The background processing system starts your job and runs the program(s) that you specify.
Afterwards, you can check whether your job was executed successfully and display a log of any system
messages.

Features:

Running a report in the background does not tie up the SAP sessions you are currently working with.
You can shift the execution of reports to the evening or other periods depending on load on the SAP
System.
Background processing is the only way you can execute long-running jobs.

Background jobs run in a special type of work processthe background work processthat is different from
dialog work processes in two ways:

A dialog step has a run-time limit that prevents users from interactively running especially long reports.
By default, the system terminates any dialog step in a transaction that exceeds 300 seconds. Although
the limit can be changed (in the system profile parameter rdisp/max_wprun_time ), it is always in effect
for dialog work processes. No such limit applies to background work processes.
Background work processes allocate memory differently than dialog work processes so that
background work processes can become as large as they need to in allocated memory to allow for
processing large volumes of data.

Background Processing
SAP background processing allows the automation of routine tasks and the optimization of the use of
SAP computing resources. It provides you with extensive functions for scheduling and administering
background jobs.
Prerequisites
To be able to use background processing optimally, you need to have set up the background
processing system appropriately
SAP Background Processing in SAP R/3
Programs can execute in the background of the SAP system while online operation is occurring.
SAP's background processing system is easy to use and completely integrated within the system.
Suppose a manager wants an accounting report ever Monday morning. Rather than having the
manager execute this program online every Monday morning, it could be scheduled to run every
Sunday night so that the report would already be printed for the manager when she arrived to
work. This scheduling of a report program is accomplished with SAP' background processing
system.

The SAP R/3 Dispatcher and its Work Process constitute the R/3 Runtime System.
From the perspective of the host operating system, the R/3 Runtime System appears as a
collection of parallel processes.
On each application server, these parallel processes include a dispatcher and work
processes, the exact number of work processes is variable and depends on the specific
configuration.
There are five types of work processes:
o Dialog work process for executing sequential steps in business transactions
o Update work process updates the database. It has two types of components:
U1 components for executing time-critical database changes
U2 components for executing non-critical database changes
o Enqueue work process for setting and releasing locks on SAP R/3 business objects
o Spool work process for spool formatting
o Background work process for executing background jobs
In this chapter, we will examine background processing
Background processing enables you to plan the start of ABAP/4 programs. Then, at the
given time, they are started by special work processes called a Background (Batch) work
processes.
Background processing runs are composed of jobs. Each job consists of one or more steps
(i.e., programs) that are processed one after another.
In general, job processing is not triggered immediately; usually, a specific start time is
defined when the job is planned.

Background processing enables you to plan the start of ABAP/4 programs. Then, at the given time,
they are started by special work processes called a Background (Batch) work processes.
Background processing runs are composed of jobs. Each job consists of one or more steps (i.e.,
programs) that are processed one after another.In general, job processing is not triggered
immediately. Usually, a specific start time is defined when the job is planned.
The three phases of background processing are:

Job Scheduling
Job Processing
Job Overview

First, we are going to cover the Job Scheduling phase.


SAP Scheduling a Background Job
To schedule/create a background job, use the menu path: Tools CCMS Jobs definition (or
transaction SM36).
When creating a background job, you must specify a job name and a job class (priority
level A, B, or C with A being the highest priority- data transfer form external system. B -
important periodic jobs performance statistics. C - non-critical jobs: list and queries.
The target host is not required. Normally, you will just leave this field blank. However, if
you are using an SAP system that has multiple application servers (and each of these
servers has background work processes), you can specify the specific application server on
which the background job should be processed.
Next, you should enter the steps (i.e., programs) to be included in the background jo
To include an ABAP/4 program in a background job, you must specify the program name and, if
necessary, its variant. A variant is a set of parameter values needed for the execution of a
particular program.
External programs may only be executed by users having the same authorization as the system
administrator The name of the server where the external program is executed must be specified.
External commands can be executed via background jobs defined with transaction SM36 as shown
above These commands are defined by the administrator and protected with authorizations.
Use transaction SM69 to define and maintain external commands. External commands that
defined by SAP can not be changed

Logical command name


o External commands are uniquely identified by a logical name and the assignment of
an operating system
Operating system (CASE SENSITIVE FIELD)
o External commands can be restricted to execute on a particular operating system
(AIX) or any operating system (ANYOS)
Operating system command (PATH NAME)
o Name of an operating system program
Parameters for operating system command
Check module
o Optional function module to further check a user's authorization to execute this
command. Then maintaining external commands (SM69), you can specify the name
of a check module, which is a function module that is executed immediately before
the command, and can decide whether the command will be executed.

You might also like