Saturday, February 18, 2012

BACKGROUND PROCESS


It is used to run the expensive programs, reports that consumes more time in the background mode. i.e. a job is scheduled to run at a specific time or periodically.

Example: Daily report, Weekly sales report or expensive to run in the peak hours so they are scheduled to run in the background mode during off peak hours.

Process Flow

          1. User submits the request via dispatcher to a WP.
          2. The Dialogue work process handles the request and updates the tables
          3. Tables TBTC* are used to store the BTC Jobs
          4. A program SAPMSSYS starts in the dialogue mode at frequency that is defined in the parameter rdisp\btctime=60Sec
         
SAPMSSYS - Checks for every 60 sec into the TBTC* table.

* To delay the BTC processing increase the time as much as possible.
Example :    100000 seconds 27Hrs
                   RZ11 (rdisp/btctime)
Refer - BTCTRNS1 from SE38
We can also use BTCTRNS2 to resume the background jobs (Execute the program)

          5. BWP looks into the table and identify the jobs which are in the Ready State.
          6. BWP runs the job in the Active mode till completion/ Cancelled.
              BWP are defined by using rdisp/wp_no_btc=2 (Min 2 per system)
          We can increase as many as possible depending upon the resources.

** Note: We can pause jobs by setting the value to 0 zero **

BWP jobs are defined in SM36
Specify Jobname: Daily report
           JobClass: C                             A, B, C (High, Medium, Low Priority)

Class A requires a dedicated BTC of class A which are defined in operation modes.
Class B has medium priority over class C jobs
Class C jobs runs with Normal Priority

JOB STATUS

1. Scheduled:         The job is defined but time to execute is not specified.
2. Released:  The time to execute is specified
3. Ready:      The Time to run the job is reached
4. Active:     BWP processing the task
5. Cancelled: The job is cancelled
6. Completed:        The job is completed or finished

Execution server - Name of the instance that provides BWP to run the job
                             Exec Target - Lolla_<SID>_00
                             Click on step

JOB STEPS
                   We need to specify the following for the JOB Execution
1. ABAP Program
2. External Command
3. External Program

1. ABAP Program - Is a predefined program that will be run in the background with user inputs as variants.

Variant - Is a predefined value that is populated during the runtime.

Eg: consider RSPO1041            from SA38
      Goto SA38 and define variant for 7 & 15 days
      Prog: RSPO1041
      Variant: lolla              SAVE

Click on start condition           - IMMEDIATE or DATE....


2. External Commands: The job can be executed by external commands which are defined in SM49/ SM69. These commands are OS commands that will be executed at command level.

Eg: BRBACKUP, BRARCHIEVE, BRRESTORE, BRCONNECT
          Use DB13 to schedule the jobs. The jobs in DB13 uses OS Commands.

3. External Programs:
                                      NAME: Name of the program
                                      Parameter:
                                      Target Host:

Name : Specify the name of the program and the parameters. Specify the name of the target host.
          Specify the start condition
Immediate/ Periodic/ Jobstart, Event (SM62)/ Operation. Modes.

Job Started: When dependent job started this gets triggered.
Event: When an event triggered in SAP it also triggers the job as well

Reactions:

0 comments:

Post a Comment