SAPFree referencePDF, Excel, Word exportSAP S/4HANA

SAP MM Tables and Key Fields (EKKO, EKPO, MARA, MSEG and More)

When you build a report, a data extract or an AI query over SAP purchasing and inventory, you need to know which table holds what and how to join them. This reference lists the core MM tables with their key fields.

Download:
TableAreaWhat it storesKey fields
EKKO
Purchasing
Purchasing document header
EBELN
EKPO
Purchasing
Purchasing document item
EBELN, EBELP
EKET
Purchasing
Scheduling agreement schedule lines
EBELN, EBELP, ETENR
EKKN
Purchasing
Account assignment in purchasing document
EBELN, EBELP, ZEKKN
EKBE
Purchasing
PO history per item (GR, IR and more)
EBELN, EBELP, ZEKKN, VGABE, GJAHR, BELNR, BUZEI
EKES
Purchasing
Vendor confirmations
EBELN, EBELP, ETENS
EKPA
Purchasing
Partner functions in purchasing
EBELN, EBELP, EKORG, LTSNR, WERKS, PARVW, PARZA
EBAN
Requisition
Purchase requisition
BANFN, BNFPO
EINA
Info record
Purchasing info record, general data
INFNR
EINE
Info record
Purchasing info record, purchasing organization data
INFNR, EKORG, ESOKZ, WERKS
EORD
Sourcing
Source list
MATNR, WERKS, ZEORD
MARA
Material master
General material data
MATNR
MAKT
Material master
Material descriptions
MATNR, SPRAS
MARC
Material master
Plant data for material
MATNR, WERKS
MARD
Material master
Storage location data for material (stock quantities)
MATNR, WERKS, LGORT
MBEW
Material master
Material valuation
MATNR, BWKEY, BWTAR
MCHB
Stock
Batch stocks
MATNR, WERKS, LGORT, CHARG
MKOL
Stock
Special stock from vendor (consignment)
MATNR, WERKS, LGORT, SOBKZ, LIFNR, CHARG
MSLB
Stock
Special stocks with vendor (subcontracting)
MATNR, WERKS, CHARG, SOBKZ, LIFNR
MKPF
Inventory
Material document header
MBLNR, MJAHR
MSEG
Inventory
Material document segment
MBLNR, MJAHR, ZEILE
MATDOC
Inventory
S/4HANA material documents (header and item data combined)
Technical keys, see system
RBKP
Invoice verification
Invoice document header
BELNR, GJAHR
RSEG
Invoice verification
Invoice document item
BELNR, GJAHR, BUZEI
LFA1
Vendor
Vendor master, general section
LIFNR
LFM1
Vendor
Vendor master, purchasing organization data
LIFNR, EKORG
BUT000
Business partner
Business partner general data (S/4HANA vendor master base)
PARTNER
T156
Customizing
Movement types
BWART
T161
Customizing
Purchasing document types
BSTYP, BSART
T024
Customizing
Purchasing groups
EKGRP
T024E
Customizing
Purchasing organizations
EKORG
T001W
Customizing
Plants and branches
WERKS
T001L
Customizing
Storage locations
WERKS, LGORT
T023
Customizing
Material groups
MATKL

Key fields shown are the commonly used ones. Confirm full key definitions in SE11 for your release. In S/4HANA, MATDOC is the real storage for material documents and MKPF and MSEG are compatibility views.

Governed read-only SAP queries

Interested in running these joins through a natural language layer that shows the query? We can walk you through it.

Optional. The tool and every export work without this. No spam.

How to use the table list

Search by table name or by what you are looking for, such as 'invoice' or 'consignment'. The key fields column tells you how to join: purchasing documents join EKKO to EKPO on EBELN, EKPO to EKBE on EBELN and EBELP, and material master views join MARA to MARC on MATNR and MARC to MARD on MATNR and WERKS. Export the filtered rows to Excel as a data dictionary for your project or for report specifications.

Typical joins and what they return

Open PO analysis combines EKKO, EKPO and EKET, then reads EKBE for received and invoiced quantities by history category in VGABE. Stock analysis reads MARD for storage location stock, MBEW for value and MCHB for batch detail. Invoice analysis links RBKP to RSEG and then to the PO item through the reference fields on the invoice item. Always filter by plant and document type early, because EKPO and MSEG grow very large.

  • PO to goods receipt: EKPO to EKBE with VGABE = 1
  • PO to invoice receipt: EKPO to EKBE with VGABE = 2
  • Plant stock: MARC to MARD on MATNR and WERKS
  • Vendor details: EKKO LIFNR to LFA1

S/4HANA table changes

S/4HANA simplified inventory data. MATDOC stores material documents, and former aggregate tables such as MARC history and some stock aggregates are calculated or reduced, so direct reads of old aggregate tables can return less than expected. Vendors are maintained as business partners, with BUT000 as the base and vendor numbers still in LFA1 through customer vendor integration. Before building extracts, check the SAP simplification list for your release.

Frequently Asked Questions

Which tables hold purchase order data?

EKKO holds the header and EKPO the items. EKET stores schedule lines, EKKN account assignment, and EKBE the history of goods receipts and invoice receipts. EKPA holds partner functions. Join them on EBELN and EBELP.

What replaced MKPF and MSEG in S/4HANA?

MATDOC now stores material documents. MKPF and MSEG still exist as compatibility views so older programs keep working, but new development should read MATDOC or the released CDS views, and should not write to the old tables.

Where is current stock stored?

Unrestricted, quality inspection and blocked stock by storage location are in MARD. Batch stock is in MCHB, vendor consignment in MKOL and subcontracting stock at the vendor in MSLB. Valuation data, including price and total value, is in MBEW.

Can I query these tables directly in production?

Technically yes through SE16N or a database connection, but large tables need filters and indexes, and direct writes are never advised. Use read-only access, respect authorization objects, and prefer released CDS views or APIs for integrations where available.

If you want these joins turned into a governed, read-only query layer over your SAP system, we can set that up and show the SQL behind every answer.