SAP Purchase-to-Pay


Introduction

Purchase-to-Pay is the process from a buyer's perspective of buying, receiving, paying and accounting for goods. The process starts with a purchase request and ends with the payment of the invoice and includes all confirmation and checking steps in between. It is one of the core processes in an organization and is typically performed by multiple departments. The most important artifacts of the Purchase-to-Pay process are purchase orders, receipt of the goods and the invoice. Purchase-to-Pay is also known as Procure-to-Pay.

Purchase-to-Pay covers the following main processes in the procurement lifecycle.

Note that the Delivery and (parts of the) Payment processes are usually done in parallel.

Buying The process starts with a buyer from the company who wants to buy some goods. The buyer requests the purchase, using a purchase requisition. Procurement is involved to get the best deal. This could mean negotiation for a new contract or adapting to an already available contract. Procurement converts the requisition to a purchase order and makes sure the missing information is filled where needed. Procurement approves the purchase order (PO), which is then sent to the vendor.

Delivery The warehouse department (if available) waits for the goods to be received. When goods arrive, the inventory is checked and updated. The goods are received by the initial buyer, who accepts the goods.

Payment The finance department awaits the invoice to be received. When the invoice arrives, it is administrated. The invoice is paid by accounts payable. Accounting administrates the payment.

With the SAP Purchase-to-Pay app template you can create process apps that give insight in how your Purchase-to-Pay process actually performs. For example, how long it takes for a purchase request to become an actual Purchase Order, how long it takes to process the Purchase Orders, and most important to what extent are you paying in time. For all steps in the process, Purchase-to-Pay provides insights into the throughput times.


Loading data using Theobald Xtract Universal

In general, you should follow the steps as described in Loading data using Theobald Xtract Universal (Snowflake) or Loading data using Theobald Xtract Universal (SQL Server) to set up data loading using Theobald Xtract Universal.

Importing the template extractions

  1. Download the XU_template_extractions.zip file for loading data to Snowflake and XU_template_extractions_as.zip file for loading data to SQL Server.
  2. This file contains the folders destinations, extractions, and sources. Copy the folders from the downloaded zip file to the config folder of Xtract Universal. The location of this folder is [XU_installation_path]/config.
  3. Open Xtract Universal Designer and click on the refresh button to load all extractions.

Configuring the extraction script

  1. Download the extract_theobald.zip file for loading data to Snowflake and extract_theobald_as.zip file for loading data to SQL Server.
  2. This file contains the extract_theobald.ps1 script and the config.json file. Unzip the content on the server where Theobald Xtract Universal is installed.
  3. Configure the variables for the script.

Input fields

The input data consists of two parts: transactional data and master data. Below is an overview of the SAP input tables and input data fields for the SAP Purchase-to-Pay app template.

Transactional data tables

Purchase requisition tables

The following table is the standard SAP Purchase requisition table.

Table Stores Fields used in Process Mining Filtering
EBAN Purchase Requisition Data "MANDT", "BANFN" , "BNFPO", "BSTYP", "BSART", "BADAT", "ERNAM", "AFNAM", "BANPR", "MATKL", "MATNR", "MENGE", "PREIS", "WAERS", "MEINS" BSTYP = 'B' Date: BADAT

Purchasing document tables

The following tables are the standard SAP Purchasing document tables.

Table Stores Fields used in Process Mining Filtering
EKKO Purchasing Document Header Data "MANDT", "EBELN", "BSTYP", "BSART", "AEDAT", "BUKRS", "WAERS", "WKURS", "LIFNR", "EKORG", "EKGRP", "ERNAM", "PROCSTAT" BSTYP = 'F'Date: AEDAT
EKPO Purchasing Document Item Data "MANDT", "EBELN", "EBELP", "BSTYP", "BANFN", "BNFPO", "NETWR", "PRDAT", "MATKL", "MATNR", "MENGE", "LGORT", "WERKS", "KUNNR", "MEINS" BSTYP = 'F'
EKBE History per Purchasing Document Data "MANDT", "EBELN", "EBELP", "BELNR", "BUZEI", "BEWTP", "SHKZG", "CPUDT", "CPUTM", "ERNAM", "ELIKZ" BEWTP = 'E' AND SHKZG = 'S' Date: CPUDT
EKET Scheduling Agreement Schedule Lines Data "MANDT", "EBELN", "EBELP", "EINDT", "SLFDT"
EKKN Account Assignment in Purchasing Document Data "MANDT", "EBELN", "EBELP", "KOKRS", "KOSTL", "GSBER"

Invoice tables

The following tables are the standard SAP invoice tables.

Table Stores Fields used in Process Mining Filtering
RBKP Document Header Invoice Receipt Data "MANDT", "BELNR", "GJAHR", "BUKRS", "CPUDT", "CPUTM", "USNAM" Date: CPUDT
RSEG Document Item Incoming Invoice Data "MANDT", "BELNR", "GJAHR", "BUZEI", "EBELN", "EBELP"

Accounting tables

The following tables are the standard SAP accounting tables.

Table Stores Fields used in Process Mining Filtering
BKPF Accounting Document Header Data "MANDT", "BUKRS", "BELNR", "GJAHR", "CPUDT", "CPUTM", "AWKEY", "BLART", "USNAM" Date: CPUDT
BSIK Accounting Secondary Index for Vendors Data "MANDT", "BUKRS", "BELNR", "GJAHR", "BUZEI" BUZEI = 001 Date: CPUDT
BSAK Accounting Secondary Index for Vendors (Cleared Items) Data "MANDT", "BUKRS", "BELNR", "GJAHR", "BUZEI" BUZEI = 001 Date: CPUDT
BSE_CLR Additional Data for Document Segment Clearing Information Data "MANDT", "BUKRS_CLR", "BELNR_CLR", "GJAHR_CLR", "INDEX_CLR", "CLRIN", "BUKRS", "BELNR", "GJAHR", "BUZEI", "WAERS", "WRBTR", "SHKZG" BUZEI = 001 AND (CLRIN = '' or CLRIN = 2)

Change log tables

The following tables are the standard SAP change log tables.

Table Stores Fields used in Process Mining Filtering
CDHDR Change Document Header Data "MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "UDATE", "UTIME", "USERNAME" OBJECTCLAS in ["BANF", "EINKBELEG", "INCOMINGINVOICE", "BELEG"] Date: UDATE
CDPOS Change Document Item Cluster Data "MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "TABNAME", "TABKEY", "FNAME", "CHNGIND", "VALUE_OLD", "VALUE_NEW" FNAME in ["KEY", "BANPR", "PROCSTAT", "FRGZU", "LOEKZ", "ABSKZ", "NETPR", "ZLSPR", "ZTERM", "ZFBDT", "ZUONR", "BVTYP", "HBKID", "AUGBL"] AND TABNAME in ["EBAN", "EKKO", "EKPO", "RBKP", "RSEG", "BSEG", "BSEGR"] AND CHANGENR >= '<value>' AND CHANGENR <= '<value>' (For example, AND CHANGENR >= '0001299707' AND CHANGENR <= '0001507899')

Master data tables

User master data tables

The following tables are the standard SAP user master data tables.

Table Stores Fields used in Process Mining Filtering
USR21 User Name/Address Key Assignment Data "MANDT", "BNAME", "PERSNUMBER", "ADDRNUMBER"
ADRP Persons (Business Address Services) Data "CLIENT", "PERSNUMBER", "DATE_FROM", "DATE_TO", "NAME_FIRST", "NAME_LAST", "NATION" NATION = '' or NATION = 'I'
ADCP Person/Address Assignment (Business Address Services) Data "CLIENT", "PERSNUMBER", "ADDRNUMBER", "DATE_FROM", "DATE_TO", "DEPARTMENT", "FUNCTION", "NATION" NATION = '' or NATION = 'I'
USR02 Logon Data "MANDT", "BNAME", "USTYP"

Supplier master data table

The following table is the standard SAP supplier master data table.

Table Stores Fields used in Process Mining Filtering
LFA1 General Vendor Master Data "MANDT", "LIFNR", "NAME1", "NAME2", "LAND1", "REGIO", "XCPDK"
T005T Country Names Data "MANDT", "LAND1", "LANDX", "SPRAS" SPRAS = 'Language'
T005U Taxes Region Key Texts data "MANDT", "LAND1", "BLAND", "BEZEI", "SPRAS" SPRAS = 'Language'

Customer master data tables

The following table is the standard SAP customer master data table.

Table Stores Fields used in Process Mining Filtering
KNA1 General Customer Master Data "MANDT", "KUNNR", "NAME1", "NAME2", "LAND1", "REGIO"

Material master data tables

The following tables are the standard SAP material master data tables.

Table Stores Fields used in Process Mining Filtering
MAKT Material Descriptions Data "MANDT", "MATNR", "MAKTX", "SPRAS" SPRAS = 'Language'
T023T Material Group Descriptions Data "MANDT", "MATKL", "WGBEZ", "SPRAS" SPRAS = 'Language'
T001L Storage Locations Data "MANDT", "WERKS", "LGORT", "LGOBE"
T006A Assign Internal to Language-Dependent Unit Table and Data "MANDT", "MSEHI", "MSEHT", "SPRAS" SPRAS = 'Language'

Organizational structure master data tables

The following tables are the standard SAP organizational structure master data tables.

Table Stores Fields used in Process Mining Filtering
CSKT Cost Center Texts data "MANDT", "KOKRS", "KOSTL", "DATBI", "KTEXT", "SPRAS" SPRAS = 'Language' AND DATBI = "99991231"
T001 Company Codes Data "MANDT", "BUKRS", "BUTXT", "WAERS"
T001W Plants/Branches Data "MANDT", "WERKS", "NAME1"
T024 Purchasing Groups Data "MANDT", "EKGRP", "EKNAM"
T024E Purchasing Organizations Data "MANDT", "EKORG", "EKOTX"
TGSBT Business Area Names data "MANDT", "SPRAS", "GSBER", "GTEXT" SPRAS = 'Language'

Purchasing document master data tables

The following table is the standard SAP purchasing document master data table.

Table Stores Fields used in Process Mining Filtering
T161T Texts for Purchasing Document Types Data "MANDT", "BSART", "BSTYP", "BATXT", "SPRAS" SPRAS = 'Language'

Block & Cancellation reasons master data tables

The following table is the standard SAP block & cancellation reasons master data table.

Table Stores Fields used in Process Mining Filtering
T008T Blocking Reason Names in Automatic Payment Transactional data "MANDT", "ZAHLS", "TEXTL", "SPRAS" SPRAS = 'Language'

Currency master data tables

The following tables are the standard SAP currency master data tables.

Table Stores Fields used in Process Mining Filtering
TCURR Exchange Rates Data "MANDT", "KURST", "FCURR", "TCURR", "GDATU", "UKURS" KURST = 'Exchange rate type'
TCURF Conversion Factors Data "MANDT", "KURST", "FCURR", "TCURR", "GDATU", "FFACT", "TFACT" KURST = 'Exchange rate type'
TCURX Decimal Places in Currencies data "CURRKEY", "CURRDEC"

Design specifications

Entities

Process entities

The following entities are defined.

Master data entities

Master data entities contain static information such as names and descriptions to provide additional information on the process entities. The following master data entities are defined.

User

Supplier

Customer

Material

Organizational structure

Purchasing document

Block/cancellation reason

Currency

Activities

Purchase Requisition activities

Purchase order activities

Goods movement activities

Invoice activities

Accounting activities