Sub topic 1
The procure-to-pay process at a glance
Procure-to-pay (P2P) is the chain of business steps that turns a need for goods or services into a paid supplier invoice. This chapter gives you the working model of that chain in SAP S/4HANA. Later chapters take each step apart.
Prerequisites
This chapter assumes you have:
- Basic knowledge of purchasing and accounts payable (what a purchase order and a supplier invoice are).
- Familiarity with navigating SAP GUI or the SAP Fiori launchpad.
- A working idea of debits, credits and general ledger accounts.
- For the code sample at the end, basic ABAP.
The working model: five steps, five documents
Each step in P2P creates a document, and each document refers to the one before it. That reference chain is what lets SAP check an invoice against what was ordered and received.
| Step | Document created | Typical transaction | Main table | Accounting effect |
|---|---|---|---|---|
| Request | Purchase requisition | ME51N | EBAN | None |
| Order | Purchase order (PO) | ME21N | EKKO, EKPO | None |
| Receive | Goods receipt (GR) material document | MIGO | MATDOC | Yes, if the item is valuated or account-assigned |
| Invoice | Invoice receipt (IR) | MIRO | RBKP, RSEG | Yes |
| Pay | Payment document | F110 | BKPF, ACDOCA | Yes |
In S/4HANA, material documents are stored in MATDOC, and journal entries are stored in the Universal Journal table ACDOCA. Fiori apps cover the same steps. For example, Manage Purchase Requisitions and Manage Purchase Orders replace the classic ME-transactions for most daily work.
What each step does
1. Purchase requisition
A purchase requisition is an internal request to buy something. It states material or service, quantity and required date. It can be created manually by an employee, or automatically by material requirements planning (MRP) when stock falls below a threshold. A requisition does not commit the company to anything and posts nothing to accounting.
2. Purchase order
A purchase order is a binding request to a supplier. It carries the supplier, items, quantities, prices, delivery dates and the plant that receives the goods. The system proposes the supplier and price from sourcing data such as info records and contracts. If a release strategy applies, the PO must be approved before it can be sent or received against.
3. Goods receipt
When the goods arrive, a goods receipt records the quantity against the PO item. For stock items it increases inventory (movement type 101). For items assigned to a cost center or an asset, the receipt can post straight to the expense or asset account instead of stock.
4. Invoice receipt
The supplier invoice is entered with reference to the PO. The system performs the three-way match. It compares the invoice with the PO (price and quantity ordered) and with the goods receipt (quantity delivered). If the differences are within tolerance, the invoice posts. Otherwise it is blocked for review.
5. Payment
The payment run selects open, due supplier items, pays them, and clears them. Payment is an accounts payable activity, not a purchasing one, so it is usually run by a different team.
Accounting along the way
Suppose you order 10 pieces of a stock material at 100.00 each. The accounting entries are:
| Event | Debit | Credit |
|---|---|---|
| Goods receipt of 10 pieces | Inventory 1,000 | GR/IR clearing 1,000 |
| Invoice for 1,000 | GR/IR clearing 1,000 | Supplier (accounts payable) 1,000 |
| Payment of 1,000 | Supplier 1,000 | Bank 1,000 |
The goods receipt/invoice receipt (GR/IR) account is a temporary balance sheet account. It holds the value of goods received but not yet invoiced. When the invoice arrives, the account clears to zero. A balance left in it at period end means something is still open: a receipt without an invoice, or an invoice without a receipt. Later chapters cover the clearing process.
The accounts come from automatic account determination (the transaction keys such as BSX for inventory and WRX for GR/IR), not from the user. This is why a missing configuration entry stops a goods receipt from posting.
Document flow and PO history
Every follow-on document keeps a link to its predecessor. In the PO, the History tab per item lists goods receipts and invoices. The same data is stored in table EKBE, where the field VGABE tells you the type: 1 for goods receipt, 2 for invoice receipt.
The following report lists the history of one purchase order.
REPORT z_p2p_po_history.
PARAMETERS p_ebeln TYPE ekbe-ebeln OBLIGATORY.
START-OF-SELECTION.
SELECT ebeln, ebelp, vgabe, belnr, buzei, menge
FROM ekbe
WHERE ebeln = @p_ebeln
ORDER BY ebelp, belnr
INTO TABLE @DATA(lt_history).
IF sy-subrc <> 0.
WRITE / 'No history found for this purchase order.'.
RETURN.
ENDIF.
LOOP AT lt_history INTO DATA(ls_hist).
" VGABE 1 = goods receipt, 2 = invoice receipt
WRITE: / ls_hist-ebelp, ls_hist-vgabe, ls_hist-belnr, ls_hist-menge.
ENDLOOP.A PO with no goods receipt and no invoice has no rows in EKBE. That is normal, not an error.
Where the process varies
The five-step model is the standard path. Real processes often differ:
- Requisition and RFQ steps can be skipped. Many POs are created directly, and some are created from contracts or scheduling agreements.
- Services are confirmed with a service entry sheet instead of a goods receipt.
- Some items are not valuated, so the goods receipt posts no accounting entry.
- Invoicing can come before receipt, or be set up so the system creates invoices automatically from receipts (evaluated receipt settlement).
- Invoice verification may be switched off for an item. In that case the three-way match is not performed, which changes the controls.
Common errors
- Posting a goods receipt against the wrong PO item. The invoice will later fail to match. Check the item number and quantity before posting.
- Expecting accounting from a PO or requisition. Neither posts to the ledger. Only the goods receipt, invoice and payment do.
- Ignoring a GR/IR balance. A growing balance usually means missing invoices or unposted receipts, not a system fault.
- Confusing blocked with rejected. A blocked invoice is posted, but payment is stopped until someone releases it.
- Reading old ECC documentation for tables. In S/4HANA, the old stock tables such as MKPF and MSEG are replaced by MATDOC, and customer and vendor master data are merged into the Business Partner.
Exercise
A PO for 20 units at 50.00 each is received in full and invoiced for the same amount. What are the two postings that clear the GR/IR account, and what is left in it afterwards?
Show answer
The goods receipt debits inventory 1,000 and credits GR/IR 1,000. The invoice receipt debits GR/IR 1,000 and credits the supplier 1,000. The GR/IR account is left with a zero balance.
Exercise
Which step in the process is the first to create an accounting document for a normal stock item, and which field in EKBE shows that document type?
Show answer
The goods receipt is the first. In EKBE, VGABE = 1 marks goods receipt entries (and VGABE = 2 marks invoice receipts).