Blogs

Volker von Gloeden

Customer Exit: Create your own key figure for BPMon AND Business Process Analytics
Volker von Gloeden SAP Employee Active Contributor Gold: 1,500-2,499 points
Business Card
Company: SAP AG
Posted on Jan. 14, 2012 07:23 AM in Application Lifecycle Management, Business Process Expert, Run SAP, SAP Solution Manager

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share

Two years ago my colleague Johannes Fleig wrote the blog New Business Process Monitoring functionalities in SAP Solution Manager - Customer Exit where he described the Customer Exit framework we provide since several years in order to create your own customer specific key figures for Business Process Monitoring. This framework has one severe limitation – it only supports the alert monitoring (BPMon) but not Business Process Analytics that is available since ST400 support package 23.

For this reason we introduced a new Customer Exit framework with ST-A/PI 01N. The new framework now allows object oriented programming and the key figures that you develop within this framework can be used for Business Process Monitoring and Business Process Analytics. This blog outlines the main steps that need to be performed in order to create a new monitoring object with one or more new key figures. A detailed description is given in the setup guide guide that is available

 

Preparation  

What is needed to create and use your own monitoring object and key figure? As you have to develop your own piece of code you need to have of course some basic programming knowledge. From a technical point of view the following has to be ensured: 

  • On your SAP Solution Manager system the software components ST-SER 700_2008_2, ST-A/PI 01N, and  ST400 SP23 or higher have to be installed.
  • On your managed system the latest ST-PI and ST-A/PI (at least ST-A/PI 01N ) versions have to be available,

 

Roadmap  

The development and configuration activities are similar to the “old” Customer Exit framework. The essential steps are:

1) Define the new Monitor with the customizing report /SSA/EXM in the managed system (development system)

If the new key figure should also be usable for Business Process Analytics it is important that you

  • Allow an assignment to a Logical Component (and not only “Business Process Step”)
  • Flag TBI-OO Framework at “Implementation Details” and specify a Monitoring Object Class
  • Fill-out columns BI Gen. Param. and Semantic ID so that the corresponding fields can later be used for aggregating the result data

 

2) Create the report Z_BPM_ECU_COLLECTOR in the managed system

A  text file with example coding of a customer exit can be found as an attachment to SAP note 1556760. The code can be used for SAP R/3 4.7 or SAP ERP.

3) Copy the coding template into the report Z_BPM_ECU_COLLECTOR

4) Adopt the coding template to your needs

You have to ensure that the following “building blocks” exist in your report Z_BPM_ECU_COLLECTOR

  • Data declaration where the following structures have to be defined: TS_<name of monitor>_DETAIL, TT_<name of monitor>_DETAIL, TS_<name of monitor>_KEYFIG, TS_<name of monitor>_RESULTS and GS_<name of monitor>_RESULTS
  • The class definition for the new monitor CLASS  <name of monitor>_MONOBJ DEFINITION
  • The implementation of the class, i.e. CLASS  <name of monitor>_MONOBJ IMPLEMENTATION.
  • The class definition for the new key figure CLASS  <name of monitor>_KF_<number of key figure> DEFINITION
  • The implementation of the class, i.e. CLASS  <name of monitor>_ KF_<number of key figure>  IMPLEMENTATION. The implementation of the key figure specific class consists of three methods: SELECT_DETAILS , GET_RATING_TYPE and GET_MVALUE_FROM_DETAILS
  • Implement form DC_CUCUSTxx  per monitor (not key figure) for the data collection
  • Implement form DI_CUCUSTxx  otherwise you cannot display the result list
  • Implement form xxD_USER_COMMAND so that you can navigate into an expert transaction (e.g. VA03 or ME23N) from the result list
  • Implement form VH_CUCUSTxx  to have F4 value helps available for the selection criteria in SAP Solution Manager when configuring the new monitor and its key figures.

 

5) Start an update of the application monitoring repository in the SAP Solution Manager system to make the new monitor available (reload of monitors)

6) Test the new monitor

A test report ZBPMON_START_DC is attached to SAP note 1521095 - ST-A/PI: Report for BPMon Customer Exit Analysis in order to trigger the new data collector for debugging purposes.

7) Transport the report Z_BPM_ECU_COLLECTOR from the development system to the productive system

8) Transport the settings from the customizing report /SSA/EXM from the development system to the productive system. If you are in report /SSA/EXM you can navigate via menu Goto > Transport Management > Add Cust. to request

 

You can find far more details for each of the 8 steps in the corresponding Setup Guide - Customer Exit in ABAP OO as mentioned above.

Good to know…

There is a good chance that the standard monitoring object ‘Table Entry Counter’ (technical name BOTABCNT) meets the monitoring requirements you have – especially if you want to monitor simple use-cases where you want to select data from just one table. In general, the Table Entry Counter performs a SELECT statement on up to 5 (configurable) fields of an ABAP table. It then returns either the number of entries or the number of distinct values within that table fitting to your selection criteria. In this way you can also filter out data in a simple way. However, if the logic in your coding needs to be more complex, this generic data collector won’t be able to cover the filtering, and the Customer Exit needs to be used instead. More information on the Table Entry Counter can be found in my previous blog Create your own customer-specific key figure for Business Process Monitoring within 5 minutes.

Further information

Frequently Asked Questions about Business Process Monitoring are answered under http://wiki.sdn.sap.com/wiki/display/SM/FAQ+Business+Process+Monitoring.

 

The following blogs (in chronological order) provide further details about Business Process Monitoring functionalities within the SAP Solution Manager.

Volker von Gloeden  Active Contributor Gold: 1,500-2,499 points Volker von Gloeden is global service owner for Business Process Monitoring and Job Scheduling Management


Comment on this article
Comment on this weblog