Processing
In this section, you execute the core functions of the model.
This stream takes the data from Account Receivable and analyses the process. The starting points are functions Accounting Document Header in BKPF and Accounting Document Items in BSEG and the document changes in CDHDR and CDPOS. Only documents relevant to Accounts Receivable are selected here.
Key activities are derived both from the documents and their changes. Each document is assigned a unique Case ID. Lines in the final document represent activities and are marked by a timestamp as well as some additional fields, such as an automation and compliance flag. The cases are grouped into different variants (unique sequence of activities) which are then ranked according to their frequency of occurrence. Next, KPIs are computed to provide useful information that helps understand the process and where, when and how it deviates from the standard variant.
-
BKPF – Accounting Document Header
-
BSEG – Accounting Document Items
-
CDHDR – Change Document Header
-
CDPOS – Change Document Items
-
KNA1 – Customer Master Data
-
MARA – General Material Table
-
USR02 – Logon Data
-
Automatic Transactions
-
Process Compliance Rules
-
Process Forecast Data
It comprises the following functions:
Join Header and Line Item Data
In this function, the header and line items of the accounting documents are joined. The selected account type of the document (KOART) is “D – Customer” which identifies only the documents relevant to Accounts Receivable.
The join method used is inner join in order to select only the documents for AR from BKPF since a direct selection is not possible. In addition, it allows you to exclude any document for which there is no match between BKPF and BSEG.
The data is also enriched with fields from the KNA1 – Customer Master Data table (LAND1, ORT1, NAME1) and MARA – Material Master Data table (MATKL).
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. The Case ID is also computed in this process. This way the changes can be matched to their documents with the Join Activity Derivation Results.
Derive Activities from Header and Line Item Data
This Derivation function is used to derive basic activities for each document.
Each line coming from Join Header and Line Item Data 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.
Derive Activities from Change Document Data
This Derivation function is used to derive an Activity ID for key change lines coming from the Join Change Document Data function.
The Case ID for each document was already assigned. Each rule has a corresponding activity. Any line not used for an activity is discarded.
Join Activity Derivation Results
This Join function is used to join the two activity streams (Derive Activities from Header and Line Item Data and Derive Activities from Change Document Data) and to compute the Variant ID.
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. Then, the Variant ID is joined via left outer join to the original input table. The join predicate is the Case ID for both joins.
Calculate KPIs
-
Preceding Activity ID
-
Following Activity ID
-
Right First Time Flag
-
Activity Frequency
-
Duration [Seconds]
-
Duration [Days]
-
Variant Frequency
-
Activity Sequence
-
Quantity
-
Right First Time Rate
-
Variant Rank by Frequency
-
Currency
-
Local Currency
Determine Automation and Compliance
This function generates an automation and compliance flag in every record and user type/transaction 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. In case of 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.