Your Purchase to Pay - Purchase Order Data Template

SAP S/4HANA
Your Purchase to Pay - Purchase Order Data Template

Your Purchase to Pay - Purchase Order Data Template

This template guides you through the essential data points needed to analyze your Purchase to Pay - Purchase Order process. It outlines the critical attributes to collect, the key activities to track, and provides clear guidance on how to extract this data from SAP S/4HANA. Utilize this resource to build a robust event log and gain deeper insights into your procurement operations.
  • Recommended attributes for detailed analysis
  • Key activities to track within the process
  • Step-by-step data extraction guidance
New to event logs? Learn how to create a process mining event log.

Purchase to Pay - Purchase Order Attributes

These are the recommended data fields to include in your event log for a comprehensive analysis of your Purchase to Pay - Purchase Order process.
5 Required 6 Recommended 10 Optional
Name Description
Activity
ActivityName
The name of the business event or step that occurred in the purchase order process.
Description

This attribute describes a specific action or status change within the purchase order's lifecycle, such as 'Purchase Order Created', 'Purchase Order Approved', or 'Goods Receipt Posted'. The sequence of these activities forms the process flow.

Analyzing the sequence and frequency of activities is the core of process mining. It helps to discover the actual process, compare it against the designed model, identify bottlenecks (e.g., long waits after 'Invoice Received'), and quantify rework (e.g., repeated 'Purchase Order Changed' activities).

Why it matters

It defines the steps in the process, allowing for the visualization and analysis of the end-to-end flow, variant analysis, and bottleneck identification.

Where to get

Typically derived from a combination of tables and fields, such as status fields in EKKO/EKPO or change document logs in CDHDR/CDPOS, to represent key business milestones.

Examples
Purchase Order CreatedPurchase Order ApprovedGoods Receipt PostedInvoice Received
Event Time
EventTime
The timestamp indicating when the activity occurred.
Description

This attribute records the exact date and time of each activity in the process. It is fundamental for all time-based analysis in process mining.

Event Time is used to order the activities chronologically to build the process flow. Furthermore, it is the basis for calculating all duration-based metrics, such as cycle times between activities, waiting times, and processing times, which are critical for performance analysis and bottleneck identification.

Why it matters

This timestamp is critical for ordering events correctly and calculating all performance metrics, including cycle times, lead times, and waiting times.

Where to get

Timestamp fields associated with specific activities, such as Creation Date (EKKO-AEDAT for changes) or Posting Date (MKPF-BUDAT for goods receipts). Often requires combining data from multiple tables.

Examples
2023-04-15T10:00:00Z2023-04-15T14:30:00Z2023-05-01T09:15:00Z
Purchase Order
PurchaseOrderNumber
The unique identifier for the Purchase Order (PO), serving as the primary case ID for tracking the procurement lifecycle.
Description

The Purchase Order Number is the central identifier that links all related activities, from the initial creation to the final goods receipt and completion. It acts as the case identifier for process mining analysis.

In analysis, grouping events by this number allows for the reconstruction of each individual PO's journey. This is essential for calculating cycle times, analyzing process variants, and identifying bottlenecks or deviations specific to a single order.

Why it matters

It is the essential key to connect all procurement events into a single end-to-end process, enabling a detailed analysis of each purchase order's lifecycle.

Where to get

This attribute can be found in the SAP S/4HANA table EKKO, field EBELN.

Examples
450001712345000171244500017125
Last Data Update
LastDataUpdate
The timestamp when the data was last refreshed or extracted from the source system.
Description

This attribute indicates the freshness of the data being analyzed. It shows the date and time of the most recent data pull from SAP S/4HANA.

Knowing the last data update time is vital for users to understand the timeliness of their analysis. It helps them interpret the findings correctly, knowing whether they are looking at real-time information or a snapshot from a specific point in time, which affects the relevance of any actions taken based on the analysis.

Why it matters

Informs users about the timeliness of the data, ensuring they understand the context and relevance of their analytical findings.

Where to get

This is a metadata timestamp added during the data extraction, transformation, and loading (ETL) process.

Examples
2024-05-21T02:00:00Z2024-05-20T02:00:00Z2024-05-19T02:00:00Z
Source System
SourceSystem
Identifies the source system from which the data was extracted.
Description

This attribute specifies the system of origin for the event data, for example, 'SAP S/4HANA Production' or 'SAP ECC'.

In environments with multiple systems, this field is crucial for data lineage, troubleshooting, and ensuring that data from different sources is correctly interpreted. It helps in understanding the context of the data and can be used to filter analysis for specific system environments.

Why it matters

Provides essential context about the data's origin, which is critical for data governance, validation, and analysis in multi-system landscapes.

Where to get

This is typically a static value added during the data extraction, transformation, and loading (ETL) process to label the dataset with its origin.

Examples
S4H_PROD_100ECC_EU_200S4H_US_300
PO Document Type
DocumentType
A classification that distinguishes different types of purchase orders, such as standard POs, service POs, or stock transport orders.
Description

The Document Type is a key configuration element in SAP that controls the process flow, number range, and fields for a purchase order. It allows businesses to tailor the procurement process for different scenarios.

Analyzing the process by document type is crucial for understanding process variations. For instance, the process for a standard goods PO may be very different from a service PO or a stock transfer. This attribute allows for filtering and comparing these distinct process flows to find specific improvement opportunities.

Why it matters

It categorizes purchase orders, allowing for the comparison of different procurement processes and helping to explain variations in process flows and cycle times.

Where to get

This attribute is located in the SAP S/4HANA table EKKO, field BSART.

Examples
NBFOUB
Purchase Requisition
PurchaseRequisitionNumber
The identifier of the purchase requisition (PR) that initiated the purchase order.
Description

This attribute links the purchase order back to its originating purchase requisition. Not all POs will have a PR if they are created directly.

This link is essential for analyzing the full end-to-end procurement process, starting from the initial request. It supports KPIs like 'Purchase Requisition Approval Time' and is fundamental for identifying 'Maverick Spend', where POs are created without a preceding, approved requisition.

Why it matters

Connects the PO to the initial request, enabling end-to-end process analysis and the identification of non-compliant maverick spend.

Where to get

This attribute is located in the SAP S/4HANA table EKPO (PO Item level), field BANFN.

Examples
1001005110010052
Requested Delivery Date
RequestedDeliveryDate
The date on which the business requested the vendor to deliver the goods or services.
Description

This attribute specifies the target delivery date agreed upon in the purchase order. It serves as the baseline for measuring supplier delivery performance.

In process mining, this date is compared against the actual goods receipt date ('Goods Receipt Posted' timestamp) to calculate the 'Supplier On-Time Delivery Rate' KPI. Analyzing deviations from this date helps in assessing supplier reliability and managing supply chain risks.

Why it matters

Serves as the baseline for measuring supplier on-time delivery performance, a critical KPI for supply chain management and operational planning.

Where to get

This can be found in the schedule line table EKET, field EINDT.

Examples
2023-06-012023-06-152023-07-01
Total Net Amount
TotalNetAmount
The total value of the purchase order, excluding taxes and freight costs.
Description

This attribute represents the net monetary value of the purchase order. It is a key financial figure that indicates the size of the procurement transaction.

This amount is crucial for financial analysis, such as categorizing POs by value (high-value vs. low-value) to see if their process paths differ. It can also be used to prioritize analysis, focusing on high-value orders that may carry more financial risk or have a greater impact on the business.

Why it matters

Allows for financial-based analysis, helping to segment purchase orders by value and prioritize process improvement efforts on high-spend areas.

Where to get

This attribute can be found in the SAP S/4HANA table EKKO, field NETWR.

Examples
1500.0025000.50125.75
User
UserName
The identifier of the user who performed a specific activity.
Description

This attribute captures the SAP user ID responsible for creating, changing, or approving a document. It provides traceability for actions taken within the system.

Analyzing by user helps identify training needs, workload distribution, and individual performance. For example, it can be used to see if specific users are consistently associated with long approval times or frequent post-approval changes, which can inform resource management and process improvement initiatives.

Why it matters

Provides accountability and enables performance analysis at the individual or team level, helping to identify training opportunities or resource constraints.

Where to get

This information is found in fields like ERNAM (Created by) in EKKO or from the user field in change document tables (CDHDR-USERNAME).

Examples
CB9980000012JSMITHRROE
Vendor ID
VendorId
The unique identifier for the supplier or vendor providing the goods or services.
Description

The Vendor ID is a critical piece of master data that links a purchase order to a specific supplier. It is used throughout the procurement process for communication, delivery, and payment.

In process mining, this attribute allows for performance analysis to be segmented by supplier. It is essential for dashboards like 'Supplier Lead Time Performance' and 'Goods Return Rate by Vendor', helping to identify the most reliable suppliers and those who may be causing delays or quality issues.

Why it matters

Enables supplier-centric analysis, helping to evaluate performance, identify high- and low-performing vendors, and optimize the supply chain.

Where to get

This attribute is located in the SAP S/4HANA table EKKO, field LIFNR.

Examples
100023100045100088
Company Code
CompanyCode
The identifier for the legal entity or company for which the purchase order is created.
Description

The Company Code represents an independent accounting unit within an organization. All financial transactions related to a purchase order are posted to a specific company code.

This is a fundamental organizational attribute that allows for filtering and comparing procurement processes across different legal entities. Analysis by company code can reveal inconsistencies in process execution, differing levels of efficiency, or varying compliance rates across the organization.

Why it matters

Enables process analysis to be segmented by legal entity, facilitating comparisons of performance and compliance across different parts of the business.

Where to get

This attribute is located in the SAP S/4HANA table EKKO, field BUKRS.

Examples
101017102000
Is Maverick Spend
IsMaverickSpend
A calculated flag indicating if a purchase order was created without a preceding, approved purchase requisition.
Description

This boolean flag is derived during data processing. It is set to 'true' if a purchase order lacks an associated purchase requisition or if the PO creation bypasses the standard approval workflow.

This attribute directly supports the 'Maverick Spend Identification' dashboard and related KPIs. It helps quantify the extent of non-compliant purchasing behavior, enabling businesses to target specific departments or user groups to reinforce procurement policies and controls.

Why it matters

Directly identifies non-compliant purchasing, helping to quantify process deviations and enforce financial controls and procurement policies.

Where to get

Calculated field based on the absence of a value in 'PurchaseRequisitionNumber' for specific document types, or by analyzing the event sequence.

Examples
truefalse
Is Rework
IsRework
A calculated flag indicating if the purchase order underwent rework, such as a post-approval change or goods return.
Description

This boolean attribute is calculated by analyzing the sequence of activities for each purchase order. It is marked as 'true' if a 'Purchase Order Changed' event occurs after a 'Purchase Order Approved' event, or if a 'Goods Returned' event is present.

This flag simplifies the calculation of the 'Straight-Through Processing Rate' KPI. It allows for easy filtering and visualization of all POs that required manual intervention or correction, helping to quantify the cost and frequency of rework.

Why it matters

Helps quantify process inefficiency by flagging cases with rework, which is crucial for calculating straight-through processing rates and identifying root causes of deviation.

Where to get

Calculated field based on the sequence of activities. Logic checks if a 'Purchase Order Changed' event follows an approval or if a 'Goods Returned' event exists.

Examples
truefalse
Item Category
ItemCategory
Classifies a purchase order line item, such as standard, consignment, subcontracting, or service.
Description

The Item Category determines how the procurement of a specific material or service is controlled and processed. It influences subsequent steps like goods receipt and invoice verification.

This attribute is important for analyzing process variants based on what is being purchased. For example, the process for a service item (which requires a service entry sheet) differs significantly from a standard stock item. Analyzing by item category helps explain these differences and allows for targeted process improvements.

Why it matters

Explains process variations by distinguishing between different types of procurement, such as goods, services, or subcontracting.

Where to get

This attribute is located in the SAP S/4HANA table EKPO, field PSTYP.

Examples
093
Material Number
MaterialNumber
The identifier for the specific material or good being procured.
Description

The Material Number is a unique code assigned to each material master record in SAP. It is used for all transactions related to that material, including procurement, inventory management, and sales.

Analyzing by material number or material group allows for commodity-based analysis. It can help identify if procurement processes for certain types of materials are less efficient, have longer lead times, or are more prone to returns, providing insights for category management.

Why it matters

Enables commodity-based analysis, helping to identify process issues or supplier performance problems related to specific products or materials.

Where to get

This attribute is located in the SAP S/4HANA table EKPO, field MATNR.

Examples
RM100-100FG210SERV-CONSULT
Plant
Plant
The operational facility or location to which the goods are delivered or services are rendered.
Description

In SAP, a Plant is a physical location where goods are produced, stored, or services are performed. It is a key element for logistics and planning.

Segmenting process analysis by plant can reveal regional or site-specific variations in the procurement process. For instance, it can show if certain plants experience longer delivery times or have higher rates of goods returns, pointing to localized logistics or quality control issues.

Why it matters

Allows for location-based analysis, highlighting process performance differences between various operational sites, plants, or warehouses.

Where to get

This attribute is located in the SAP S/4HANA table EKPO, field WERKS.

Examples
10101710DE01
PO Approval Cycle Time
PoApprovalCycleTime
The calculated duration from when a purchase order was created to when it received final approval.
Description

This metric measures the time elapsed between the 'Purchase Order Created' activity and the 'Purchase Order Approved' activity. It is calculated for each purchase order case.

This attribute provides a direct measure of internal approval efficiency. It is the primary metric for the 'PO Approval Cycle Time' dashboard and KPI, helping to identify where delays in the approval process occur and pinpoint opportunities for acceleration.

Why it matters

Directly measures the efficiency of the internal approval process, helping to identify and address bottlenecks that slow down procurement.

Where to get

Calculated by finding the time difference between the 'Purchase Order Approved' event and the 'Purchase Order Created' event for each Purchase Order.

Examples
P2D4H30MP0D2H15MP5D
Purchasing Group
PurchasingGroup
The specific group of buyers responsible for certain procurement activities.
Description

A Purchasing Group is a buyer or a group of buyers who are responsible for specific purchasing activities, materials, or suppliers. They are the primary point of contact for vendors.

This attribute allows for a more granular analysis of workload and performance than the purchasing organization. It can be used to identify overburdened teams, measure the efficiency of different buyer groups, and understand which groups are more prone to process deviations like maverick spend.

Why it matters

Provides a granular view of buyer group performance, enabling analysis of workload, efficiency, and process adherence at the team level.

Where to get

This attribute is located in the SAP S/4HANA table EKKO, field EKGRP.

Examples
001002N00
Purchasing Organization
PurchasingOrganization
The organizational unit responsible for procuring materials and services and negotiating with vendors.
Description

The Purchasing Organization is a key organizational unit in procurement. It can be structured at the corporate, company, or plant level and is responsible for all purchasing activities.

Analyzing the process by purchasing organization helps to evaluate the efficiency and performance of different procurement teams or regions. It can highlight differences in supplier negotiation, process compliance, or approval delays between organizational units.

Why it matters

Allows for performance comparison between different procurement departments or regions, helping to identify best practices and areas for improvement.

Where to get

This attribute is located in the SAP S/4HANA table EKKO, field EKORG.

Examples
10101710US01
Supplier On-Time Delivery
SupplierOnTimeDelivery
A calculated flag indicating whether the goods receipt was posted on or before the requested delivery date.
Description

This boolean attribute is derived by comparing the timestamp of the 'Goods Receipt Posted' activity with the 'Requested Delivery Date'. If the goods receipt is on or before the requested date, it is marked 'true'.

This attribute directly supports the 'Supplier On-Time Delivery Rate' KPI. It simplifies analysis by allowing users to easily filter for on-time or late deliveries, which is essential for vendor performance dashboards and supplier scorecarding.

Why it matters

Directly measures supplier reliability, forming the basis for the on-time delivery KPI and enabling effective vendor performance management.

Where to get

Calculated by comparing the timestamp of the 'Goods Receipt Posted' activity with the 'RequestedDeliveryDate' attribute.

Examples
truefalse
Required Recommended Optional

Purchase to Pay - Purchase Order Activities

These are the essential process steps and milestones to capture in your event log for accurate process discovery and optimization.
7 Recommended 6 Optional
Activity Description
Goods Receipt Posted
Represents the physical receipt of goods from the vendor and the corresponding entry in the system. This is an explicit transaction that updates the purchase order history.
Why it matters

This is a major milestone that ends the supplier lead time and begins the internal process of invoice verification. It is essential for tracking on-time delivery rates.

Where to get

Recorded as a material document in tables MKPF (header) and MSEG (item), and linked in the purchase order history table EKBE with a specific movement type (e.g., 101).

Capture

Posting date (BUDAT) from the material document header (MKPF) linked via EKBE.

Event type explicit
Invoice Received
Represents the entry of a vendor's invoice into the SAP system, linking it to the corresponding purchase order. This is an explicit financial posting that creates an accounting document.
Why it matters

This is a critical milestone connecting the procurement process with the accounts payable process. It allows analysis of the time between goods receipt and invoice processing.

Where to get

An accounting document is created in table BKPF (header) and its line items are in BSEG or the universal journal ACDOCA. The document is linked to the PO in table RSEG.

Capture

Document entry date (CPUDT) from the accounting document header table BKPF.

Event type explicit
Purchase Order Approved
Signifies that the purchase order has received all necessary internal approvals and is authorized for release to the vendor. The event is inferred from a status change in the purchase order's release strategy.
Why it matters

This is a key milestone for measuring approval efficiency and post-approval rework. Analyzing the time between PO creation and approval highlights internal process delays.

Where to get

Inferred from the release indicator (FRGKE) in the EKKO table. The timestamp is determined by looking at the change history (CDHDR/CDPOS) for when this field was updated to the 'released' status.

Capture

Inferred from change logs for the release indicator field (FRGKE) in the EKKO table.

Event type inferred
Purchase Order Completed
This activity signifies that a purchase order item is considered closed from a logistics perspective. It is inferred when the 'Delivery Completed' and 'Final Invoice' indicators are both set.
Why it matters

This serves as the end point for the purchase order lifecycle analysis. Measuring the time to this event provides the end-to-end cycle time for procurement operations.

Where to get

Inferred from status flags on the purchase order item table, EKPO. The event occurs when both the 'Delivery Completed' indicator (ELIKZ) and 'Final Invoice' indicator (EREKZ) are set to true.

Capture

Inferred from change logs when EKPO fields ELIKZ and EREKZ are both flagged as complete.

Event type inferred
Purchase Order Created
Marks the creation of the official purchase order document, which may be created with or without reference to a purchase requisition. This is an explicit event captured when the PO document is first saved in the system.
Why it matters

This activity can serve as an alternative starting point for the process, especially for maverick buying analysis. It is a fundamental event for tracking overall PO processing time.

Where to get

Recorded in the purchase order header table EKKO. The creation date (AEDAT) and time are stored directly in this table for the document.

Capture

Creation timestamp (AEDAT) in the EKKO table for the purchase order document.

Event type explicit
Purchase Requisition Approved
Represents the formal approval of a purchase requisition by a manager or designated approver. This is typically inferred from a status change in the requisition document, signifying it is ready for conversion to a purchase order.
Why it matters

This is a critical milestone for tracking approval cycle times and identifying bottlenecks. Delays here directly impact how quickly a purchase order can be created and sent to a vendor.

Where to get

Inferred from the release status fields in the EBAN table (e.g., FRGZU - Release indicator). The timestamp is derived from the change documents (CDHDR/CDPOS) that record when the final release status was set.

Capture

Inferred from change logs (CDHDR/CDPOS) for release status fields in the EBAN table.

Event type inferred
Purchase Requisition Created
This activity marks the formal request for goods or services, initiating the procurement process. The event is captured explicitly when a user saves a new purchase requisition document (e.g., using transaction ME51N).
Why it matters

This is the primary start point for many purchase order lifecycles. Analyzing the time from this event to PO creation helps identify delays in sourcing and internal processing.

Where to get

Recorded in table EBAN (Purchase Requisition). The creation event timestamp can be found in the change history tables CDHDR and CDPOS for the EBAN object.

Capture

Event recorded upon creation of a document in the EBAN table.

Event type explicit
Goods Returned
Indicates that previously received goods were returned to the vendor, typically due to quality issues, damage, or incorrect shipments. This is captured as an explicit reversal goods movement.
Why it matters

This activity highlights rework and potential problems with supplier quality or order accuracy. A high frequency of returns for a specific vendor or material signals an issue.

Where to get

Recorded as a material document with a specific return movement type (e.g., 122). The event is logged in MKPF/MSEG and linked to the PO in the EKBE history table.

Capture

Posting date from the material document with a return movement type in EKBE.

Event type explicit
Invoice Paid
Marks the final settlement of the vendor invoice through a payment run or manual payment. This is an explicit financial transaction that creates a clearing document.
Why it matters

While technically part of the payment process, including this activity provides a complete view of the procure-to-pay cycle. It is key for analyzing payment terms and performance.

Where to get

The payment is recorded as a clearing document in BKPF/ACDOCA. The clearing date (AUGDT) on the invoice line item in table BSEG or ACDOCA indicates the payment event.

Capture

Clearing Date (AUGDT) of the invoice document, found in BSEG or ACDOCA.

Event type explicit
Purchase Order Changed
This activity indicates that a modification was made to the purchase order after its initial creation, such as a change in quantity, price, or delivery date. It is captured explicitly in system change logs.
Why it matters

Tracking changes, especially after approval, is critical for identifying process inefficiencies, rework, and potential compliance issues. Frequent changes can point to poor initial specifications.

Where to get

Recorded in the change document tables CDHDR (header) and CDPOS (item) for purchase order objects (EINKBELEG). Each change creates a detailed log entry.

Capture

Event logged for changes to key fields in the EKKO or EKPO tables, recorded in CDHDR/CDPOS.

Event type explicit
Purchase Order Deleted
Represents the cancellation or logical deletion of a purchase order item or the entire document. This is captured by a user setting a deletion flag on the document.
Why it matters

This activity is an alternative end point for the process, indicating a failure or cancellation. Analyzing why POs are deleted can uncover issues in demand planning or requirements definition.

Where to get

Captured from the deletion indicator flag (LOEKZ) in the purchase order header (EKKO) or item (EKPO) tables. The timestamp is derived from the change documents (CDHDR/CDPOS).

Capture

Timestamp from change documents (CDHDR/CDPOS) when the deletion flag (LOEKZ) is set.

Event type explicit
Purchase Order Sent to Vendor
Represents the moment the purchase order is communicated to the vendor, for example, via EDI, email, or print. This event is often captured through the system's output management logs.
Why it matters

This activity is the true start of the supplier lead time. It is crucial for accurately measuring supplier performance from the moment they receive the order.

Where to get

Captured from the output control table NAST, which logs messages sent for a purchasing document. The date and time of the relevant output type (e.g., EDI, email) can be used.

Capture

Timestamp of the first successful output message for the PO in the NAST table.

Event type inferred
Services Confirmation Entered
This activity marks the confirmation that a service specified on a purchase order has been rendered. It is captured explicitly through the creation of a service entry sheet.
Why it matters

For service-based procurement, this is the equivalent of a goods receipt. It is crucial for tracking service delivery timelines and enabling timely vendor payments.

Where to get

Recorded via the creation of a service entry sheet, with data stored in tables ESSR (header) and ESLL (lines). The creation date serves as the timestamp.

Capture

Creation date of the Service Entry Sheet document in table ESSR.

Event type explicit
Recommended Optional

Extraction Guides

How to get your data from SAP S/4HANA