Skip to Content

While this is the fifth blog post in the series of “Business Process Monitoring & Analytics for Business Suite Processes (POB)”, it is my first blog post on this topic.

The previous posts of the series have been Introducing New Component: Business Process Monitoring and Analytics for Business Suite Processes (POB), explaining the Architecture of Business Process Monitoring and Analytics for Business Suite Processes (POB), and have given an example in Monitor Sales Order Processing with Business Process Monitoring and Analytics for Business Suite Processes (POB).

Now that the system is up and running, after the Setup of Component Business Process Monitoring and Analytics for Business Suite Processes (POB), let’s move on to the heart of matters:

Creating a Process Definition

This blog is based on a hands-on TechEd session. If you missed it, here is a short version based on the assumption that you have some basic knowledge from the previous posts.

The process we want to create a definition for is – for the sake of argument – this short order to delivery process:

/wp-content/uploads/2011/10/5a_1_82066.png

If you are not familiar with the process, you can probably set it up in your system, but you may have some problems executing it in the system. I can’t help you with that, as the set-up of your sales order (materials etc.) will be very specific to your customizing.

In the following, I’ll go through the steps of creating the process definition in some detail.

Create the Process Definition Header

The process definitions are maintained using a standard view cluster that is enhanced with some functions. To start, execute transaction Maintain Process Definition (POC_MODEL). The transaction is part of the standard user role (SAP_POC_BPX).

All data you enter is standard customizing data. SAP delivers some template data that may be available in your client. As for all customizing data, you may need a transport request to save data.

To start, choose the New Entries button to create a process definition header and enter an ID and a description, let’s say PMC264_SalesOrderProcess00 and “Sales Order Process”. (We don’t want to enter a current version or set the log-level yet as we’re still in process of setting up the process definition. We’ll come back to these steps later.)

Create the Version

As always when navigating through view clusters – and I won’t repeat this every time we navigate down – be sure to select your process definition table row and then double click Process Version in the navigation tree.

Choose the New Entries button to create a process version. Enter a numeric value “1” for the version and activate this process definition version by clicking the checkbox in the Active column.

A word about versions:  for a Process Definition you can create multiple versions; the current version is used for new process instances, but for existing process instances, the version in which they were started is used. That way you can consistently change the process definition. This is a technical function that you can use to manage the life cycle of your process definitions – and one reason to do process monitoring is process optimization, i.e. “change” – but there are other things to consider.

Now you can go back to the process definition header and enter the version number as the “current version”.

Add Activities to the Process Definition

From the versions tables, you can create the activities. “Activities” is the term we use and it is based on BPMN terminology. What we call “activities” is often also referred to as “steps”.

Choose the New Entries button to create activities. Enter the following activities (the IDs don’t have to start with a number, but it is convenient for putting them in the correct order):

  1. 10CREASO Create Sales Order as a Start activity
  2. 20CHNGSO Update Sales Order
  3. 30CREAOD Create Outbound Delivery
  4. 40CREATO Create Transfer Order as an End activity

The start indicator is very important. Without a start activity, the logging of a process instance will not be started. The status of a process where a start activity was executed is “Started”. The end indicator is used for the status of the process: if an end activity is reached, the status of the process instance will be “Finished”; a process may be “Restarted” though, by any activity that follows an end activity. Any other activity will change the status to the status “Running”. This already covers the simple default status handling: Started, Running, Finished, and Restarted.

You can have multiple start and end activities. Multiple start activities can be used if your process either starts with the creation of a quote of a sales order; then both activities, create quote and create sales order, can be marked as start activities. When a sales order is created and no predecessor – in this case a quote – is found, a new process instances is created. If a predecessor is found, the activity will be linked to the existing process instance and no new process instance is created.

The result should look like this:

/wp-content/uploads/2011/10/5a_2_82079.png

Assign the Tasks to the Activities

You now have a process definition. The definition is at this point not linked to any runtime object. So the next step is to link the definition, or “model”, to the runtime. To do that, you have to assign (at least) one task (event) to each activity. At runtime, the events are mapped to the activities. The tasks themselves are linked to BOR events, which are actual runtime objects: BOR events actually occur at runtime, the can be stored and processed. You can create new tasks in the PMA façade layer. This will be explained in a separate blog.

For each activity definition navigate down to the task assignment.

Activity Create Sales Order (10CREASO) should be assigned to Task Create Sales Order (Business Object Type 114 Task Type ID 21); that would look something like this:

/wp-content/uploads/2011/10/5a_3_82080.png

Activity Create Sales Order assigned to Task Create Sales Order

You have to go back to the activities and repeat the steps of assigning tasks for the remaining three activities:

Activity Update Sales Order (20CHNGSO) should be assigned to Task Update Sales Order (Business Object Type 114 Task Type ID 88).

Activity Create Outbound Delivery (30CREAOD) should be assigned to Task Create Outbound Delivery (Business Object Type 73 Task Type ID 21).

Activity Create Transfer Order (40CREATO) should be assigned to Task Update Outbound Delivery (Business Object Type 73 Task Type ID 88). This last assignment is probably not the best way of doing it, but for this rather simple example, it is good enough.

When you actually look at the view in your system, you will find here – and in some of the other views – a reference to Business Rule Framework plus rules. These rules add a lot of flexibility; in this view they allow you to do the “binding” between task and activity based on a condition that is put in the rule e.g. you want the create event to bind to your activity only for certain customers; you can then add a rule to do that.

Set up Callable Business Entity Assignment [Optional]

Sometimes the easiest way to describe a process is the sequence of screens you go through, or in SAP terms, the sequence of transactions. The Callable Business Entity is “the transaction”, but it can also be an automatic task that is described as a web service call.

You can add here the appropriate transactions for each activity, in our case the transactions VA01 to create a sales order, VA02 to update it, VL01N to create the outbound delivery and finally VL02N to create the transfer order.

Sometimes it is a valid approach to create a process definition by starting with the order of transactions being carried out.

Set up Activity Sequence [Optional]

By setting up the sequence, you can make sure that the presentation, e.g. in the process definition viewer (POC_VIEWER), is in the order defined here. This is for your convenience and does not affect the runtime.

Navigate to the Activity Sequence Flow in the navigation tree and create New Entries and enter a true sequence flow going from 10CREAS to 40CREATO.

The result, the Activity Sequence Flow for the sample process definition, should look like this: 

/wp-content/uploads/2011/10/5a_4_82081.png             

Note that you may have multiple “next“ or „previous“ activities for a given activity, so parallel flows, for example, are possible. You are not protected from setting up random sequences, but since this is used for presentation purposes only, it wouldn’t do much except disrupt the presentation.

You are now finished with setting up the process definition. We can now have a look at the process definition using the Process Definition Viewer (POC_VIEWER), which displays the definition in a much more comprehensive way than the view cluster can. In higher releases, the viewer is available as a web dynpro screen as well.

Topics we have not covered here are KPIs, setting up a complex process status handling, the rules in the various places and the extension concept, and federation (setting up process chains across multiple systems). We will look at those in separate blog posts.

Check the Definition

After setting up your process definition, you need to check the model to see if you have any errors in your definition. Transaction Process Definition Checks (POC_MODEL_CHECK) is helpful for finding issues. Start it with your process definition ID, which in this example is PMC264_SALESORDERPROCESS00.

You should receive as a result of the process definition check something similar to this:

/wp-content/uploads/2011/10/5a_5_82082.png

If you have a red X in the consistency column, you’ll need to look into the issues reported.

The following common errors are reported:

  • Process definitions without an active version
  • Activities with inactive Business Object Repository (BOR) events
  • No start activity assignment
  • No task assigned to activity
  • No BOR event or class assignments

If you encounter any errors, such as a missing start activity, you can navigate back to your process definition by choosing View-cluster button to make your corrections.

For this example, your process definition should to be consistent (error-free) before proceeding. In practice and with more complex examples there may be reasons why you want to do things that lead to warnings, e.g. insert activities that are not assigned to any task for documentation purposes.

Switch on Logging

Finally, you want to switch on the logging. To do that, on Process Definition Header level set the log level to “Standard logging”. You can now run the process: using transaction VA01, you create a sales order (do that only in your test system and when you know that you are not affecting anybody else), call the process monitor (POC_MONITOR) and you should see something like this (this is actually after having executed the first three steps of the process):

/wp-content/uploads/2011/10/5a_6_82083.png

Again, in higher releases there is a web dynpro version of the monitor available.

Now that you understand how to set up a process definition, we’ll look into KPI functionality and definition in Create KPI Definitions for Business Process Monitoring & Analytics for Business Suite Processes (PMA).

To report this post you need to login first.

17 Comments

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

  1. Susan Keohan

    Hi Jens-Christoph,

    I am just now starting to implement Process Observer, and this blog was great! 

    My screens look a little different (I have the workshop material from 2011 as well) but I am making progress! 

    Thank you so much,

    Sue

    (0) 
    1. Jens-Christoph Nolte Post author

      Hi Susan,

      good to hear! I guess – I’ve been peeking into your profile your workflow experience is quite helpful. 

      Don’t hesitate to contact me if you have further questions – anything, even if it is one of those technical details or the big picture. I’m also interested to hear about your experience.

      Christoph

      (0) 
      1. Susan Keohan

        Ha. It may just come to that – although I want to wrestle it some more.

        Will there be more Process Observer/OPInt at TechEd this year?

        Cheers,
        Sue

        (0) 
        1. Jens-Christoph Nolte Post author

          The colleagues from Operational Process Intelligence (“OPInt”) will be there with a hands-on session and a lecture. Last time Process Observer was part of that (and I would expect that now, too).

          Let me add that it’s good that you mention Operational Process Intelligence in this context, with HANA it is the tool to evaluate the data that Process Observer provides – that is from a Process Observer perspective, i.e. it can do other things, too, but since the Process Observer component does not provide any analytical capabilities you will need an analytical tool for most use cases. But then, it is not wrong to just start with Process Observer to see what kind of – hopefully higly valuable data it can provide – this can be a very limited investment – and then scale up the use case, volume, users, tools and capabilities. But I think this would be worth a separate blog post.

          JC

          (0) 
          1. Susan Keohan

            Hi JC, Mariana,

            I don’t seem to find a place for asking questions on Process Observer.  There is the general BPM space, but how would I tag a question (or, since I always search first, a search) for Process Observer?  POB?

            Thanks, Sue

            (0) 
  2. Moo Yac

    Hi Jens-Christoph,

    Nice Blog . i m wondering if its possible to filter the activities on some conditions.

    For instance : Is”t possible to log only the creation of sales order of certain type ?

    Only Capturing the changes of certain attributes of the sales order ?

    If it is possible could you pls explain how to do it

    Thanks in advance

    (0) 
    1. Jens-Christoph Nolte Post author

      Hi Moo,

      the first question you are asking is about “binding“. The fact that the event – which corresponds 1:1 to a task – is mapped to the activity is called “binding”. What you are saying is that you want the activity to be logged only if the event (= task) occurs and certain additional conditions apply. Maybe you only want to log your sales process for your “gold customers”, a subset of your customer base that you can (easily) determine. So when the “Create Sales Order” event is raised you want to check against the “gold customer” status.
      One way to do this is to use the binding rules; these can be found in your process definition against the tasks, which are assigned to the activity. These rules are BRFplus rules; BRFplus is a powerful framework that will let you do anything, really – it does require a bit of skill to get into it. Essentially you have to create a rule; the rules is called with a set of data that you can use, you can read additional data in your rule.
      Alternatively you can use a number of BAdIs, if you feel more comfortable with ABAP; which BAdIs you can use depends on whether your events are BOR events or the generic events.
      The second example, to only capture changes for certain attributes of a sales order, allows for a different solution. While you could use a binding rule, I think your decision to track a change is not a binary yes/no decision. You may wish to monitor certain field changes separately. One approach is described in “Tracking Field Changes Using the Process Observer (POB) Direct Event API“. This approach can also be used for a binary decision.
      An easier way, because no additional instrumentation is required, is to use the change documents functionality that allows to raise an event specific on field level – so there is one (internal, not BOR!) event raised for a change in the “Requested delivery date” and another one for a change in the “Delivery block”. Downside here is that it is currently only available in the highest release, i.e. SAP_BS_FND 747 as used in ERP EhP7 (“607”) – and I urgently need to write a blog about that. Something similar can be achieved using SWEC, where you link change documents to BOR events.
      I think these answers can only be initial hints, let’s continue the discussion, if required in our Process Observer Discussion.

      Best regards,
      Christoph

      (0) 
  3. Robert Phelan

    We want to implement a hybrid model where we have data coming in from an external system which creates a “movement” record/object. This should be the start of our tracking process.

    The next steps would be order creation (SO/PO/STO) which have standard BOR objects.

    I’ve read that we can directly access an API for our own use to trigger the logging process. However, I can’t seem to find info on how to create custom Tasks to assign to this custom Activity.

    Our test Process Model looks like this so far:

    Activity Description Start End
    CREA_MOV Create Movement X
    UPD_MOV Update Movement
    CREA_SO Create Sales Order X
    UPD_SO Update Sales Order
    CREA_OD Create Outbound Deliver
    POST_GI Post Goods Issue X

    Do I have to create a custom BOR object in order to generate those tasks to use here?

    EDIT:

    Nevermind.. I found that I could go create those BO_Types and tasks, then assign them to my processes.

    I just tried and it’s working.

    (0) 
  4. JAI RAJ

    Hi Jens-Christoph,

    I have followed all your above steps but I am getting BOR event not active.Can you please help me with this.

    Capture.PNG

    Regards

    Jai

    (0) 
    1. Jens-Christoph Nolte Post author

      Hi Jai,

      Robert’s advice is right… but I think you may have a different problem (and I don’t quite know why).

      An “inactive event” most likely indicates that there is a BOR event related to your task that you have assigned to your activity – but that the BOR event is not active in view BOR events relevant for Process Monitoring (POC_V_BOR_EVT). You can check the view in table maintenance (SM30) or in IMG: Process Observer->General Settings->Business Object Repository Instrumentation->Check Process Monitoring Events for Bus. Object Repository.

      Check if the relevant BOR event is in the table and that it is indicated as “Event Active”. If not (or just anyway or if you are not sure), run report POCR_UPDATE_BOR_EVENT (SE38). There is no “danger” associated to running the report. This report has the same effect as if changing any process definition, which will in fact also trigger this report – so alternatively you can just go in and do any change in your process definition (and save).

      If this solves your problem, customizing data was inconsistent. This most likely happened after a transport or when some unlikely combination of things happened.

      If this does not solve your problem… we have to keep looking.

      Let me know.

      Christoph

      (0) 
      1. Robert Phelan

        Thanks Jens. The only thing I’d add to my response is to make sure to run program POCR_UPDATE_BOR_EVENT after you make any changes to your model.

        This will update the links (cache?) to the BOR events/objects.

        EDIT: crud.. sorry, I didn’t see that you mentioned this program in your reply

        (0) 
  5. JAI RAJ

    Hi Christoph , Hi Robert,

    Thanks for your time..

    I have observed the following , Please help me with this.

    1. View POC_V_BOR_EVT  is empty .. Can I manually add values here ?

    2. I am getting a message saying  POCR_UPDATE_BOR_EVENT report do not exist..

    I can only find the following reports

    @Christoph  :  I am not able to see any Built In process(like Sales Order) in ECC in the

                            POC_MODEL transaction.

                           My system details..

                           EHP6 FOR SAP ERP 6.0

                           Client using is 800

                           SAP_BS_FND  Release 731  Level 0002

    Just FYI ,I am doing a POC where I am trying to migrate a process from ECC into SAP OPINT .

    Cheers

    JAI

    (0) 
    1. Jens-Christoph Nolte Post author

      Hi Jai,

      1. Yes – and you may want to. Since you don’t have the report (see below) the easiest way is to go into POC_MODEL and e.g. de-activate your process definition, <save> and activate it and <save> again. This should fill table POC_V_BOR_EVT. Please leave view POC_V_BOR_EVT while doing this!
      2. POCR_UPDATE_BOR_EVENT is available from SAP_BS_FND 731 SP03 (which was released in August 2012)… so that’s why you don’t have it. The report is a means of convenience to fix issues like this. To work around this, see 1.

      Best regards,

      Christoph

      (0) 

Leave a Reply