SAP Core Tables and Key Fields Reference
Every ABAP developer ends up looking up the same few dozen tables: which one holds the purchase order item, what are the key fields of the material plant data, where does the sales document flow live. This reference lists the core tables with their primary key fields so you can write a correct WHERE clause or JOIN without opening SE11 each time.
| Table | Description | Primary key fields (after MANDT) | Module |
|---|---|---|---|
MARA | General material data | MATNR | MM |
MARC | Plant data for material | MATNR, WERKS | MM |
MARD | Storage location data for material | MATNR, WERKS, LGORT | MM |
MAKT | Material descriptions | MATNR, SPRAS | MM |
MBEW | Material valuation | MATNR, BWKEY, BWTAR | MM |
MVKE | Sales data for material | MATNR, VKORG, VTWEG | SD |
LFA1 | Vendor master, general section | LIFNR | MM / FI |
LFB1 | Vendor master, company code data | LIFNR, BUKRS | FI |
LFM1 | Vendor master, purchasing organization data | LIFNR, EKORG | MM |
KNA1 | Customer master, general section | KUNNR | SD / FI |
KNB1 | Customer master, company code data | KUNNR, BUKRS | FI |
KNVV | Customer master, sales area data | KUNNR, VKORG, VTWEG, SPART | SD |
EBAN | Purchase requisition | BANFN, BNFPO | MM |
EKKO | Purchasing document header | EBELN | MM |
EKPO | Purchasing document item | EBELN, EBELP | MM |
EKET | Scheduling agreement schedule lines | EBELN, EBELP, ETENR | MM |
EKBE | History per purchasing document | EBELN, EBELP, ZEKKN, VGABE, GJAHR, BELNR, BUZEI | MM |
VBAK | Sales document header | VBELN | SD |
VBAP | Sales document item | VBELN, POSNR | SD |
VBEP | Sales document schedule line | VBELN, POSNR, ETENR | SD |
VBFA | Sales document flow | VBELV, POSNV, VBELN, POSNN, VBTYP_N | SD |
LIKP | Delivery document header | VBELN | SD / LE |
LIPS | Delivery document item | VBELN, POSNR | SD / LE |
VBRK | Billing document header | VBELN | SD |
VBRP | Billing document item | VBELN, POSNR | SD |
BKPF | Accounting document header | BUKRS, BELNR, GJAHR | FI |
BSEG | Accounting document line item | BUKRS, BELNR, GJAHR, BUZEI | FI |
BSIK | Vendor open items (secondary index) | BUKRS, LIFNR, UMSKS, UMSKZ, AUGDT, AUGBL, ZUONR, GJAHR, BELNR, BUZEI | FI |
BSID | Customer open items (secondary index) | BUKRS, KUNNR, UMSKS, UMSKZ, AUGDT, AUGBL, ZUONR, GJAHR, BELNR, BUZEI | FI |
ACDOCA | Universal Journal entry line items (S/4HANA) | RLDNR, RBUKRS, GJAHR, BELNR, DOCLN | FI / CO |
MKPF | Material document header (ECC) | MBLNR, MJAHR | MM |
MSEG | Material document segment (ECC) | MBLNR, MJAHR, ZEILE | MM |
MATDOC | Material documents (S/4HANA, replaces MKPF/MSEG storage) | KEY1 to KEY6 technical key fields | MM |
AUFK | Order master data | AUFNR | PP / CO |
AFKO | Order header data, PP orders | AUFNR | PP |
AFPO | Order item | AUFNR, POSNR | PP |
RESB | Reservation and dependent requirements | RSNUM, RSPOS, RSART | MM / PP |
MAST | Material to BOM link | MATNR, WERKS, STLAN, STLNR, STLAL | PP |
T001 | Company codes | BUKRS | FI |
T001W | Plants and branches | WERKS | Logistics |
T001L | Storage locations | WERKS, LGORT | MM |
CDHDR | Change document header | OBJECTCLAS, OBJECTID, CHANGENR | Basis |
DD02L | ABAP Dictionary table headers | TABNAME, AS4LOCAL, AS4VERS | Basis |
DD03L | ABAP Dictionary table fields | TABNAME, FIELDNAME, AS4LOCAL, AS4VERS, POSITION | Basis |
TADIR | Directory of repository objects | PGMID, OBJECT, OBJ_NAME | Basis |
TSTC | SAP transaction codes | TCODE | Basis |
USR02 | Logon data of users | BNAME | Basis |
PA0001 | HR master record, organizational assignment | PERNR, SUBTY, OBJPS, SPRPS, ENDDA, BEGDA, SEQNR | HCM |
Most client-dependent tables also carry MANDT as the first key field, which Open SQL fills in automatically. In S/4HANA some tables are replaced or turned into compatibility views (for example MKPF/MSEG over MATDOC, and BSEG/BKPF alongside ACDOCA), so confirm in SE11 on your release.
Query your SAP data in plain language
Optional: talk to us about asking questions over SAP tables without writing SELECT statements, read-only and on-prem.
Optional. The tool and every export work without this. No spam.
How to use the table list
Type a table name, a field name or a word from the description into the search box, for example EKPO or invoice. Each row shows the table, what it stores, the primary key fields that follow the client field MANDT, and the owning module. Use the key fields to build WHERE conditions that follow the primary index, which keeps SELECT statements fast on large tables. Export the filtered list to Excel or PDF if you want a cheat sheet for a project team or a data migration workbook.
Header and item pairs, and why keys matter
SAP documents are mostly stored as a header table plus an item table: EKKO and EKPO for purchasing, VBAK and VBAP for sales, LIKP and LIPS for deliveries, BKPF and BSEG for accounting. The item table key always starts with the header key and adds a position field. When you join header to item, join on the full header key, and when you read item data alone, remember that the document number is not unique without the item number.
- EKKO to EKPO on EBELN
- VBAK to VBAP on VBELN
- BKPF to BSEG on BUKRS, BELNR and GJAHR
- MKPF to MSEG on MBLNR and MJAHR
S/4HANA differences to check
S/4HANA changed several storage models. Material documents are stored in MATDOC, and MKPF and MSEG are provided as compatibility views. Finance line items live in the Universal Journal ACDOCA, and several old aggregate and index tables were removed or turned into views. Customer and vendor master data moved to the business partner model, although KNA1 and LFA1 still exist. Always confirm the table in SE11 and the simplification list for your target release before you hard-code a table name.
Common mistakes
Selecting from cluster or very large tables without the key fields is the classic performance bug. Another is assuming a field is unique when it is only part of the key, for example selecting from MARD by MATNR and ignoring plant and storage location. Developers also use SELECT * on BSEG when they need three columns. List only the fields you need, filter on key fields, and prefer CDS views or released APIs where your system provides them.
Frequently Asked Questions
Why do these keys not list MANDT?
MANDT is the client field and is the first key field of almost every client-dependent table. Open SQL adds the current client automatically, so you normally do not write it in SELECT statements. It is left out of the key column to keep the list readable.
Are these tables the same in ECC and S/4HANA?
Most master and document tables still exist in S/4HANA, but some have changed. MKPF and MSEG are views over MATDOC, finance data is centred on ACDOCA, and customer and vendor data is tied to the business partner. Check SE11 on your system before relying on a table.
How do I find a table for a field I can see on a screen?
Place the cursor in the field and press F1, then use the Technical Information button to see the table and field name. You can also search DD03L by field name in SE16N, or use SE84 Repository Information System to find tables by name or text.
Should I still read tables directly in new development?
In S/4HANA, SAP recommends released CDS views and APIs for new development, as they are stable across upgrades. Direct table access is still common in custom reports and in ECC, but it carries more upgrade risk and you should isolate it in one data access class.
If you want to query SAP data in plain language instead of hand-writing joins, Netray can review how ERPray would answer your questions over your tables, read-only and on your own infrastructure.
Related Tools
ABAP Built-in Data Types Reference
A quick lookup of the predefined ABAP data types with length, value range and initial value.
SAPABAP Developer Transaction Codes Reference
A searchable cheat sheet of development, debugging, transport and monitoring transaction codes used by ABAP developers.
SAPABAP Performance Tuning Checklist
A checklist of database, internal table and memory checks to run on slow ABAP reports before they reach production.
More SAP tools
See all- SAP Sales Document Types Reference
- SAP Pricing Procedure Design Worksheet
- SAP Item Category Determination Reference
- SAP Delivery Block Reasons Template
- SAP Credit Management Checklist
- SAP Output Determination Checklist
- SAP Billing Types Reference
- SAP Incompletion Log Checklist
- SAP SD Tables Reference (VBAK, VBAP, LIKP, VBRK and More)