You are on page 1of 7

Background Jobs

>>Background processing system allows users to work non-interactively, or offline. This non-interactive service is provided to the users through the background work process to run background jobs. >>The number of background processes is configured using the profile parameters in RZ10 with the rdisp/wp_no_btc ->RZ10 ->Profile: Enter Instance Profile name ->Version: Displays the changed version of the selected profile. ->Select Extended Maintenance ->Click Change Button ->Select rdisp/wp_no_btc parameter and change it to required number of processes. ->Click Copy Button ->Click Back Button ->Save ->Activate Profile [popup]: Yes ->Version Info: Click Continue ->Caution: Asks for restart of instance for the changes to impact: Click continue. Used? To process large amounts of data. To execute periodic jobs without human intervention. To run programs at a more convenient, planned time other than during normal working hours.

Difference between Dialog and Background Work process: S.No Dialog 1 Interactive or Online work 2 Screen Interpreter is available here. 3 Dialog work processes execute just one single dialog step at a time and become immediately free for the next user request [Resource distribution] It has a time limit to execute a job, specified by the parameter rdisp/max_wprun_time Initial memory is allocated in the Roll Area based on the Background Non-Interactive or Offline work Screen Interpreter is not available here as there will be no interactive work done. Background work process doesnt multiplex the job. It executes the assigned jog in single step. It doesnt have any time limit. Initial memory is allocated in the Roll Area based on the parameter:

4 5

parameter: ztta/roll_first.

ztta/roll_area, which is the available free space of the Roll Area.

Post Installation Activity: SM36 ->Click Standard Jobs Button ->Select All Standard Background Jobs listed ->Click Default Scheduling Button REORGJOBS->This table contains the information of the standard background jobs. Background User: SU01->User Type--System Profiles Type of Background Jobs: Time Driven Date/Time Immediate Event Driven After Job After Event Operation Mode Phases: 1. Schedule Phase: SM36 or System Menu>Services>Jobs>Define Jobs (Any Screen) SM36WIZ SE38 SM36 ->Job name: Enter Job name ->Up to 32 characters can be specified including letters, numbers and space character. ->Job names are Case sensitive, means Z_JOB and z_job are not same. ->Job class: [A/B/C] ->A-Class >Highest Priority ->We can reserve background work process for Class-A jobs, which ensures class-A jobs have free work processes for execution. ->This reservation can be done in RZ04, Operation modes need to be configured before reserving work

process for class-A jobs. RZ04 ->Click Instances/Operation modes Button ->Double click any mode ->Set Class-A value for reserving work process by pressing + Button. ->Save ->Save ->B-Class >Medium Priority ->C-Class >Normal Priority, it is the default priority. ->Status: Scheduled [By default it is displayed during scheduling a job] ->Exec. Target: ->If no value is specified, it will be executed in the available free application server in the logon group in which the job is being scheduled. -><Server_Group_Name>, it will be executed in the available free application server in the specified Server group. Server groups can be created using the T-Code-SM61. -><Particular_server>, the background job doesnt switch to any other available application server even if the background work processes are busy in the specified server. ->Spool List Recipient:? ->Click on the STEP Button ->User: By default it will be automatically filled with the job schedulers name. This user will be used by the system to check the authorizations for the running job. One can enter another user name only if he is authorized with S_BTCH_NAM object. In general, a separate background user is created with sufficient privileges to run the background jobs with SYSTEM type. ->ABAP Program Name: Enter ABAP Program name Variant: A variant is a storage box which stores the selection fields or input values of an ABAP report. Variant can be created using the transaction SE38. ->Enter Report name ->Select Variant radio button & Click Change ->Variant: Enter name for variant and click Create button. ->Enter input for Values and Attributes ->Click Copy Screen Assignment and Save. ->External Command Name: Specify the job name defined earlier(SM69)

Parameters: Specify the parameters or any additional flags for the command. Operating System: Target Server: Specify host where the command needs to be executed. Both external commands and external programs are executed by means of the sapxpg program. External commands to be scheduled must have been previously defined by the system administrator using SM69. Command created in SM69 can be execute using SM49. SM69 ->Select Command list Menu->Display-Change ->Select Edit Menu->Create Command Name: Specify a name for the command, say Z_R3TRANS Operating system command: Specify OS command name, say r3trans. ->Save ->External Program It can be any compiled or executable program, shell script, and so forth Name: Enter name and path of the external program, say /vixos15/home/RD1ADM/copy.bat. Parameter: Specify the parameters or any additional flags or any options for the program. Target host: Specify host where the command needs to be executed. This host must be reachable from the R/3 server and where the program resides can execute the program itself. 2. Release Phase: SM37 or SM36 (Goto Menu>Job Selection) or System Menu>Services>Jobs>Define Jobs (Any Screen) SM37 ->Select the job which is to released and Click on the Release Button. ->Immediate: These jobs will be sent for execution as soon as they are released. Users not having authorization for releasing jobs cannot use the immediate start option. ->Click Save Button. ->Date/Time: ->Schedule start: Enter date and time. Specify date/time to process the job. ->No start after: Enter date and time. The system allows for restricting the job not to start after a specified date and time.

->Click Save Button. ->After Job: After job start option lets you specify starting a background job after the execution of a previous job. These are quite useful for defining cascaded jobs which need to be executed one after another. ->Name: Specify a Job name. ->Start status-depend ->Selecting the checkbox indicates the background system to start job only if the previous job was successful. ->After Event: These are quite useful especially in situations where there is an interface or relation between operating system process and SAP. ->Name: Specify the event name which is being created using SM62. SM62-To create new event. ->Select User event names : Maintain & Click Enter Button. ->Click Create Icon or Press F5 ->Enter Event name & Description. ->Click Save Icon. ->Events can be trigger in SAP level, OS level and in an ABAP Program. ->SAP level: SM64-To trigger an event. ->Operating system level: sapevt <event_name> name=SID nr=00 or Sapevt <event_name> pf= path of instance profile -> ABAP Program : BP_EVENT_RISE[event_name] ->At operation modes: ->Name: Enter the operation mode name. ->Job will be executed when system switches to this particular mode. Periodic Values:? Print Parameters:?

3. Ready Phase: The start date and time has arrived and the job is

waiting to be executed. BTCDELAY, this table displays the jobs delayed, which are READY for execution. SAPMSSY2, this SAP Standard program will bring the background job status from RELEASE to READY, which runs with an interval specified by the parameter rdisp/btctime when the execution time is reached i.e., it places the job in the background job queue.

Background jobs can not be modified in this phase; it can be paused or deleted. ->BTCTRNS1, this report is used pause or suspend the jobs which are in Release and Ready status. ->BTCTRNS2, this report is used resume the suspended jobs.

4. Active Phase:
The job is running, being executed. ABAP Reports syntax, and variant values and user authorizations will be checked in this phase. Jobs running can only be cancelled in this phase.

5. Finished/Cancelled: Modifying Sheduled Jobs:? Delete jobs:? Job logs:? Analyzing Cancelled jobs:?

Summary: Tables: TBTCO TBTCP REORGJOBS BTCDELAY TVARV T-Codes: SM36

SM36WIZ SM37 SM61 SM62 SM64 SM69 SM49 SO01 SE38 [Job Scheduling/Variant creation] SU01 [Background user] Profile Parameters: rdisp/wp_no_btc rdisp/max_wprun_time rdisp/btctime rdisp/btcname stat/btcrec Reports: SAPMSSY2 RSBTCDEL BTCTRNS1 BTCTRNS2 Authorizations: S_BTCH_ADM S_BTCH_NAM S_BTCH_JOB

You might also like