Skip to Content
h4. Introduction   In this blog I will not describe how to setup the Job Monitoring  (http://help.sap.com/saphelp_smehp1/helpdata/en/8e/3ad6f807e147669036d2a6aed597aa/frameset.htm) of the Business Process Monitoring Framework  (http://service.sap.com/bpm) for [SAP CPS Job Chains | http://www.redwood.com/education/tutorials/] as this is demonstrated in a {code:html}tutorial{code} of the SAP Online Knowledge Products for the Process Scheduling Adapter  (Process Scheduling Adapter for SAP Solution Manager for everybody). 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 {code:html}Scheduling{code} 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  (http://service.sap.com/sap/support/notes/1345018).    In the second part of this blog I will show how to use the Job Management Work Center to monitor the status of {code:html}Scheduling{code} jobs.  h4. Requesting new Job Chains   At the beginning of the {code:html}Job Scheduling Management{code} process there is always a [Job Request | Creating a Job Request with SAP Solution Manager]. 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.Create Job Chain  To the new Job Chain two steps will be addedAdd steps to chain and each step executes a single Job Definition of type +SAPR3+, e.g. +SAP_AbapRunPrint+.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.   Select Job Definition and map parametersThis 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.  Composition of Chains   After saving the new Job Chain Definition, start application {code:html}Job Request{code} from the Job Management Work Center  (http://service.sap.com/sap/support/notes/1117355) 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.   Create Job Request for generic ChainEnter report and variant for each of the two steps and send the request.Enter Chain parameter in Job RequestOf 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. h4. Monitoring CPS Jobs  In 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  (http://service.sap.com/sap/support/notes/1117355) and assign the required roles.     Select sub view +Central Process Scheduling+ of view +Job Monitoring+ from the Navigation Panel.  CPS Sub View in JSM Work Center 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.  Create query based an generic selection 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.  Maintain Query for CPS 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.  Select CPS queues  In the last step of the query definition, a new category for my new query gets created.Define new categoryAfter 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.Execute new CPS query If the CPS Job was scheduled from a Job Documentation, I can navigate to the corresponding document via function +Display – Job Documentation+.  Display assigned Job Documentation
To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Jim Spath
    This material should probably be in the wiki, maybe with a blog post describing how long it takes to set up, skill prerequisites, and other user experiences.

    Jim

    (0) 
  2. Olivier CHRETIEN
    Thanks for this blog that we will study because it addresses a big problem of CPS which is that we loose multi steps jobs.
    We have a lot of users who don’t want to define their jobs with CPS just because of this problem.

    With the standard way of importing multi steps jobs in CPS, we gat one job per step with the same name. This is very confusing…

    Regards,
    Olivier

    (0) 
  3. Clayton Maurer
    You have your jobs scheduled, but what can you do if you have a job that must run within a period of time and it doesn’t execute (not scheduled or queues are closed?)?
    (0) 
    1. Martin Lauer Post author
      Hello Clayton,

      these kinds of alerts are supported by the Job Monitoring section of the Business Process Monitoring, which is integrated into the Job Documentation.
      You can define a planned start time and a maximum (start) delay or runtime. If job does not start on time or is delayed you’ll get an alert in SAP Solution Manager and a notification (email, sms, ticket). You can also define a time window for your job.

      Visit the following pages for more information on Job Monitoring with BPMon and SAP CPS:
      Functional Scope of Business Process Monitoring in SAP Solution Manager

      http://service.sap.com/~sapidb/011000358700001976052008E/index.htm

      Kind regards,
      Martin

      (0) 
  4. Vaibhav Muralidhar Gore

    Hi Martin,  Thanks for your response. Do you have any such link,reference for solution manager 7.2. Would like to activate such monitoring. We have latest Solution Manager and Redwood version in our landscape.

    (0) 

Leave a Reply