Skip to Content

You’re using Business Process Monitoring (BPMon), but the standard monitoring functionalities don’t fulfill all your requirements? There’s an easy way to solve this problem: you can create your own data collector with the Customer Exit functionality of BPMon. This newly created data collector is then fully integrated into the existing BPMon framework and behaves just as any SAP-delivered standard monitor. How to achieve this? Have a closer look at this blog…  

Preparation   

What is needed to create and use your own BPMon data collector? 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 managed system the latest ST-PI and ST-A/PI versions have to be available
  • You have modeled a business process with different process steps in SAP Solution Manager to which you can assign your own monitoring object to. If you already utilize BPMon then these prerequisites will be fulfilled anyway. 

All steps that are necessary to create customer-specific monitors are described in more detail in the setup guide that is available on SAP Service Marketplace (https://service.sap.com/bpm  => Media Library => Technical Information => “Setup Guide – Customer Exit”).

Monitoring Requirement  

Imagine you want to monitor whether a user on your managed system didn’t change its password within the last days although it was intended to do so. If a certain (configurable) amount of days is exceeded you want to get notified about the number of users which didn’t follow the regulations. SAP does not deliver a standard monitoring functionality that checks such a situation. But you can implement a data collector for this purpose on your managed system easily.

Setup in the managed system

In general, a BPMon data collector consists of two parts:

  1. The “customizing report“: all stuff that will be visible in BPMon setup session, i.e. the names of monitoring objects and key figures, the definition of selection criteria, end user instructions etc.
  2. The data collector logic: your own piece of code

You should start with maintaining the customizing report. Execute report /SSA/EXM on the managed system the data collector should run on. In the following selection screen enter “ECU” and “CHANGE” in order to get to the maintenance screen. There, you have to perform the following steps:

1) Create your monitoring object:

    1. Assign suitable selection parameters to this monitoring object that will be used for data filtering,        
    2. Enter instructions that will be visible in the BPMon setup session and that describe the setup procedure for the monitoring end user,        
    3. Define the key figures that this monitoring object should offer,        
    4. And add some further things like instructions on error handling (this should not be detailed here).
      In our example, we start with defining Monitoring Object “Password Change Control”
      EXM Monitoring Object

Next we provide the selection parameters for this monitoring object (1a). In our case only the “Number of days” a user should keep its old password should be configurable in the BPMon setup session. You should provide also instructions on this monitoring object (what is it about, how to set up this monitor – 1b). Then reasonable key figures need to be defined (1c).

          EXM Parameters

2) Define your key figures:

    1. Again, assign suitable selection parameters (if necessary),
    2. And enter a guideline for the end user.  
      In our example we name the key figure we want to measure “Number of days since last change”. You could again provide selection parameters on this level (2a), but this is not necessary in our case. But some instructions for the end user (2b) will again be helpful. 
      EXM Key Figure  


The second part of the whole procedure is quite simple. You only need to implement your coding in the managed system. This has to be done in a report named Z_BPM_ECU_COLLECTOR. If it is not yet available on your managed system you have to create it by yourself. For each part of your data collector an own subroutine with a well-defined interface has to be maintained. Report /SSA/EXM provides templates for these subroutines which you can copy into Z_BPM_ECU_COLLECTOR. The interface itself must not be changed, but the rest of the coding can be adjusted to your own needs.    

EXM Coding Templates   

During runtime, these interfaces will provide the customizing of your monitoring object that was done in the BPMon setup session in SAP Solution Manager (like the maximum number of days the user can stick to its old password). Your coding has to return then all what is needed to build up an alert in BPMon: A measured value (how many users exceeded the threshold), the rating of the alert (green, yellow, or red), and a reasonable alert message that helps identifying the error situation. All this data has to be put into a table called OUTPUTTAB. All the rest (determining to what times the data collector should run, transferring the alerts to SAP Solution Manager, creating the alerts in BPMon session according to the Monitoring Schedule) is handled by the BPMon framework.  

Z_BPM_ECU_COLLECTOR 

Setup in SAP Solution Manager 

Once you have finished implementing your coding in the managed system you can start to set up monitoring in SAP Solution Manager. The setup procedure in the BPMon session works exactly the same way as for any other monitoring object of type “Application Monitor”. In case you already set up BPMon the following will be quite familiar to you. If not, learn how easy and fast everything can be carried out.  

The first steps are rather generic. You have to choose the Business Process and the Business Process step your new Monitoring Object should be assigned to. In the below screenshot you can see that an extra step “Check User Data” in Business Process “Order to Cash” was defined for that. Next you have to define the Monitoring Type, which is “Application Monitor” in our case. Then, on the Monitoring Object level you call the F4 help in field Monitor Name, and you will find your new data collector “Password change control” together with the SAP standard monitoring objects. (If you don’t find it initially, press button “Load Monitors”). After saving a new entry for your Monitoring Object will be created in the navigation tree on the left side of the screen. Navigate to this so-called Monitoring Object level. There you first have to select the Key Figures you want to use. You will also see that the instructions for the end user are visible on the right-hand side now. In our case only one key figure, “Number of days since the last change” can be chosen for monitoring. 
SolMan Key Figure  

On tab “Detail information” you have to specify the filter criteria for monitoring, which in our case is the maximum number of days a user should keep its old password. You have to define also the times when your data collector should run, i.e. to what times alerts should be triggered. This is done in tab “Monitoring Schedule”. In the end, save your setup.  

SolMan Parameters  

A subsequent level will be created which is the Key Figure level. There, you can maintain further filter criteria if available (not in our case), and you need to provide threshold values on which the alert rating will be based on. We decide to get a warning (yellow alert) if at least 5 users didn’t change their password, and a critical (red) alert for at least 20 users. Save, and activate the whole business process for monitoring which is done in navigation tree element “Generation/Deactivation/Activation”.   

SolMan Thresholds

To report this post you need to login first.

14 Comments

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

    1. Johannes Fleig Post author
      Hi Michal,

      thanks for your question. Yes, it is possible to debug the data collectors from Solution Manager. Basically you need to start the debugging in the MTE nodes in Solman’s CCMS that were ceated by the BPMon infrastructure. Unfortunately I cannot give you details on that.
      What is the background of your question? Maybe there’s another way to tackle your problem…

      Best regards,
      Johannes

      (0) 
      1. Michal Krawczyk
        Hi,

        I just want to check the code in my data collector 🙂 and debug it with data

        >>>you need to start the debugging in the MTE nodes in Solman’s CCMS that were ceated

        I will try to find something about that then
        thanks for the lead 🙂

        Regards,
        Michal Krawczyk

        (0) 
        1. Johannes Fleig Post author
          Hi Michal,

          I guess you want to see if your customer exit returns the correct values depending on the selection criteria you entered in the BPMon session. What you could to in this case is to run the Z_BPM_ECU_COLLECTOR in debug mode on the managed system and provide some sample selection criteria manually by filling input table PT_CUSTTABA with the corresponding values. Normally this should be sufficient to run a proper test.

          Best regards,
          Johannes

          (0) 
          1. Michal Krawczyk
            Hi,

            >>>What you could to in this case is to run the Z_BPM_ECU_COLLECTOR in debug mode on the managed system and

            the issue here is that this report
            does not run – you need to run a procedure (form) inside of it

            but I managed to debug it nicely using the SLG1 logging 🙂

            Regards,
            Michal KRawczyk

            (0) 
  1. krishna killedar
    Hi,

    This blog is very useful.

    I want to create BPMon alert for total number of days PR is open.

    In standard SAP, system considers PR creation date. Instead of that,I want to consider PR release date.

    How should I go ahead with this?

    (0) 
    1. Michal Krawczyk
      Hi,

      >>>I want to create BPMon alert for total number of days PR is open.

      this is not a proper BPMon requirement
      it can be something like this:

      – how many PRs are opened for more then X days
      and you can easily create a custom data collector (1 dev day) which will get this info for you
      (you can actually copy the existing one
      for creation date and change the date to release date)

      if you want to monitor those dates per each PR
      then you should use event management to
      monitor events per each object

      Regards,
      Michal Krawczyk

      (0) 
      1. krishna killedar
        Requirement is like ” How many PRs are open since last 10 days i.e. number of PR having PR release date ( date on which PO should be created) 10 days past and PO has not been created ?”

        I think ,this is typical BPMon requirement.

        Please guide. I have followed all the process for custom alert development;but no alert is observed.

        (0) 
        1. Johannes Fleig Post author
          Hi Krishna,

          I agree with you, this is a valid requirement and fits perfectly into the concept of BPMon.

          From your last posting I learn that you already implemented some coding in the Customer Exit but don’t get any alerts. Of course it’s hard to tell what can be the problem as there can be several points of failure. Can you somehow narrow down the problem? Maybe I can give you some hints then…

          Regards,
          Johannes

          (0) 
        2. Michal Krawczyk
          Hi,

          >>>How many PRs are open since last 10 days i.e. number of PR having PR release date

          sure this one is as I said… but this is not what you’re described 🙂 

          “I want to create BPMon alert for total number of days PR is open.”

          you cannot do BPMons for single objects  – (PR) 

          Regards,
          Michal Krawczyk

          (0) 
  2. Markus Reich

    Hi, great blog! It helped me a lot!

    But I have one problem it seems that my parameters didn’t reach the collectors subroutine 🙁

    (0) 
    1. Markus Reich

      ok, found the problem!!

      This seems to be a lack of documentation 🙁

      It is necessary that in customizing of parameters the Tech Name2 ist exactly the same name as the variable defined in your include! Because there happens an assign in method FILL_PARAMETERS_FROM_APPMONA in Include /SSA/IEO

      Markus

      (0) 

Leave a Reply