Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why Background Processing?

Similar presentations


Presentation on theme: "Why Background Processing?"— Presentation transcript:

1 Why Background Processing?
Reasons for Background Processing Reducing load on dialog workprocesses Scheduling regular activities B D Dispatcher vs Mon Tue Wed Thu Fri Sat Sun Dialog work processes are intended for dialog processing. For this reason, the duration of a dialog step is limited. Background processing is intended for operations that require a longer time to run. Background processing is also suitable for activities that are scheduled to run regularly, for example database backups or financial evaluations.

2 What is a Background Job?
A job consists of one or more steps A job step is one of the following: ABAP program (maybe with variants) external command external program One job is processed by one background workprocess Job 2 Job 3 Step 1 Step n A job can be triggered There are 6 priorities: Class A job with target server Class A job without target server Class B job with target server Class B job without target server Class C job with target server Class C job without target server high 12 6 7 8 9 10 11 1 2 3 4 5 by time Priority A background job consists of one or more steps. A step can be: An ABAP program An external command An external program Each job is processed without interruption by a single background work process. A job can be triggered to run: At a predefined date and time At the occurrence of a predefined event Background jobs can be prioritized as: Class A (high priority) Class B (medium priority) Class C (low priority) Jobs allocated to target servers have higher priority than untargeted jobs. by event low

3 Defining a Job Using the Job Wizard
Transaction SM36 Job Wizard General job information Define a step Define start conditions Task flow The Job Wizard is an easy way to create a job. Step-by-step dialog screens guide you through the process. You can use the navigation buttons go back to previous steps. On the last screen, you will see what you have defined before you save Start condition of a job could be one of th 1.) immediately - meaning as soon as pos 2.) based on exact date time assignment 3.) after another job 4.) after an event 5.) when a certain operation mode switch Immediately Date/time After job After event At operation mode switch Start on workday Job not released Job view Congratulations! You have successfully defined a job. Choose 'Done' to actually create the job in the system. You can also choose 'Back' to revise the job definition or Cancel' to cancel the whole process. Here is the job you have defined: Job name : GULP Job class : C - LOW PRIORITY Target server : To define a new job, use transaction SM36. From Release 4.6A, you can use the Job Wizard to define new jobs as follows: Specify job name, class, and optional target server Define a job step (a step can be an ABAP program, external command, or external program) Add further steps (if necessary) Start condition (time or event based) Complete the definition The Job Wizard allows you to go back and make changes at any point during the definition process. Back Complete Cancel

4 Start Conditions of a Job
12 Time based 11 1 Event based 10 2 9 3 8 4 7 6 5 Immediate once or periodically if periodic, exceptions possible At Date/Time On chosen workday (per month) After event once or periodically with or without parameter After job status dependent At change of operation mode Job 1 Job 2 Day Night The start conditions of a job can be time based or event based. Time based: Immediate At date/time On a chosen workday (defined as a certain workday per month) All time-based start conditions can be periodic. That is, a job can be performed at regular, defined time intervals. Days that are not workdays can be treated as exceptions. Parameter rdisp/btctime specifies the time interval of the job scheduler. Event based: After event (optional parameters can be used to further specify events) These can be periodic. That is, the job can be triggered every time the event occurs. After job (this can depend on the status of the previous job) At change of operation mode (for example, between day and night) Parameter rdisp/btcname specifies which application server handles events triggered from within R/3. rdisp/btctime rdisp/btcname

5 Executing Programs as Job Steps
R/3 System External Command ABAP Program External Program No selection screen With selection screen predefined within R/3 Operating system Command Parameters Any command on Operating System level + Variant sapxpg sapxpg A job step can be any one of the following. ABAP program Any ABAP program that generates a list can be used as a job step. If the program includes a selection screen, you must create a variant before you can let it run in the background. A variant is the result of assigning definite values in the fields that appear in the ABAP program selection screen. The list is stored in the R/3 spool system. When you define the step, you can set the print parametsrs (for example, output device) and a spool list recipient (this is a SAPoffice addressee). External command An external command is any non-R/3 program, script, or command that is executed at operating system level. Since these commands are defined in R/3 by the system administrator, the administrator use R/3 authorizations to limit the scope of the commands and their availability to R/3 users. External program An external program is also any non-R/3 program, script, or command that is executed at operating system level. The system administrator has not previously defined these programs in R/3 and no check is made for critical or dangerous programs. In the latter 2 cases, the programs are called up at the operating system level by program sapxpg. The programs are processed synchronously (job waits for termination of the external program) or asynchronously (next job step is processed immediately). The output (stdout and/or stderr) of the external program can be taken up in the job log. External Program External Program Operating System

6 Status of a Job Scheduled Change job Released Ready Active Monitor
Job log Spool list (only for ABAPs) The job status can be any of the following: Scheduled: job is created but has no start condition Released: job is completely defined and waiting for selection Ready: job has been selected for execution Active: job is being executed by a background work process Finished: the entire job has been successfully executed Canceled: job terminated with problems As long as a job has status scheduled or released, it can still be changed. If execution of a job has already started, its progress can be monitored in the job log. If the job contains ABAP programs, their output is stored in spool lists. To create the steps of a new job from an existing job, choose Copy. Finished Canceled Use Copy to create a new job

7 Operation Modes: Concept
NIGHT Background processing 12 9 6 3 11 1 7 5 8 4 2 10 Dialog processing 12 9 6 3 11 1 7 5 8 4 2 10 BTC DAY Typically, customers require more dialog processes during the day and more background processes during the night. To adjust the proportions of the various R/3 work processes to suit different phases of system activity, you can: Maintain the instance profile and restart the system (for unusual changes) Define operation modes and use the operation mode switch (for daily changes) Operation modes optimize system resources for different phases of system activity. Operation mode switching reconfigures your R/3 System dynamically, so you do not need to change the instance profiles for your server and you experience no system downtime. An operation mode configures the use of resources for all the instances in your R/3 System based on: The services or work processes you need The time interval you choose

8 Job Monitoring: Text Form
Job overview and path to more details Spool list Job log Selection criteria Status … Job details Double-click on line for ... To monitor jobs, call transaction SM37. From Release 4.6A, the initial screen offers an extensive range of selection criteria. For example, you can select jobs by specifying one of their steps. To list event-based jobs, you must specify an event. This job list presents the user selection at the top of the screen. The ABAP List Viewer (ALV) is used to display the list and enables you to store multiple display variants. From the job overview, you can navigate to various detailed job-related views: The job log enables you to monitor the progress of a job. The spool list contains the output of ABAP programs, if any. Job details include the job definition, execution time, and background work process number.


Download ppt "Why Background Processing?"

Similar presentations


Ads by Google