Rana Maninder Singh
Lesson 9 of 12Supply Chain Analytics & Planning

Process Mining for Supply Chains

Lesson opener

In one line: Process mining turns ERP event logs into visible process flows that expose where supply chain time actually goes.

Why it matters: A weekly review meeting shows an average order-to-ship time. An event log shows that 22% of purchase orders touch a manual price-tolerance override, and those orders take three times as long as the happy path. Averages hide the variants that drive performance.

Before this lesson: Supply chain performance and KPIs, ERP for supply chains

What you will be able to do

Prerequisites

Process mapping through Continuous improvement projects provide the foundation. Process mining fundamentals introduces the event log structure, discovery mode, and conformance mode that this lesson applies to supply chain data — refer back to it whenever you need to review the three mandatory fields or the difference between discovery and conformance. ERP for supply chains provides context for the SAP and Oracle table names used here. This lesson does not require a licensed mining tool; the focus is on log design and question framing.


Why dashboards are not enough

A supply chain dashboard reports:

None of those numbers reveals which step failed, which vendor's orders loop through a manual approval, or whether the 8.3-day average is pulled up by a handful of orders stuck for six weeks. A dashboard aggregates. A process map rebuilt from the event log shows individual paths.

Supply chain work has three process boundaries that lend themselves to mining:

ProcessStart eventEnd eventBusiness question answered
Procure-to-Pay (P2P)Purchase requisition createdInvoice cleared / payment postedWhy do some orders take 30 days when the SLA is 10?
Order-to-Cash (O2C)Sales order createdPayment receivedWhich order type has the most credit blocks?
Plan-to-Produce (P2P-mfg)Planned order createdGoods issue to finished goodsWhere in production does WIP wait longest?

Each is a separate mining project with a different case identifier, different activities, and a different business owner.


Defining the case: the supply chain decision

Process mining fundamentals requires one sentence that defines a case. In supply chain work, that sentence is easy to get wrong.

P2P case options

OptionCase sentenceWhen to choose
Purchase order headerOne purchase order from creation to last invoice clearanceCross-vendor comparison on total order lead time
Purchase order lineOne material-vendor-quantity combinationItem-level cycle time; mix of fast and slow lines on one order
Purchase requisitionOne internal request from creation to PO creationInternal approval speed; no vendor data needed

Recommendation: Start with the purchase order line when comparing vendors or materials. The header conflates a fast consumable cleared yesterday with a raw-material line still open, and the fast lines dominate the average.

O2C case options

OptionCase sentenceWhen to choose
Sales order headerOne customer order from entry to final paymentOverall customer experience
DeliveryOne shipment of one or more order linesWarehouse and logistics performance
InvoiceOne billing document from creation to paymentFinance and credit performance

A delivery as the case answers different questions than a sales order as the case. Mixing case types in one event log produces a picture that cannot be interpreted.


Extracting the log from ERP

ERP for supply chains described the SAP module structure. The tables below contain the status and posting history that becomes the event log. Confirm table access with the basis team before starting any extract; row-level security, data retention policy, and archive status vary by system and client.

SAP S/4HANA — P2P event sources

TableDescriptionKey fields
EKKO / EKPOPO header and line master dataEBELN (PO number), EBELP (line item), LIFNR (vendor), MATNR (material)
EKBEPO history — goods receipts, invoice receipts, reversalsEBELN, EBELP, VGABE (transaction type), BUDAT (posting date)
RBKP / RSEGInvoice header and line dataBELNR (invoice document), BLDAT (invoice date), BUKRS (company code)

Constructing the P2P log:

-- Illustrative only; column names and schema depend on the SAP release and client configuration
SELECT
    EKKO.EBELN || '-' || EKPO.EBELP  AS case_id,
    CASE EKBE.VGABE
        WHEN '1' THEN 'Goods receipt'
        WHEN '2' THEN 'Invoice receipt'
        WHEN '3' THEN 'Credit memo'
        WHEN '6' THEN 'Delivery cost invoice'
        WHEN '9' THEN 'Goods receipt reversal'
        ELSE 'Other: ' || EKBE.VGABE
    END                               AS activity,
    EKBE.BUDAT                        AS event_date,
    EKKO.LIFNR                        AS vendor,
    EKPO.MATNR                        AS material,
    EKPO.WERKS                        AS plant
FROM EKBE
JOIN EKKO ON EKBE.EBELN = EKKO.EBELN
JOIN EKPO ON EKBE.EBELN = EKPO.EBELN AND EKBE.EBELP = EKPO.EBELP
WHERE EKKO.BSTYP = 'F'
  AND EKBE.BUDAT BETWEEN :start_date AND :end_date
ORDER BY case_id, event_date

Add the PO creation date from EKKO.AEDAT as a synthetic opening activity so every case has a start event. Without it, cases with early reversals appear shorter than they are, because the first movement type becomes the implicit start.

Oracle Fusion / Cloud ERP — P2P event sources

Oracle stores procurement history in PO_HEADERS_ALL, PO_LINES_ALL, and PO_LINE_LOCATIONS_ALL, with receipt transactions in RCV_TRANSACTIONS and invoice distributions in AP_INVOICE_DISTRIBUTIONS_ALL. The join logic follows the same pattern: use the PO header and line identifiers as the case key and the transaction date as the timestamp. Ask the DBA whether activity is better sourced from the transaction type column or from a workflow history table such as WF_ITEM_ACTIVITY_STATUSES.


Cycle time decomposition

Once the log is built, Bottleneck analysis asks where time goes. In supply chain process mining, cycle time decomposes into three components:

ComponentDefinitionSupply chain examples
Queue timeTime waiting for a resource or a decisionManager approval queue, three-way-match exception backlog, customs hold
Service timeTime actively being processedGoods inspection, invoice data entry, order picking
Transport timeTime physically moving between locationsVendor transit, last-mile delivery, inter-plant transfer

Queue time is almost always the largest component and the most controllable without capital investment. Service time improvements often need headcount or automation investment. Transport time improvements need network redesign or carrier changes. Queue time improvements often require only a process rule or a visibility alert.

SCOR cycle-time reference metrics

The SCOR (Supply Chain Operations Reference) model defines metrics that correspond to these stages:

SCOR metricDefinitionTypical range (industrial goods)
RL.2.1 — Delivery performance to commit date% of orders delivered on or before commitment90–95%
RS.2.1 — Order fulfillment cycle timeCalendar days from order receipt to delivery2–7 days (MTS), 5–30 days (MTO)
AM.2.1 — Cash-to-cash cycle timeDIO + DSO − DPO, in days30–70 days (manufacturing)
CO.2.1 — Total supply chain cost% of revenue5–15% (industrial)

Use these as context and conversation starters, not as pass/fail thresholds. A benchmark built on electronics contract manufacturing does not apply to a steel distributor.


Bottleneck detection in a supply chain log

A bottleneck in process mining is the activity with the highest total queue time contribution across all cases in a period — not the slowest individual case or the most-complained-about step. Bottleneck analysis explains the general method; supply chain logs add specific patterns to watch for.

Common P2P bottleneck patterns

BottleneckSymptom in the logLikely root cause
Three-way match exceptionLong gap between invoice receipt and invoice clearancePrice or quantity variance above tolerance triggers manual review queue
Goods receipt delayLarge gap between expected and actual goods receipt eventVendor late delivery, receiving dock backlog, or inspection queue
Approval loopSequence: PO created → PO rejected → PO amended → PO created (again)Price above delegated authority; approval matrix bypassed during demand peaks
Duplicate invoiceMultiple invoice receipts on the same PO lineVendor re-sends; system does not auto-deduplicate; manual matching fails

Common O2C bottleneck patterns

BottleneckSymptom in the logLikely root cause
Credit blockSales order → credit hold → credit release (days later) → deliveryCustomer at credit limit; automatic block not monitored with daily triage
Picking backlogTransfer order created → first picking scan (hours to days later)Warehouse capacity constraint, incorrect bin location in system
Delivery blockDelivery document created → block released → goods issuePrice not confirmed at order time, incomplete customer data

Conformance checking for supply chains

Conformance checking compares actual variants against a reference path. Process mining fundamentals requires that the reference path be agreed with the process owner before the check begins. In supply chain work, the reference is typically:

SCOR Level 3 P2P reference path for stocked materials

P3.1  Identify Sources of Supply
  →  P3.2  Select Supplier and Negotiate
  →  S1.1  Schedule Product Deliveries
  →  S1.2  Receive Product
  →  S1.3  Verify Product
  →  S1.4  Transfer Product
  →  S1.5  Authorize Supplier Payment

Map each SCOR step to the ERP activity that represents it. "Receive Product" maps to the goods receipt event. "Authorize Supplier Payment" maps to invoice clearance. Any case that skips a step, adds an unplanned step, or revisits a step is a conformance deviation.

Four meaningful supply chain conformance deviations

  1. Payment before goods receipt. Invoice clearance appears before any goods receipt event. Payment was authorized without physical confirmation of delivery. Percentage of lines affected is the key metric.
  2. Multiple approval cycles. PO creation appears more than once for the same case, indicating the order was rejected and recreated. Each cycle restarts the clock.
  3. Reverse goods receipt after clearance. A goods-receipt reversal appears after invoice clearance, meaning Finance confirmed the invoice but the goods were subsequently returned. This creates an unresolved financial liability.
  4. Vendor bypass. The purchase requisition reaches PO creation without a sourcing or vendor-selection step. The vendor was hard-coded, bypassing the competitive sourcing step in the reference path.

Each deviation is a question, not a verdict. Some deviations are policy-allowed — emergency purchases legitimately skip competitive sourcing. The mining tool surfaces the pattern; the process owner decides which occurrences require action.


Teacher walkthrough: P2P at a component manufacturer

Setting: A manufacturer of industrial seals extracts 14,000 P2P event log rows covering 1,200 PO lines from January to March. The process analyst begins with discovery.

Step 1 — Read the top five variants:

VariantActivity sequence% of casesAvg cycle time
V1PO created → GR → Invoice receipt → Invoice cleared61%6.2 days
V2PO created → GR → Invoice receipt → Exception review → Invoice cleared18%19.4 days
V3PO created → GR → GR reversal → GR (second) → Invoice receipt → Invoice cleared9%24.7 days
V4PO created → Invoice receipt → Invoice cleared (no GR)7%3.1 days
V5PO created → Amendment → PO created → GR → Invoice receipt → Invoice cleared5%28.9 days

Step 2 — Ask the frequency and duration questions separately:

Step 3 — Decompose V2:

Break the gap between invoice receipt and invoice cleared by day. 80% of the gap is a queue: invoices sit unassigned in the Accounts Payable shared inbox for an average of 11 days before anyone opens them. Service time once the review begins is 2 days. This is a queue problem, not a complexity problem. Adding more reviewers would help less than a daily triage rule that assigns invoices within four business hours of receipt.

Step 4 — Present findings with a named owner for each:


Failure example: mining the wrong case

Symptom: A team mines the P2P process and reports an average cycle time of 3.1 days, far better than the 8-day SLA. The procurement director is sceptical.

Diagnosis: The team used the purchase order header as the case identifier. The company raises multi-line POs where lines 2–5 are consumables (pens, packaging tape) cleared in 1–2 days. Those fast lines dominate the record count and pull the average down. The raw-material lines that drive production scheduling are buried.

Correction: Redefine the case as the PO line and filter to material category RM (raw material). The corrected analysis shows an average of 9.4 days, with 23% of raw-material lines exceeding 15 days. The 3.1-day average was real but irrelevant to the planning team's pain.

Prevention: Before extracting the log, write the case sentence from the SIPOC: "one raw-material quantity ordered from one supplier." Test the sentence against five rows from the extract before loading the full data set.


Pause and think

A conformance check shows that 7% of PO lines skip the goods receipt step and go straight to invoice clearance. The AP lead says "those are service POs — we always pay on invoice for maintenance contracts." What do you need to confirm before marking all those cases as policy-compliant?

(Answer: Confirm that all 7% are service-category POs, not goods POs. Add a material type or purchasing document category filter to the log and separate service lines from goods lines. If any goods PO lines appear in the no-GR group, that is a genuine finding independent of the service-contract policy.)


Guided practice: design a mining brief for Northline

Northline Industrial Components uses SAP S/4HANA. Procurement raises 400–600 POs per month. The procurement manager says average lead time is within target, but the planning team reports that raw-material shortages are causing unplanned production stoppages.

Design a P2P mining brief covering:

  1. One sentence defining the case.
  2. The SAP tables that supply case identifier, activity, and timestamp.
  3. The happy-path activity sequence you expect, in SCOR terms.
  4. Three conformance deviations most likely to explain production stoppages.
  5. The bottleneck pattern you will investigate first, and the reason.

Acceptance criteria:


Common mistakes

  1. Mining the PO header when lines on the same order have very different cycle times.
  2. Using a comment field or free-text description as the activity name — produces thousands of unique activities and an unreadable variant list.
  3. Running conformance before discovery — the reference path may not match what the system actually allows.
  4. Treating every missing goods receipt as a deviation without checking whether the lines are service POs.
  5. Ignoring timezone differences between plants and the central ERP server when comparing timestamps across sites.
  6. Reporting only the most-frequent variants and missing the slow long-tail variants that are causing the business pain.

Quick check

  1. What is the correct case identifier for a P2P mining project focused on raw-material vendor lead time?
  2. Which SAP table stores goods receipt and invoice receipt movements for a purchase order?
  3. A variant covers 4% of cases but has an average cycle time eight times the happy path. Should it be investigated before or after the 35%-frequency second variant?
  4. Name one supply chain conformance deviation that can be policy-allowed.
  5. What is the difference between a bottleneck and a slow activity?

Answers:

  1. The purchase order line (EBELN + EBELP), because it isolates one material-vendor-quantity combination and prevents fast consumable lines from diluting the raw-material average.
  2. EKBE — the PO history table — which stores transaction types including goods receipt (VGABE = 1) and invoice receipt (VGABE = 2).
  3. The 4%-frequency outlier should be investigated first. Its contribution to total cumulative delay can exceed the more-frequent variant, and it may indicate a systemic failure with a specific vendor tier or material category.
  4. Payment without goods receipt (no-GR path) is policy-allowed for service POs under maintenance contracts.
  5. A bottleneck is the activity whose total queue time across all cases in a period is highest, constraining overall process throughput. A slow activity takes long per case but may affect few cases and contribute less to total delay than the bottleneck.

Lesson summary

Supply chain process mining applies the three-field event log to ERP data. The key decision is the case definition — a PO line, an order header, or a delivery — and that decision must match the business question. Build the log from ERP history tables (EKBE for SAP P2P), add a synthetic start event, and run discovery before conformance. Cycle time decomposes into queue, service, and transport; queue time is usually the largest and most actionable component. Conformance checking requires an agreed reference — SCOR Level 3 or the implementation blueprint — and must distinguish policy-compliant deviations from genuine process failures.

Bridge to the next lesson

The bottleneck analysis and conformance findings identify where the supply chain loses time under normal conditions. The next lesson asks what happens when the supply chain faces an event it cannot control — a supplier failure, a port closure, a demand shock — and how to design a chain that absorbs disruption rather than fails under it.