Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 36 ยท Logistics: MM/SD

Procure-to-Pay in SAP MM

Follow the SAP procure-to-pay cycle from purchase requisition to purchase order, goods receipt, invoice verification and payment, with key tcodes and tables.

Almost every company buys things: raw materials, spare parts, laptops, consulting hours. In SAP, the Materials Management (MM) module owns that buying process, and the end-to-end chain is called procure-to-pay (P2P). It starts when someone realizes they need something and ends when the supplier has been paid. Along the way MM talks to Finance (FI), Controlling (CO) and Warehouse Management, so understanding P2P also teaches you how SAP modules are glued together.

This lesson walks through the standard cycle, names the transaction codes you would use in an SAP GUI system, and shows which database tables hold the documents. The real SAP system is not available on this site, so the examples are described precisely and the runnable code is a clearly labelled stand-in: a small JavaScript model of the document flow. It is not SAP and it does not use SAP code.

The cycle at a glance

flowchart LR
  A["Purchase requisition<br/>ME51N"] --> B["RFQ / quotation<br/>ME41, ME47"]
  B --> C["Purchase order<br/>ME21N"]
  C --> D["Goods receipt<br/>MIGO, movement 101"]
  D --> E["Invoice verification<br/>MIRO"]
  E --> F["Payment run<br/>F110"]

Each step creates a document that points back to the previous one, so you can always trace an invoice to its order.

Not every company uses every step. Many skip the request for quotation (RFQ) when a contract or a favorite supplier already exists. Some skip the purchase requisition (PR) and create orders directly. The three steps that almost everyone keeps are the purchase order, the goods receipt and the invoice, because they matter for accounting.

Master data you need first

A purchase order cannot exist without master data:

  • Material master (MM01, table MARA for general data): describes what you buy, its unit of measure, material group and, per plant, its valuation.
  • Vendor master (XK01 in ECC, or business partner BP in S/4HANA): the supplier, with address, bank details and payment terms.
  • Purchasing info record (ME11): the price and delivery time of one material from one vendor.
  • Organizational units: the purchasing organization (who negotiates), purchasing group (the buyers) and plant (where the goods arrive).

Step by step

1. Purchase requisition. A department requests material in ME51N. The PR (table EBAN) is an internal document: it commits nothing to a supplier. It can be created manually or automatically by MRP when stock falls below a reorder level.

2. Source determination and RFQ. The buyer finds a supplier through info records, contracts or a source list. If prices must be compared, an RFQ goes to several vendors (ME41) and quotations are entered (ME47) and compared (ME49).

3. Purchase order. In ME21N the buyer creates the PO, which is a legal request to the vendor. It is stored in EKKO (header) and EKPO (items). Each item has a item category (standard, subcontracting, consignment, and so on) and an account assignment category (for example K for cost center, which means the goods are consumed directly instead of kept in stock).

4. Goods receipt. When the delivery arrives, the warehouse posts it in MIGO with movement type 101 (goods receipt for a purchase order). This creates a material document and an accounting document. For stock material, inventory rises and a goods receipt / invoice receipt clearing account (GR/IR) is credited.

5. Invoice verification. The vendor's invoice is entered in MIRO. SAP compares it with the PO and the goods receipt. This comparison is the famous three-way match, and you will build one in Project: Three-Way Match. If it matches, the GR/IR account is cleared and a vendor liability is posted.

6. Payment. Finance pays due invoices, usually with the automatic payment program (F110). The vendor liability is cleared against the bank account.

What happens in accounting

A goods receipt for stock material posts, simply:

Step Debit Credit
Goods receipt (101) Stock (inventory) GR/IR clearing
Invoice receipt (MIRO) GR/IR clearing Vendor (accounts payable)
Payment (F110) Vendor Bank

The automatic postings follow account determination: the combination of valuation class, movement type and transaction key (such as BSX for stock, WRX for GR/IR) decides which G/L account is used. That is why a wrongly configured valuation class is a classic cause of "the goods receipt posted to the wrong account".

Modeling the document flow

Here is a stand-in model, in plain JavaScript, of how each document references the previous one. Press Run and read the trace.

JS Stand-in: a purchase order document flow

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Special procurement types

Type Idea Typical use
Standard Buy, receive, pay Everyday materials
Consignment Vendor owns stock at your site until you take it Expensive or bulky items
Subcontracting You send components, vendor returns a finished product Outsourced assembly
Stock transfer Move stock between plants Distribution networks
Third-party Vendor ships directly to the customer Drop shipping (links MM to SD)

Services use an entry sheet instead of a goods receipt, and the invoice is checked against the accepted service.

Release strategies

Large orders often need approval. A release strategy (configured in the IMG, set per PO value, plant or group) blocks the PO until the right people release it in ME29N. Orders that are not released cannot be output or receive goods.

JS Stand-in: a release strategy by value

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Common mistakes

  • Posting a goods receipt without a PO reference (movement type 501) and then wondering why invoice verification has nothing to match.
  • Forgetting the account assignment category: a stock item with category K never raises inventory.
  • Ignoring tolerance limits in invoice verification, which causes many blocked invoices.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which document is a legally binding request to a vendor?

    The PR is an internal request. The PO is sent to the vendor and is the commercial commitment.
  2. 2. Which movement type posts a goods receipt for a purchase order?

    101 is the goods receipt for a PO. 201 and 261 are issues to a cost center and a production order, and 301 is a plant-to-plant transfer.
  3. 3. What does the three-way match compare?

    Invoice verification checks the invoice against both the order and what was actually received.
  4. 4. In the standard goods receipt posting, which account is credited?

    Stock is debited and GR/IR clearing is credited. The invoice later clears GR/IR.

Summary

  • Procure-to-pay runs from requisition through PO, goods receipt and invoice verification to payment.
  • Key tcodes: ME51N, ME21N, MIGO, MIRO, F110.
  • Documents reference each other, which makes every posting traceable.
  • Goods receipt (101) raises stock and credits GR/IR; the invoice clears GR/IR and creates the liability.
  • Release strategies and account assignment categories control approval and where costs land.

Next: Inventory Management and Valuation