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

> Source: https://netray.co/tools/sap-mm-tables-and-key-fields-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Searchable list of the core SAP MM tables with their primary key fields and what each stores, including S/4HANA changes.

## Category

sap

## Erp

SAP S/4HANA

## Audience

- SAP MM consultant
- ABAP developer
- Data analyst

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Table

**Key:** table

**Type:** text

#### Area

**Key:** area

**Type:** text

#### What it stores

**Key:** stores

**Type:** text

#### Key fields

**Key:** keys

**Type:** text

**Rows:**

**Table:** EKKO

**Area:** Purchasing

**Stores:** Purchasing document header

**Keys:** EBELN

**Table:** EKPO

**Area:** Purchasing

**Stores:** Purchasing document item

**Keys:** EBELN, EBELP

**Table:** EKET

**Area:** Purchasing

**Stores:** Scheduling agreement schedule lines

**Keys:** EBELN, EBELP, ETENR

**Table:** EKKN

**Area:** Purchasing

**Stores:** Account assignment in purchasing document

**Keys:** EBELN, EBELP, ZEKKN

**Table:** EKBE

**Area:** Purchasing

**Stores:** PO history per item (GR, IR and more)

**Keys:** EBELN, EBELP, ZEKKN, VGABE, GJAHR, BELNR, BUZEI

**Table:** EKES

**Area:** Purchasing

**Stores:** Vendor confirmations

**Keys:** EBELN, EBELP, ETENS

**Table:** EKPA

**Area:** Purchasing

**Stores:** Partner functions in purchasing

**Keys:** EBELN, EBELP, EKORG, LTSNR, WERKS, PARVW, PARZA

**Table:** EBAN

**Area:** Requisition

**Stores:** Purchase requisition

**Keys:** BANFN, BNFPO

**Table:** EINA

**Area:** Info record

**Stores:** Purchasing info record, general data

**Keys:** INFNR

**Table:** EINE

**Area:** Info record

**Stores:** Purchasing info record, purchasing organization data

**Keys:** INFNR, EKORG, ESOKZ, WERKS

**Table:** EORD

**Area:** Sourcing

**Stores:** Source list

**Keys:** MATNR, WERKS, ZEORD

**Table:** MARA

**Area:** Material master

**Stores:** General material data

**Keys:** MATNR

**Table:** MAKT

**Area:** Material master

**Stores:** Material descriptions

**Keys:** MATNR, SPRAS

**Table:** MARC

**Area:** Material master

**Stores:** Plant data for material

**Keys:** MATNR, WERKS

**Table:** MARD

**Area:** Material master

**Stores:** Storage location data for material (stock quantities)

**Keys:** MATNR, WERKS, LGORT

**Table:** MBEW

**Area:** Material master

**Stores:** Material valuation

**Keys:** MATNR, BWKEY, BWTAR

**Table:** MCHB

**Area:** Stock

**Stores:** Batch stocks

**Keys:** MATNR, WERKS, LGORT, CHARG

**Table:** MKOL

**Area:** Stock

**Stores:** Special stock from vendor (consignment)

**Keys:** MATNR, WERKS, LGORT, SOBKZ, LIFNR, CHARG

**Table:** MSLB

**Area:** Stock

**Stores:** Special stocks with vendor (subcontracting)

**Keys:** MATNR, WERKS, CHARG, SOBKZ, LIFNR

**Table:** MKPF

**Area:** Inventory

**Stores:** Material document header

**Keys:** MBLNR, MJAHR

**Table:** MSEG

**Area:** Inventory

**Stores:** Material document segment

**Keys:** MBLNR, MJAHR, ZEILE

**Table:** MATDOC

**Area:** Inventory

**Stores:** S/4HANA material documents (header and item data combined)

**Keys:** Technical keys, see system

**Table:** RBKP

**Area:** Invoice verification

**Stores:** Invoice document header

**Keys:** BELNR, GJAHR

**Table:** RSEG

**Area:** Invoice verification

**Stores:** Invoice document item

**Keys:** BELNR, GJAHR, BUZEI

**Table:** LFA1

**Area:** Vendor

**Stores:** Vendor master, general section

**Keys:** LIFNR

**Table:** LFM1

**Area:** Vendor

**Stores:** Vendor master, purchasing organization data

**Keys:** LIFNR, EKORG

**Table:** BUT000

**Area:** Business partner

**Stores:** Business partner general data (S/4HANA vendor master base)

**Keys:** PARTNER

**Table:** T156

**Area:** Customizing

**Stores:** Movement types

**Keys:** BWART

**Table:** T161

**Area:** Customizing

**Stores:** Purchasing document types

**Keys:** BSTYP, BSART

**Table:** T024

**Area:** Customizing

**Stores:** Purchasing groups

**Keys:** EKGRP

**Table:** T024E

**Area:** Customizing

**Stores:** Purchasing organizations

**Keys:** EKORG

**Table:** T001W

**Area:** Customizing

**Stores:** Plants and branches

**Keys:** WERKS

**Table:** T001L

**Area:** Customizing

**Stores:** Storage locations

**Keys:** WERKS, LGORT

**Table:** T023

**Area:** Customizing

**Stores:** Material groups

**Keys:** MATKL

**Notes:** 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.

## Content

**Intro:** 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.

**Sections:**

#### How to use the table list

**Body:** 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

**Body:** 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.

**Bullets:**

- 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

**Body:** 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.

**Cta:** 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.

**Faq:**

#### Which tables hold purchase order data?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

sap mm tables, sap ekko ekpo tables, sap purchasing tables list, sap material master tables mara marc mard, sap mseg mkpf matdoc, sap po history table ekbe, sap info record tables eina eine, sap invoice verification tables rbkp rseg

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
