If you are a Workload Automation Administrator and you are involved in orchestrating SAP workloads, one of most frequent questions is: How do I control background jobs that are scheduled by end-users? This is definitely one of the top challenges in the Workload Automation area. End-user scheduled jobs that bypass a central scheduling are undermining all efforts to control the batch workload on a backend-system and can cause unexpected overloads. To make things more complicated, company policies often do not permit to limit scheduling authorization for end-user. The SAP scheduling environment suffers from a high number of background jobs scheduled by end-users that can reduce the efficiency of your SAP ecosystem. How can Workload Automation help you? By leveraging the SAP Job Interception feature, Workload Automation offers a strong SAP integration through the official eXternal Background Interface (BC-XBP 3.0), enabling a very sophisticated control over the jobs launched by the R/3 users from the SAP GUI. The Job Interception mechanism becomes active when the R/3 job scheduler is about to start an R/3 job, (i.e. when the start conditions of an R/3 job are satisfied). It checks the job parameters (job name, creator, client) against the entries in the R/3 table TBCICPT1, and when the job parameters match the criteria, the R/3 job status is set back to scheduled and the job is marked with a special flag, indicating that the it has been intercepted. When Workload Automation has been set up to handle Job Interception, it periodically runs a job to retrieve the list of the intercepted jobs, and reschedules these jobs. In the rest of this blog, this job will be called Interception Collector. How do I set up Workload Automation to handle Job Interception in an R/3 environment? 1.) Activate the Job Interception feature of the BC-XBP 3.0 interface Run INITXBP2 ABAP report to configure the Interception version. The following options are available:
2.) Set up a Workload Automation job to periodically collect the intercepted R/3 jobs To define a Workload Automation job that collects and relaunches jobs, use the following syntax: ENGINE_NAME_HOSTING_XA#JOBNAME DOCOMMAND "WA_home/methods/r3batch -t HIJ -c ENGINE_NAME_HOSTING_XA -- \"-profile_id <profile_ID_number>\"" STREAMLOGON WAuser DESCRIPTION "Collects intercepted jobs on SAP ENGINE_NAME_HOSTING_XA" TASKTYPE UNIX RECOVERY STOP The Interception Collector job runs at periodical intervals (for example, every 10 minutes). It retrieves all the jobs that have been intercepted since the last run of the Interception Collector, and launches them again according to a template. 3.) Specify interception criteria in the R/3 system Interception criteria are set by using the SAP Criteria Manager for Workload Automation. Criteria Manager is a new feature with XBP 3.0. It enables the definition of criteria profiles for:
4.) Specify interception criteria on the Workload Automation side Interception criteria for each R/3 system are automatically hold in a separate file: CPUNAME_r3batch.icp Which is located in the WAhome/methods/r3batch_icp directory on the Workload Automation host workstation. This file is read by r3batch when it is executed by the Interception Collector, as described above. Each row in the file is considered as an interception criteria, having it the following fields: <client> <job_mask> <user_mask> <template> where <client>, <job_mask>, and <user_mask> correspond to the columns of the TBCICPT1 SAP table, and <template> is the name of the template which should be used by the Interception Collector to relaunch the R/3 job. Template files The template is a file with extension .jdf, located in the same directory as the interception criteria file, for example in WAhome/methods/r3batch_icp<profile_id>. The template file contains instructions for the Interception Collector about how to execute the intercepted R/3 job under control of Workload Automation. The syntax corresponds to the syntax of docommand conman command in Workload Automation. To edit this file, you can use any text editor. If the template field is empty, the template file default.jdf is used. If this file does not exist, the following instructions are used: alias=SAP_$RUN_$JOBNAME_$JOBCOUNT This means that the intercepted R/3 jobs are restarted immediately, due to absence of the at=... command, with the Workload Automation name composed of the string: “SAP_”, the current run number of the Interception Collector, the jobname and job ID of the R/3 job. To summarize, the instructions for restarting an intercepted R/3 job are retrieved from:
The interception criteria table on the R/3 side contains the following entry: 000*fa* The interception criteria file on the Workload Automation side contains the following entry: 000 * fa* at1700 The template file at1700.jdf contains the following entry: alias;at=1700 This means that all jobs started by the R/3 users in client 000 whose user name begins with “fa” will be intercepted. The Interception Collector will restart those jobs using the instructions from the template file at1700.jdf. For example, the R/3 jobs will be restarted at 17:00 with a random name, due to the alias command. Placeholders There is a number of placeholders that can be used in the template file and that are replaced by the Interception Collector at runtime: For example, the template: alias=ICP_$RAND_$JOBNAME_$JOBCOUNT_$CLIENT;at=1000 would instruct the Interception Collector to restart the R/3 job DEMO_JOB with job ID 12345678 on client 100 at 10:00 as WA job ICP_1432_DEMO_JOB_12345678_100. As a conclusion, the end-users can still schedule background jobs via transaction SM36, or by sending reports in the background, but the respective jobs are no longer executed: they are intercepted and managed by Workload Automation! Using Workload Automation as a single point of control to orchestrate and optimize your SAP jobs will help you integrate your SAP workload with the rest of your company workflow and will prevent unexpected overloads. Stay tuned for my next articles on SAP topics. If you need additional information, send an email to [email protected].
1 Comment
9/13/2019 09:48:08 am
If you really want to be productive, then you need to put in all of the hours the right way. If you cannot properly manage your workload, then you will never be able to reach your quotas. I hope that this blog helps you understand or at least get an idea of how important scheduling is. It may not be much, but it can really help you increase some free time for yourself, at least if you are good with it. Be more productive starting today.
Reply
Your comment will be posted after it is approved.
Leave a Reply. |
Archives
February 2025
Categories
All
|