Processing
In this section, you execute the core functions of the model.
This stream takes the delivery, sales and billing document from the SAP SD tables and analyzes its processes. Each document corresponds to a single activity. You can find the relationships between documents in the VBFA – SD Document Flow table.
The processing part starts with Join function Generating Case ID that presents all preceding and subsequent documents that are related to each other by a specific Case ID. The system derives the processing activities based on the categories of the preceding and subsequent documents. The result is a list of documents with the corresponding Case ID. The documents are then enriched with data from their header tables (LIKP, VBAK, VBRK), line items table (LIPS, VBAP, VBRP), and customer table (KNA1), keeping the highest level of granularity possible for each field. The system derives an activity for each document.
The cases are then grouped into different variants based on the concatenation of their activities sorted by activity sequence. The variants are then ranked according to their frequency of occurrence.
It uses the Start and End function for the process run.
-
KNA1 – Customer Master Data
-
VBFA – SD Document Flow
-
LIKP – Delivery Document Header
-
VBAK – Sales Document Header
-
VBRK – Billing Document Header
-
LIPS – Delivery Document Items
-
VBAP – Sales Document Items
-
VBRP – Billing Document Items
-
CDHDR – Change Document Header
-
CDPOS – Change Document Items
-
BKPF – Accounting Document Header
-
BSEG – Accounting Document Items
-
USR02 – Logon Data
-
Automatic Transactions
-
Process Compliance Rules
-
Process Forecast Data
It comprises the following functions:
Generating Case ID
This Join function uses the SD Documents Flow Model Table, which serves as the main data input in the whole O2C process. A Case ID is generated for each sales order item, and activities are generated for each Case ID depending on the category of the preceding and subsequent documents.
Enrichment
In this section, the main enrichment of O2C data set is performed.
It comprises the following functions:
Header Level Enrichment
This Join function is used to enhance the data stored and created in the Generating Case ID function with additional descriptive fields from the below mentioned SAP Standard ERP header level tables. They are joined via a lookup rule to extract the below mentioned fields which enrich the results of the iterative join.
-
LIKP – Delivery Document Header
-
VBAK – Sales Document Header
-
VBRK – Billing Document Header
-
SD Document Currency
-
Department [Sales, Billing, Delivery]
Item Level Enrichment
This Join function is used to additionally enhance the output data from the Header Level Enrichment with additional descriptive fields from the below mentioned SAP Standard ERP item level table. They are joined via a lookup rule to extract the below mentioned fields which enrich the results of the Header Level Enrichment join.
-
LIPS – Delivery Document Items
-
VBAP – Sales Document Items
-
VBRP – Billing Document Items
-
Temp Event Timestamp
-
Customer Number
-
Material
-
Material Group
-
Unit
-
Quantity
-
Net Order Value
-
Price
Customer Data Enrichment
This Join function is an additional level of enrichment used to enhance the output data from the Item Level Enrichment with additional descriptive fields from the below mentioned SAP Standard ERP customer table. They are joined via a lookup rule to extract the below mentioned fields which enrich the results of the Item Level Enrichment join.
It comprises the table KNA1 – Customer Master Data.
-
City
-
Country/Region
Join Change Document Data
This function joins the header and line item level document changes.
The changes are treated differently depending on whether they are line level changes or header level changes. Since each case is the path of a line in the document, level header changes are multiplied for each line of the document. This way the changes can be matched to their documents with the Customer Data Enrichment.
Join Accounting Document Data
This function joins the accounting document header and line item tables.
Prepare for Activity Generation
This join function is used to determine all relevant preceding and subsequent categories that are to be used for activity generation in the following function. Transaction codes are assigned to each subsequent category via a lookup function. Functions Join Change Documents Data and Join Accounting Documents Data are attached via union all.
Derive Activities
This Derivation function is used to derive an Activity ID for each document category type.
Each line coming from the Prepare for Activity Generation corresponds to a single document line and usually gives more than one activity. Common activities are the creation of the document and its clearing. Each rule defines an activity.
Join Variant ID to Activities
This Join function is used to create the Variant ID field and to join the output from the Derive Activities Derivation via left outer join of same table with newly created Variant ID field. The join is predicated on the Case ID from both. The output includes a Variant ID assigned to each activity.
The Variant ID field is created using string aggregation of activity IDs, ordered by Timestamp and Activity ID and grouped at Case ID level. A hash value is then produced for each unique value.
The data is also enriched with the User Type field from the USR02 – Logon Data function.
Calculate KPIs
-
Preceding Activity ID
-
Following Activity ID
-
Activity Frequency
-
Duration [Seconds]
-
Duration [Days]
-
Variant Frequency
-
Activity Sequence
-
Quantity
-
Right First Time Flag
-
Net Order Value
-
Right First Time Rate
-
Variant Rank by Frequency
Determine Automation and Compliance
This function generates an automation and compliance flag in every record and user type/violation type for automation/non-compliance in each record.
There are two types of violation, sequence and outright. Sequence violation means that a particular activity sequence represents violation. Outright violation occurs when an activity by itself represents the violation. In case of non-compliant records, the compliance flag is set to value “0”; else are set to value “1”.
There are also two types of users, dialog (type “A” and “S”) and batch (type “B”, “C” and “L”). Dialog user means that the tagged activity has been processed manually, while batch user means that the tagged activity has been processed automatically. In addition to the user type, the transaction code is taken into consideration. If the combination of transaction code and user type indicates an automatic transaction, the tagged activity is to be automatically processed. For automation records, the automation flag is set to value “1”; else are set to value “0”.
Determine Happy Path
This function generates a Happy Path Flag for every record. Records satisfying a happy path sequence have flag value “1”; else have value “0”.
Start and End
This Join function takes the Determine Happy Path function as input and creates new lines for each Case ID corresponding to a start and end point that is common to all. The variables Quantity Counter, Value and Variant Frequency are only assigned to the first or the last line, providing a quick way to sum over Case IDs without multiplying by the number of activities.