Professional Documents
Culture Documents
Background Job Scheduling in SAP
Background Job Scheduling in SAP
by
Samik Ghosh
Content
Batch Job Scheduling in SAP
Step by Step Process to schedule Batch Job (With
Screenshots)
Scheduling Jobs
Specifying Job Start Conditions
Job Start Management
Periodicity: Specifying Automatic Job Repetition
Managing Jobs from the Job Overview
Jobs and Job Steps
Page 1
Introduction
Background jobs are definitions of programs, printing specification, and
interactively can be run automatically by the SAP background
processing system. Any program that you can start interactively can be
run automatically by the SAP system in the Background jobs. In
background processing the system automatically runs the specified
program or report at a specified and schedule time without the
intervention of the user; even if you can monitor the background job
and display results.
Whenever you log on to the SAP System to perform any task, the R/3
System starts responding. SAP System can be operated in both
interactive mode as well as non-interactive mode. In the non-interactive
mode you can schedule execution of programs and reports that you
need to run without further intervention by you. This mode of working is
named Background Processing.
Sophisticate support for the background processing is provided by the
SAP System. One can execute both internal and external programs of
the SAP system. You can perform variety of jobs like choosing a variety
of methods for scheduling and managing the jobs offer by the SAP
System. For ease of access of scheduling and management, within a
single background processing job one can execute similar related
programs as "job steps;" this allows the single background job to
become more complex and have multiple steps.
The system has a number of sophisticated tools for managing jobs and
diagnosing problems that occur during the runtime, including a graphic
monitor and a powerful and easy-to-use job programming interface for
developing your own background-processing applications. The system
also provides job scheduling wizard automates basic background job
definition.
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. 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:
Page 2
Page 3
Page 4
Specifying a Recipient
For specifying a recipient, select Spool lists recipient option and Execute
Enter button from the initial screen. A dialog box gets displayed. In the
Recipient field, enter a user's SAP office mail name, a SAP office
distribution list, a SAP user ID, or an external e-mail address. If desired,
activate the mailing options. The recipient receives all spool requests
generated by the job. If you want to save the recipient, choose Copy.
Page 5
Job Scheduling
Before any background processing can actually begin, background jobs
must be defined and scheduled. The scheduled time for a job runs is
one part of the jobs definition. There are several ways to schedule
jobs:
From Transaction SM36 (Define Background Job)
Created by: Samik Ghosh
Page 6
Page 7
Steps:
Call Transaction SM36 or choose CCMS Jobs DefinitionAssign a
job name. Decide on a name for the job you are defining and enter
it in the Job Name field.
Page 8
High priority:
2.
Class A
3.
Low priority:
Class C
In the Target server field, indicate whether to use system load
balancing.
Server name
Name of an SAP instance at which a background job should be run. The name has the
following format: <host name>_<SAP System name>_<SAP System number>, where host
name is the name of the server computer on which the instance is running, as specified in the
system profile parameter SAPLOCALHOST.
The name of each instance is specified in the system profile parameter rdisp/myname.
Example: hs0123_C11_55
In programming: As the table field EXECSERVER, shows the target instance selected by the
user for running a job. As the table field REAXSERVER, shows the SAP instance at which a job
was actually run.
1.
For the system to use system load balancing to
automatically select the most efficient application server to use
at the moment, leave this field empty.
Page 9
Define the jobs steps by choosing Step, then specify the ABAP
program, external command, or external program to be used for
each step.
Page 10
Save
the fully defined job
to submit it to the background processing system.
Page 11
Release the job so that it can run. No job, even those scheduled for
immediate processing, can run without first being released.
Page 12
Procedure
1. Choose the Start condition button at the top of the Define
Background Job screen.
2. Choose the button at the top of the Start Time screen for the
type of start condition you want to use (Immediate, Date/Time,
After job, After event, or At operation mode) and complete the
start time definition in the screen that appears.
Page 13
3. For the job to repeat, check the Periodic job box at the bottom of
the Start Time screen and choose the Period values button below
it to define the frequency of repetition (hourly, daily, weekly,
monthly, or another specific time-related period). Then choose
the Save button in the Period values screen to accept the
periodicity and return to the Start Time screen.
4. Once youve completed specifying the job start conditions,
choose the Save button at the bottom of the Start Time screen to
return to the Define Background Job screen.
No job can be started until it is released, including jobs scheduled to
start immediately. Since releasing jobs can be done only by a system
administrator from the job management screen (Transaction SM37) or
by other users who have been granted the appropriate Authorizations
for Background Processing, no unauthorized user can start a job
without explicit permission.
Page 14
Page 15
Job Start
Conditions
Explanation
Immediate
Date/time
After Job
After Event
At operation mode
Workday/Time (>>) The job will start on the specified day of the month
(for example, the third to last day of the month).
By specifying the appropriate SAP factory calendar,
Page 16
Periodicity:
Repetition
Specifying
Automatic
Job
To run your job not only at a particular time, but also to repeat it at
regular intervals, you can specify a periodicity, or frequency of
repetition. This can be specified in Define Background Job in
Transaction SM36 (CCMS Jobs Definition).
Start the process of specifying when the job will start by
choosing the Start condition button.
Choose the button at the top of the Start Time screen for the
type of start condition you want to use (Immediate, Date/Time,
After job, After event, or At operation mode) and complete the
start time definition.
For the job to repeat, check the Periodic job box at the bottom of
the Start Time screen and choose the Period values button below
it to define the frequency of repetition (hourly, daily, weekly,
monthly, or another specific time-related period).
Choose the Save button in the Period values to accept the
periodicity and return to the Start Time screen.
When a periodic jobs start time is After event, the system repeats the
job every time the relevant event is triggered.
Page 17
Page 18
Page 19
Page 20
Page 21
Page 22
Page 23
a.
b.
c.
d.
e.
f.
Page 24
On-line reports:
Exactly the same configuration can be maintained for any output
produced from R/3. If a user clicks Parameters button on a SAP
Printer selection dialog, it allows specifying all the parameters as
described in Scheduling background jobs section. Thus any output
created by an online report can be saved and accessed by any user
authorized to access that spool
Access to reports output:
Page 25
Page 26
Page 27