|
Blogs
IntroductionIn this blog I will not describe how to setup the Job Monitoring of the Business Process Monitoring Framework for SAP CPS Job Chains as this is demonstrated in a tutorial of the SAP Online Knowledge Products for the Process Scheduling Adapter. In said tutorial the Job Monitoring is configured for a simple CPS Job Definition and not for a Job Chain, but that makes no difference as the Job Chain is a black box for SAP Solution Manager (for now). It is therefore possible to use the available alerts like Cancellation or Run Time to monitor complex Job Chains and simple Job Definitions. What will be demonstrated is how to define generic CPS Job Chains to allow end users to request new simple Job Chains. The purpose is to mimic an ABAP/SM36 job with several steps and this is also explained in SAP note 1345018. In the second part of this blog I will show how to use the Job Management Work Center to monitor the status of CPS jobs. Requesting new Job ChainsAt the beginning of the Job Scheduling Management process there is always a Job Request. Since a CPS Job Definition executes only one program, a Job Chain has to be requested to offer equivalent capabilities as transaction SM36, which allows a job to consist of several steps. To mimic several job steps, a new Job Chain in created in SAP CPS.
To the new Job Chain two steps will be added
and each step executes a single Job Definition of type SAPR3, e.g. SAP_AbapRunPrint.
Since the Job Chain shall be specified in the Job Request by an end user, the parameters of the Chain and its Jobs have to be exposed. Therefore the next step is the definition of Job Chain parameters, e.g. program, variant and user, for each step of the Job Chain. In the example below, I also assigned a default report BTCTEST because this allows the definition of n steps chain for which only m (m<n) reports were supplied by the end user. Note that it is also possible to define parameters that are valid for all steps, e.g. print parameters. Just map such parameters to all steps.
Now the Job Chain parameters have to be mapped to the Job Definition parameters of each steps. In this example I map Job Chain parameter PROGRAM_STEP_1 to parameter ABAP program of Job Definition SAP_AbapRunPrint executed by step 1.
This completes the Job Chain definition, which is not ready to be used. If Job Chains with different number of steps are desired, I recommend to combine Job Chain. The screenshot below shows the combination of a 2 step with a 3 step Job Chain into a 5 step Job Chain.
After saving the new Job Chain Definition, start application Job Request from the Job Management Work Center of SAP Solution Manager. From the value help for field Job Definition select the newly created generic Job Chain Definition (here: Z_JOB_WITH_2_STEPS). Afterwards the Job Request screen will update and show the parameters define for the Job Chain.
Enter report and variant for each of the two steps and send the request.
Of course it is possible (and in some cases desired) to convert the generic Job Chain into a custom Job Chain to tap the full potential of SAP CPS, e.g. to define condition for step execution, status actions for creation of alerts from an error status and many more. The custom Job Chain would finally be scheduled from a Job Documentation, but you can always go back to teh request and find out what was originally requested. Monitoring CPS JobsIn this section I will demonstrate how to use the Job Management Work Center to monitor CPS jobs. Call transaction SOLMAN_WORKCENTER to start the Work Center application. Select tab Job Management to navigate to the Work Center. if you cannot access the Job Management Work Center, please read SAP note 1117355 and assign the required roles. Select sub view Central Process Scheduling of view Job Monitoring from the Navigation Panel.
Create a new query (Click on Define new Query link above table in Content Area) using the Job Selection function and specify the Job Status of interest, e.g. here I select Completed jobs.
Alternative: Create a new query (Click on Define new Query link above table in Content Area) using the Job Filter function and specify the CPS Job Filter (can be defined in SAP CPS). Here I select the filter to get all jobs.
Next step is to define which Queries are evaluated be the query. To do click onto the selection option of query parameter Queue and select the relevant queues via the available value help.
In the last step of the query definition, a new category for my new query gets created.
After completion of the query definition, the query can be executed (Please note the Refresh link at the bottom of the table). In this example I selection query All Jobs (using the CPS Job Filter) and also set a filter into the table to see only jobs that contain the term CHAIN in their name. The query result list containes the Job ID, Status and Type together with its Queue. If the CPS Job was scheduled from a Job Documentation, I can navigate to the corresponding document via function Display - Job Documentation.
I hope you enjoyed my demonstrations and start using SAP CPS together with SAP Solution Manager. Martin Lauer is a software developer for the SAP Solution Manager. Add to: del.icio.us | Digg | Reddit
| |||||||||||||||||||||