Batch 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

Batch job scheduling in SAP
Created by: Samik Ghosh Page 1

Batch Job Scheduling in SAP

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 user’s 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:

Created by: Samik Ghosh

Page 2

For example. the system administrator. the work of online users will be hampered or stopped. For starting ABAP job scheduling function. If a user is authorized and has specified a start date or selected "start immediately. Authorized users can change start time. the initial screen of the SAP Job Wizard appears. First Step Initiate the job scheduling function. After this. you can check whether your job was executed successfully and display a log of any system messages. From the Application toolbar. choose the wizard button. Scheduling background processing is a two-step process:  Scheduling the program  Releasing the job This needs to have a special authorization for releasing and scheduling the job. The Job Wizard is available only from the standard job scheduling function. Created by: Samik Ghosh Page 3 . A program can be scheduled as a separate job or you can append it to an existing job. You cannot schedule a job unless and until you have a release authorization. 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.Batch Job Scheduling in SAP  Definition of programs  Its start time  The printing specification for getting the prints as required After this." he or she can release the job. supervises the release of these jobs. Generally. Often. which has not yet been processed. However. this can adversely affect online operation and should be avoided. Background process can be run while doing some other online work. navigate to ABAP Editor and choose Program menu bar option->Execute option->Background option. if you run a program that locks the database. Using the Job Wizard you can define your job. long-running reports are scheduled automatically or semi-automatically for background processing. Second Step Now define a job. who organizes and monitors background processing. Many users are also authorized to schedule background processing of reports. For starting a standard job scheduling function choose the following: Administration menu bar option->CCMS option->Jobs option->Definition option.

during the night or other periods of low load on the R/3 system. the R/3 system terminates the processing of the report automatically. Mostly ABAP/ 4 reports do not require any scheduling. in which the process is running. In this step you have to check the status of your job. For this you have to Select – Created by: Samik Ghosh Page 4 . you need to choose a variant for your report. For this you need to choose System menu bar option>Own jobs option. Only authorized users can release the job. Advantages of Background Processing Background processing system has many advantages. On the other hand. When it displays the message "Job saved" it means the job has been successfully scheduled. the SAP session. Fourth Step This is the last step of scheduling. background processing is an efficient way to execute longrunning jobs. For interactive sessions. otherwise your system administrator will release your job. the R/3 system starts the report in the background. We know that a job must be released before it is scheduled. whenever a report exceeds that specified limit. in background processing of the system you can schedule the processes. i.e. Processing Scheduling ABAP Jobs For scheduling ABAP job. the SAP System has a built-in time limit. you have to save the job. a report or external program can run at any scheduled time when R/3 system is active. the system uses the options saved with your user account. However. Therefore. However. the SAP System is not tied up or blocked. note that this report can be overwritten in case you want to enter different report to be run. This is the only way to run long-running ABAP/4 reports. when you run a report in the background. in a non-interactive mode. is always blocked for any further inputs.Batch Job Scheduling in SAP Third Step Now. Printer specifications can be set for output from the report. In case you do no set the printer options. since such reports are automatically scheduled for execution in the background system. First. The report name that will run gets filled in automatically. Running the report in this manner has no influence on your interactive work with the R/3 system. Third. Automatic periodic repetition of the jobs can be scheduled using background-processing system. if you run the process in the interactive session. Second.

first specify a recipient for spool requests generated by your job on the screen. The spool output is automatically mailed to this user or distribution list. Now you can either execute immediately (using Execute immediate) or schedule the job (using Schedule) at some specified date and time. no job can be started until it has been released. Lastly. You have to use possible values arrow to choose from the available events. The recipient receives all spool requests generated by the job. For option Immediate. Scheduling Standard Jobs For scheduling standard jobs. Save the start time and return to the first screen. And if the option is "After event" then the job starts when the selected events occur. Specifying a Recipient For specifying a recipient. You can also specify your job to be restarted periodically. a SAP user ID. Specifying ABAP Program to Run in Background Created by: Samik Ghosh Page 5 . If the option is "After job" then the jobs starts when another job that you specified has been completed. If the system asks for any additional information you have to enter that information. After saving the start time you can return to the job Identification screen. If you want to save the recipient. activate the mailing options. select Spool lists recipient option and Execute Enter button from the initial screen. For the option "At Operation Mode" the job starts when the selected operation mode becomes active. You can confirm the start specifications using the Check function in the Start time option. choose the time (Start time) at which you have to start the job. To access the more complete function choose – Goto option->Define job. enter a user's SAP office mail name. the effect is that the jobs starts immediately as soon as you save the jobs definitions. The system displays a screen where you can give your specification. In the Recipient field. A dialog box gets displayed. For different start time option for background jobs the effects are different. if you choose "Start on workday" as the Start time option. If desired. For the date/time the jobs does not start until the date and time are specified. or an external e-mail address. Start time option allows you to repeat your job automatically. You need to use the possible values arrow to choose an operation mode. Even if you specify immediate start. Next.Batch Job Scheduling in SAP System menu bar option->User profile option->User defaults option for displaying these options. a SAP office distribution list. your job starts on a particular workday. choose Copy.

So your name will appear in the User field. It is advisable to use default settings for these options. Choose variant from the Variant list. you can specify whether you want the report output to be held in the SAP spool system or have it printed as soon as the job has run. arguments required by the program. Step by Step Process to schedule Batch Job (With Screenshots) Transaction codes related to background jobs creation and processing are:SM35 (Job Overview) SM36 (Job creation) SM37 (Job selection and execution) Job Scheduling Before any background processing can actually begin. You can determine the host name using the host name command on the target host system. In case there is another user authorized for scheduling the job. by default. To run an external program. If you are authorized for background processing. With Print specifications. There are several ways to schedule jobs: From Transaction SM36 (Define Background Job) Created by: Samik Ghosh Page 6 . save the job step and return to the job identification screen. as well as other runtime options by using Control flags. The Users field will. Now choose ABAP and enter the name of the report. enter any additional arguments required for the command. The host system on which the command should run and the type of operating system at the host should be specified. Specify the language you want the report to be in. Then choose External command and enter the predefined SAP name. you can also choose External programs as a job step option. For external command. and the name of the host system on which the program is to run. The scheduled time for a job runs is one part of the job’s definition. To do it you should add a job step for each program. by default. After this. program or script name. the job step will run under your SAP System authorizations. you can change this default option by entering another user name. You can also specify how the output from the external program should be treated.Batch Job Scheduling in SAP ABAP program or external program can be specified to be run in the background. background jobs must be defined and scheduled. More than one program can be executed with a single background job. display your name. then the default name is changed and system displays the name of the other user. But if the program is running under the authorization of another user. indicating that the user (you) is authorized to run this program. enter the exact path. If required.

This is best for users already familiar with background job scheduling. Through an external interface. start from Transaction SM36 and either select Go to → Wizard version or simply use the Job Wizard button. Steps to Schedule Batch Jobs Scheduling Background Jobs Specifying Job Start Conditions Job Start Management Periodicity: Specifying Automatic Job Repetition Managing Jobs from the Job Overview Jobs and Job Steps Explained Scheduling Background Jobs You can define and schedule background jobs in two ways from the Job Overview:  Directly from Transaction SM36.Batch Job Scheduling in SAP With the "start program in the background" option of either Transaction SA38 (ABAP: Execute Program) or transaction SE38 (the ABAP editor). To use the Job Wizard. This is best for users unfamiliar with SAP background job scheduling.  The Job Scheduling Wizard. Through the background processing system’s own programming interface (Many SAP applications use the internal programming interface to schedule long-running reports for background processing). Created by: Samik Ghosh Page 7 .

Created by: Samik Ghosh Page 8 .Batch Job Scheduling in SAP Steps: Call Transaction SM36 or choose CCMS → Jobs → Definition→Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.

or “Job Class”: 1. The name has the following format: <host name>_<SAP System name>_<SAP System number>. The name of each instance is specified in the system profile parameter rdisp/myname. shows the SAP instance at which a job was actually run. Created by: Samik Ghosh Page 9 . Server name Name of an SAP instance at which a background job should be run. For the system to use system load balancing to automatically select the most efficient application server to use at the moment.Batch Job Scheduling in SAP Set the job’s priority. High priority: Class A Medium priority: Class B 3. 2. Example: hs0123_C11_55 In programming: As the table field EXECSERVER. Low priority: Class C In the Target server field. 1. indicate whether to use system load balancing. leave this field empty. As the table field REAXSERVER. as specified in the system profile parameter SAPLOCALHOST. where host name is the name of the server computer on which the instance is running. shows the target instance selected by the user for running a job.

Batch Job Scheduling in SAP 2. specify the email address. Choose the Spool list recipient button. or external program to be used for each step. external command. To use a particular application server to run the job. Define the job’s steps by choosing Step. enter a specific target server. If spool requests generated by this job are to be sent to some one as email. or be periodic. Created by: Samik Ghosh Page 10 . then specify the ABAP program. check the box at the bottom of this screen. Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat.

you'll manage jobs from the Job Overview. reschedule. When you need to modify.Batch Job Scheduling in SAP Save the fully defined job to submit it to the background processing system. or otherwise manipulate a job after you've scheduled it the first time. Created by: Samik Ghosh Page 11 .

even those scheduled for immediate processing. Created by: Samik Ghosh Page 12 . No job.Batch Job Scheduling in SAP Release the job so that it can run. can run without first being released.

2. Created by: Samik Ghosh Page 13 . Choose the button at the top of the Start Time screen for the type of start condition you want to use (Immediate. After job. you must specify conditions that will trigger the job to start. Specifying Job Start Conditions When scheduling a background job (either from Transaction SM36. Date/Time. Define Background Job or CCMS ->Jobs-> Definition). Procedure 1. or At operation mode) and complete the start time definition in the screen that appears. After event.Batch Job Scheduling in SAP After Saving Below message appears. Choose the Start condition button at the top of the Define Background Job screen.

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. including jobs scheduled to start immediately. no unauthorized user can start a job without explicit permission.Batch Job Scheduling in SAP 3. monthly. daily. weekly. 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. Once you’ve 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. 4. or another specific time-related period). For the job to repeat. Created by: Samik Ghosh Page 14 . No job can be started until it is released. Then choose the Save button in the Period values screen to accept the periodicity and return to the Start Time screen.

even those scheduled to start immediately. Event-Driven Job Scheduler: This scheduler starts whenever a background processing event is triggered." The scheduler checks for any jobs that have been scheduled to wait for a certain event or for the event argument and starts these jobs once the event occurs. value RELE) Created by: Samik Ghosh Page 15 . the system can be configured so an administrator can check jobs before releasing them to run. These jobs are managed as jobs whose start time has already arrived and start running as soon as possible. No job can be run until it has been released. Both types of start condition (see below) have their own SAP job scheduler: one is time-driven and one is event-driven. Events can either be triggered within the SAP System or generated externally at the operating-system level. • The job has been released to run. Event-driven jobs are those that have been scheduled with the one of three start conditions: After event. In order to respond to external events. The release requirement can also be turned off on a per-user basis. This 60-second interval can be changed in the system profile parameter rdisp/btctime . the scheduler runs every 60 seconds on each SAP server that has at least one work process available for background processing. for example. they trigger the job to run in a background work process. for example). The time-driven scheduler will also take over the responsibility of starting event-based jobs if such jobs cannot yet be started when the defined start condition occurs (if. Events are automatically passed by the message server to an active background processing server. Trusted users can be given a special authorization (authorization object S_BTCH_JOB (Batch Processing: Operations on Batch Jobs). Time-Driven Job Scheduler: This scheduler runs periodically to check for jobs that were scheduled to run based on a certain start time (a particular date. If they find an eligible job. at operation mode or after job. Start Eligibility: A job is eligible to start when both of the following are true: • The start condition specified for the job is met. To monitor and control what jobs are submitted to run in background processing. no free background work processes are available when the start condition is met).Batch Job Scheduling in SAP Job Start Management Any job can be scheduled to start based on either a certain start time or any of several events in the background processing system. An example of a background processing event is "Job completed. Both schedulers run in dialog work processes. By default. the SAP System must be active. An event triggered by an external program will be lost if the SAP System is not running. Background processing events have nothing to do with workflow events and have no systemwide meaning.

The job is triggered by the specified event. The job will start when the specified operation mode becomes active in the SAP System. For example. For example. By specifying the appropriate SAP factory calendar. a data transfer program that generates a batch-input session can. once the session has been completely generated. The job will start on the completion of the specified job.Batch Job Scheduling in SAP which will automatically and immediately release any job scheduled by that user. One use of this feature is to prevent periodic jobs from running when they should not. Note: Jobs scheduled to start when a preceding job completes cannot be specified as "Periodic jobs". Created by: Samik Ghosh Page 16 . descriptions of which follow. use an event to trigger another job that processes the session. you will keep this job from being started during the day. subject to job priority and the availability of background work processes. This start condition lets you define a sequence of individual jobs to model complex activities in your system. when dialog users are active and fewer system resources are available. Users granted the appropriate authorizations for background processing can have their jobs released automatically as soon as they are scheduled. Job Start Conditions: Job Start Conditions Immediate Explanation This job will start as soon as possible. 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). a routine clean-up job scheduled to run only at night is delayed. without special attention from a system administrator. You can specify whether the preceding job must complete successfully or not. You can further define a timeframe in which the job will run by specifying a time later than which a job will not run. subject to job priority and the availability of background work processes. The job will start at the date and time specified. By defining a start-time window.

you can specify a periodicity.  Start the process of specifying when the job will start by choosing the Start condition button. or have the job be skipped on that day entirely. or frequency of repetition.  For the job to repeat. or another specific time-related period).Batch Job Scheduling in SAP your scheduling can accommodate the occurrence of holidays or other non-workdays. This can be specified in Define Background Job in Transaction SM36 (CCMS → Jobs → Definition). you can have the job started on the workday before or after the actual scheduled date. Verify that the calendar you choose has been correctly defined. monthly. you can review system’s error messages in the job log of the terminated job. daily. If. You can further specify how the job should be handled if the start day lands on a non-working day.  Choose the “Save” button in the Period values to accept the periodicity and return to the Start Time screen. 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. the system repeats the job every time the relevant event is triggered. Periodicity: Repetition Specifying Automatic Job To run your job not only at a particular time. the calendar ends with the current year and your job is to be started next year. Created by: Samik Ghosh Page 17 . or allow the job run in anyway. for example. After job. If a calendar problem occurs. Date/Time. weekly. the job will terminate abnormally.  Choose the button at the top of the Start Time screen for the type of start condition you want to use (Immediate. but also to repeat it at regular intervals. When a periodic job’s start time is After event. or At operation mode) and complete the start time definition. For example. After event.

starting when the job repetition is scheduled.Batch Job Scheduling in SAP A periodic-job series is not interrupted if one of the jobs terminates abnormally. Scheduling a Created by: Samik Ghosh Page 18 . Start-Time Windows and Job Repetition If you schedule a job with a start-time window (that is. The background processing alert monitor warns you if any jobs abort. the background processing system adjusts the start-time window so that its length remains constant and is relative to the respective start time. there will be no following job. If you specify a start-time window of six hours. You cannot use the start-time window to limit the time of day during which a job is repeated. then each repetition of the job will also have a six-hour start-time window. but if the job was not executed at all. a range of time rather than a particular time) and want to have the job repeated.

choose CCMS ->Jobs>Maintenance or call Transaction SM37. will have a start time window of 1:00 to 9:00. To limit the job to the time period between 10:00 and 6:00. you can choose from a wide range of management tasks:  To copy a single existing job. The job will be triggered to repeat only after it has started the first time. To limit an automatically repeated job to a particular time window. Your program could schedule a separate job for each repetition that falls within the time period. canceling and deleting jobs. repeating a job. None of the jobs should be periodic.  To reschedule or edit job steps or attributes of a single job. and copying existing jobs. the system schedules it again for 11:00. You'll need to complete this Job Selection screen to define the criteria for the jobs you want to manage. central area for completing a wide range of tasks related to monitoring and managing jobs. it adjusts the start-time window to remain the length you specified. The starttime window for the job has been adjusted to 11:00 and 7:00. reviewing information about a job. Created by: Samik Ghosh Page 19 . scheduling. rescheduling and editing jobs and job steps. the system first displays the Select Background Jobs screen. comparing the specifications of several jobs. the full start-time window will be applied to all of the repetitions of the job according to the rules above. As the system schedules each repeated job. screen is the single. At 10:00. The repeat job for 1:00am. choose Job ->Copy. Procedures To display the Job Overview screen. for example. For example. rescheduling. canceling a job's release status. or Job Maintenance. The system allows you to display ABAP programs and variants. Each job step can execute an ABAP or external program. Other variants or authorizations may be used for each job step. Once you've selected jobs to manage. checking the status of jobs. Rather. Before entering the Job Overview screen. debugging an active job. At the same time. You can scan a program for syntax errors. including defining jobs. you schedule a job to run between 10:00 this evening and 6:00 tomorrow morning and to be repeated every hour. choose Job  Change. you’ll need to write a program yourself to schedule the jobs. A job step is an independent unit of work within a background job. You can also display the authorizations for an authorized user of an ABAP job step. Managing Jobs from the Job Overview The Job Overview. reviewing job logs. you could define a job that schedules separate jobs to run each hour from 10:00 to 6:00. and releasing a job so it can run.Batch Job Scheduling in SAP repeatable job to run between 10:00pm and 6:00am does not guarantee that the job will be repeated only within this time period. the job starts.

To cancel a job from running but keep the job definition available.. If an active job seems to be running incorrectly (e. or the repetition interval  other jobs linked to the current job. select the job or jobs from the Job Overview list and choose Job ->Release -> Scheduled. You will be able to capture a background job only if you are logged on to the SAP server on which the job is running.g.Batch Job Scheduling in SAP  To repeat a single job. To review information about a job. select the jobs from the Job Overview list and choose Job->Compare jobs. select the job or jobs from the Job Overview list and choose Job ->Cancel active job. To release a job so it can run. and then either release it again or stop it altogether. Only a single selection is allowed. To compare the specifications of more than one job. To check the status of jobs. running for an excessively long time). select the job or jobs from the Job Overview list and choose Job ->Delete. select a job from the Job Overview list and choose Go to ->Release. This allows you to either change the job status back to Planned or cancel the job altogether. Details displayed can include:  current job status  periodicity. select the job or jobs from the Overview Job list and choose Job->Check status. Created by: Samik Ghosh Page 20 . select a job or jobs with the status Completed or Canceled from the Job Overview list and choose Go to ->Job log. choose Job->Repeat scheduling. This is especially useful when a job has malfunctioned. then choose Job->Job details. Jobs with the status of Ready or Running cannot be deleted. To delete a job entirely. choose Job ->Capture: active job. select and mark the job. choose Job ->Job details. To review job logs. To find server information in the Job Overview. you can interrupt and analyze it in debugging mode in a background process.  To debug an active job. either as previous or subsequent jobs  defined job steps  spool requests generated by the current job To cancel a job's "Released" status.

the earliest possible start time for any job steps will be the start time for the job. and other global attributes also apply to the whole job. therefore. The results of each program's run can be seen in the job log. an external program to prepare the batchinput session and an internal program to process the session. to all job steps within a job. you can schedule several programs needed to complete a particular task as steps within a single job. with the advantage of the job being single logical container for all the steps needed to complete the task. Created by: Samik Ghosh Page 21 . For example. each of which consists of one or more job steps. Frequency of repetition.Batch Job Scheduling in SAP Jobs and Job Steps The work unit of the background processing system is the background job. That is. Jobs and job steps enable you to treat complex tasks as single units. You need to schedule or review only one background job in order to schedule or review any of the individual steps necessary for completing the task. Scheduling that one job schedules both programs. Some background processing attributes apply to entire jobs and. Creating a job made up of two steps lets you handle the two programs as a single unit. Assume that a particular data transfer with batch input requires that you start two programs. priority.

The type of external command and external program is unrestricted. Such programs can be run on any computer that can be reached from the SAP System. job steps run sequentially and synchronously in the order they're entered in a job: the first step starts. the abnormal termination of one job step does not roll back the work of a previously completed job step if this previous step was executing a commit. then the start of the next job step may overlap it. specifications  run under the authorizations of a separate user  use a different language  have its own runtime options (for programs external to the SAP System). is included in the job's log file. then the entire job fails. authorization-protected commands for end users. which are collections of ABAP modules. Specifications required for an external command or programs are: External command + Type of operating system + (Parameters) + Target host system External program + Parameters + Target host system Created by: Samik Ghosh Page 22 . ABAP programs can be used as job steps. In this case. particularly error messages. If any job step fails. too. or executable. There are two types of job steps: An executable ABAP program Only type 1. The specifications required for an ABAP job step are: ABAP program + Variant + Print and archiving parameters + Language An external command or external program This type of job step allows you to run programs outside the SAP System. the background processing system starts the next job step without waiting for a return code from the external program. and so on.Batch Job Scheduling in SAP To ensure that you can flexibly run individual programs. however. That is. Each job step can:  have its own spool. then the second step starts. Module pools and function groups. The only exception is when you schedule an external program to run asynchronously. or output. No further job steps are carried out. and is completed. External programs are unrestricted. directly entered commands reserved for system administrators. are not allowed. runs. and the job's status changes to Canceled. Output of non-SAP programs. External commands are predefined. you can set important attributes individually for each job step. meaning that you can use either compiled programs or scripts. such as handling of error output and synchronicity In general. Job steps run partially independently of each other’s status. Parameter passing to non-SAP programs is completely unrestricted except by the predefinition mechanism for external commands. If the external program runs long enough.

previous month) or organizational units (e.g. This change is required because not all languages are available with all code pages.Batch Job Scheduling in SAP Job Step Language If your SAP System runs with an Arabic. Cyrillic. The following parameters need to be maintained: Created by: Samik Ghosh Page 23 .g. or Asian character set. the job will not run. the spool parameters needs to be specified (Step-> Print Specifications->Properties) to secure the output of the report and help authorized users to find the spool request. Languages are assigned to jobs based on job steps.  While defining the step. If the job’s specified language is not available. Be sure that the language specified in the job step definition in each of these jobs is set to English (EN). Company codes). It is recommended to create a separate variant for each scheduled job to produce results for specific dates (e. then you may need to change the language specified in the standard background jobs listed above. a job needs to be created with a step using the report name and a variant for selection parameters. Scheduling Back ground Jobs  Background jobs are scheduled by Basis administrators using transaction SM36.  To run a report in a background.

b. e. Department – set to appropriate department/functional area name. d. Retention period – set to “Do not delete” if the report output needs to be retained for more Created by: Samik Ghosh Page 24 . This field can be used in a search later.Batch Job Scheduling in SAP a. Only users with matching authorization value in their profiles will be able to see the output. f. Time of printing: set to “Send to SAP spooler Only for now” Name – abbreviated name to identify the job output Title – free form description for the report output Authorization – a value defined by Security in user profiles to allow those users to access this spool request (authorization object S_SPO_ACT. c. value SPOAUTH).

The user must have at least BASE access (display). Thus any output created by an online report can be saved and accessed by any user authorized to access that spool Access to report’s output:  A user that had proper access (see Configuring user access above) can retrieve a job/report output through transaction SP01. the user must have S_SPO_ACT object in the profile with SPOAUTH parameter matching the value used in the Print Specifications of the job. Storage Mode parameter on the same screen could be used to immediately send the output to archive instead of creating a spool request. Configuring user access:  To access a report output created by a background job.Batch Job Scheduling in SAP than 8 days. download.  Levels of access to the spool (display. a user must have at least access to SP01 (Spool requests) transaction without restriction on the user name (however by itself it will not let the user to see all spool requests). To have that access the user must have S_ADMI_FCD authorization object in the profile with SPOR (or SP01) value of S_ADMI_FCD parameter (maintained by Security). it allows specifying all the parameters as described in “Scheduling background jobs” section. print once.  To access a particular job’s output in the spool. reprint. Once the archiving/document repository solution is in place the spool requests could be automatically moved to the archive/repository. Created by: Samik Ghosh Page 25 . On-line reports: Exactly the same configuration can be maintained for any output produced from R/3. etc) are controlled by SPOACTION parameter of S_SPO_ACT. If a user clicks “Parameters” button on a SAP Printer selection dialog.

• Department .  The following fields can be used to search for a specific output (Note that Created By must be blank when searching for scheduled job’s outputs) • Spool request name (suffix 2) – corresponds to a spool name in “Scheduling background jobs” section above). Created by: Samik Ghosh Page 26 . • Date created – to find an output of a job that ran within a certain date range.corresponds to spool Department in “Scheduling background jobs” section above). • Title – corresponds to spool Title in “Scheduling background jobs” section above).Batch Job Scheduling in SAP  The selection screen can be configured by clicking “Further selection criteria button (e.g.  Upon entering selection criteria. the user clicks the Execute button to retrieve the list of matching spool requests. to bring “Spool request name (suffix 2)” field or hide other fields).

• Click the “Display contents” button to preview the spool request contents. It will print it on a printer that was specified when a job was created.Batch Job Scheduling in SAP  From the spool list the user can use several function such as view the content of a spool request. print the spool request. • Click the Print button to print the spool request with the default attributes (usually defined with the job definition). A Print and Download functions are available from the preview mode. • Click the “Print with changed attributed” button to print the spool request with the different attributes (e. view attributed of the spool request. changing the printer name). (some functions may need special authorization. etc. Created by: Samik Ghosh Page 27 .g.