Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 


In the competitive world, the best run companies continuously optimize their business processes to minimize the cost incurred and maximize the throughput and efficiency. Prior to digitization, this process was tedious and time consuming. As we move towards the digital world the business data is readily available for consumption via software which can help the business enormously to expedite the process optimization. There are a couple of products from SAP which caters to Process Optimization –

  • SAP Operational Process Intelligence: Enables line-of-business users to gain real-time visibility across their end-to-end business processes across multiple system with a clear focus on improving the operational decision making to achieve better business outcomes.

  • SAP Process mining by Celonis: Helps to gain a clear picture of whether processes are running as-designed, measure process effectiveness & identify bottlenecks and areas on potential improvements.

As you can see both the solution complement each other and any customer would want to run both the applications in their landscape in order to identify process optimization touch points and to execute them successfully. Since both these applications work on the same business data, wouldn’t it be great if either of them can use the ‘process data mart’ of the other solution?

This article targets those customers and partners who have already implemented SAP Operational Process Intelligence and now want to implement SAP Process Mining analysis. I would talk about how can you build SAP Process Mining data model using the process data mart of SAP Operational Process Intelligence.

In the next blog I will give some insights on how to implement SAP Operational Process Intelligence dashboard if you have already implemented SAP Process Mining by Celonis.


  • In order to consume SAP Operational Process Intelligence’s process data mart, you should have created and generated the business scenario.

  • The correlation procedure for the particular business scenario is scheduled and running successfully

This article is based on the following versions of the software: SAP Operational Process Intelligence: 1.0 (any Service Pack above SP09) and SAP Process Mining by Celonis: 4.2.0

How to Achieve

Understanding Process Data Mart

Before we can consume the Operational Process Intelligence (OPInt) process data mart, we first should understand what is available for us to consume.

The following image gives an overview of how the two products work on a single process data mart. The process data sources could be any SAP or non-SAP systems. As a first step, you would have transformed and replicated the pre-determined business data into SAP HANA DB (if the applications do not have SAP HANA as their primary database). Once you have created a business scenario in SAP Process Intelligence, one of the generated procedure will automatically correlate the process data across heterogenous landscape and make it available as process data mart. SAP Operational Process Intelligence (dashboard) as well SAP Process Mining by Celonis can now work on this real-time process data mart to provide insights.

What is Required in SAP Process Mining by Celonis Data Model

To create a data model in SAP Process Mining by Celonis we need at least one database object (Table or View) which contains the information on what & when the events were raised in the backend system. To achieve the goals of process mining, you would also want to provide an attribute within the activity table which can correlate all the events of a single process chain instance. With the activity table, we can perform process mining. But to take complete advantage of the tool, you will also have to provide some context for the event. For example, if 'create sales order' is the event, then the order id, order type, ordered product, customer id, name, etc. are the context. Our goal is find such a database object which is already available in the process data mart.

When you generate a business scenario in SAP OPInt, there are a few DB tables which are created under the DB schema SYS_PROCESS_VISIBILITY. When the correlation is successfully performed the process data is inserted into these tables. Out of those tables, we will be using the table specific to your business scenario ending with ‘_EVT’. This EVT table will contain all the events that are observed in the end-to-end process across SAP & non-SAP systems.

The EVT tables has the following naming format: <root_package.scenario_package>.gen_<scenario_name>::SPVR_<SCENARIO_NAME>_EVT

In the EVT table, the column SCENARIO_INSTANCE_ID is a unique ID given to all the events of the SAME instance of the process. For example, all the events of a particular Sales Order would have the same scenario_instance_id. This can be mapped to the ‘Case ID’ required in Celonis.

Similarly, the columns SCOPE_OBJECT_DEF_NAME and EVENT_NAME together will provide the actual event which has happened in the backend system. This can be mapped to the ‘Activity Name’ which is required in Celonis.

The column TIMESTAMP corresponds to the time at which the event occurred in the backend system which is again required in Celonis.

Similarly, the context calculation view of a business scenario can be used to provide the event's context.

Create DB Views

To achieve our goal of process mining, create a DB view with a query similar to the one below. Note that I have created the view in SYSTEM schema and used the EVT table for my purpose and it could be different in your case.
"TIMESTAMP") AS select
from "SYS_PROCESS_VISIBILITY"."< scenario_package>.gen_<scenario_name>::SPVR_<SCENARIO_NAME>_EVT" T0;

Similarly create another DB view to expose the content of SAP OPInt’s context calculation view which holds all the context related information. Since SAP Process Mining by Celonis requires the data model to be derived from one or more DB tables/views from a single schema, we are creating two DB views in a single schema (in this example, SYSTEM).

Note that the attributes mentioned in the below mentioned script will be different for your scenario (after all, the context is specific to your scenario and needs). Make sure you select the attribute SCENARIO_INSTANCE_ID and any other attributes you would need to perform process mining.
"INQUIRY") AS select
from "_SYS_BIC"."<root_package.scenario_package>/SPVR_<SCENARIO_NAME>_CONTEXT" T0;

Create Database Connection in SAP Process Mining by Celonis

While creating the database connection in SAP Process Mining by Celonis, choose the schema where you have created the DB view (in my case it was SYSTEM)

Make sure you have given the privileges to the HANA DB user which is used here to create the database connection. The user should have read privileges of the EVT table & context calculation view and also the privileges to query the DB view, apart from the roles & privileges specific to SAP Process Mining.

Create Data Model in SAP Process Mining by Celonis

After creating the database connection, select the two DB views created earlier as part of data model. Choose the view which has the CASE_ID, EVENT_NAME and TIMESTAMP as the ‘Activity Table’ and the other DB view will be the ‘Case Table’. Set the properties of the activity table as shown below:

Then create a relationship between the activity and case table based on CASE_ID.

After this, you can install the wrapper module in Celonis and continue to create your analysis document as usual.


As you have seen already, it is very simple to create process mining analysis if you have implemented SAP OPInt scenario for your business process. But note that in order to continue to receive new data in SAP Process Mining analysis documents, you have to continue to schedule the SAP OPInt’s correlation module (which is performed as part of SAP OPInt installation & configuration).