SAP tableObjectMKPFModuleMM_P2P

MKPF table — Material Document Header (Legacy Access in S/4HANA)

MKPF is the classic material-document header table name, containing document-level fields such as material document number and year, posting date, document date, entry timestamp, user, and reference. In S/4HANA, material-document persistence was simplified to MATDOC; legacy MKPF and MSEG access is preserved through compatibility mechanisms rather than being the primary new-document persistence model.

MKPF is the header table behind every material document created in MM inventory management, covering goods receipts, goods issues, transfer postings and stock corrections. This page covers how to join it to line items, how to read it without a runaway selection, and the pitfalls consultants hit when they try to answer a stock movement question from MKPF alone.

Published 20 Sept 2026· 1,015 words

What it stores

A row in MKPF represents the header of one material document, the object created every time an MM goods movement is posted, whether through a goods receipt against a purchase order, a goods issue to a cost center or reservation, a transfer posting between plants or storage locations, or a physical inventory difference posting. The header carries information common to the whole document: who posted it, when it was posted, when it was entered into the system, what reference document or external document number was attached, and which transaction or process triggered the posting. It does not carry material, quantity, plant or movement type; those live one level down, in the material document item table. A material document can have many items under one header, so MKPF is always the smaller, coarser-grained table of the pair, and querying it alone tells you a movement happened and who caused it, not what actually moved.

Key fields

  • MBLNR and MJAHR — material document number and year.
  • BUDAT and BLDAT — posting and document dates.
  • Entry user, date, time, and reference fields — document audit context.
  • S/4HANA MATDOC — authoritative material-document persistence for new S/4HANA design.
  • Released material-document CDS or API — preferred extension surface for new development.

How it joins the data model

  • MKPF-MBLNR = MSEG-MBLNR and MKPF-MJAHR = MSEG-MJAHR, the standard join to reach the movement line items, quantities, materials and plants
  • MSEG-EBELN = EKPO-EBELN and MSEG-EBELP = EKPO-EBELP, to trace a goods movement back to the purchase order line it was posted against
  • MSEG-EBELN/EBELP = EKBE-EBELN/EBELP, to reconcile the movement against the purchase order history record it generated
  • MKPF-USNAM against user master tables when investigating who posted a suspicious or duplicate document
  • MKPF-XBLNR against the vendor invoice reference fields in RBKP/RSEG when tracing a three-way match discrepancy back to the physical receipt

How to read it safely

MANDT is always the first restriction. After that, MKPF is only ever usefully queried with a document number and year, or a posting date range plus another restriction such as user or transaction code, because on any live productive system it accumulates one row per goods movement across every plant and every material, which on a mature system means many millions of rows. Never select from MKPF on BUDAT alone across a wide date range without a second filter; it will scan the whole table. If the requirement is to find movements for a given material or plant, that filter exists on MSEG, not MKPF, so start the query there and join up to MKPF for the date and user, rather than starting in MKPF and joining down.

How to prove it in the data

Symptom: a warehouse team claims goods receipt 5000012345 was never posted, but stock on hand looks correct. Selection: read MKPF on MBLNR and MJAHR for the document number quoted; if a row exists, the document was posted, note BUDAT, CPUDT and USNAM. Then join to MSEG on the same key to confirm which plant, storage location and material actually received quantity, since the header alone cannot confirm what moved, only that something was posted and by whom.

ECC vs S/4HANA

SAP S/4HANA MM-IM documentation states that MATDOC replaces the former MKPF and MSEG persistence model and compatibility is provided through CDS compatibility views. Do not describe MKPF as a normally updated physical header table in S/4HANA or design new direct-write or read logic around it when released MATDOC/CDS APIs are available.

Common pitfalls

  • Treating MKPF as if it holds quantity or material information; every field a consultant actually needs to answer a stock question, such as movement type, quantity, plant, storage location or batch, is on MSEG, not MKPF
  • Assuming BUDAT and BLDAT are the same date; BLDAT is the external document date and can be days or weeks earlier than BUDAT, which drives period and stock valuation, mismatches between the two are normal and expected, not an error
  • Filtering only on BUDAT to reconcile a period-end stock discrepancy and missing documents posted late into a closed period with a backdated BUDAT; CPUDT (actual entry date) is the field that reveals late postings, not BUDAT
  • Assuming one MKPF row means one stock movement; a single material document header can cover many item lines with different movement types and even different plants, so counting MKPF rows to count movements undercounts activity
  • Confusing TCODE2 with the transaction the end user actually typed; background postings from IDocs, batch jobs or interface programs can populate this field with a generic or unexpected value, so it is not reliable evidence of manual intervention on its own
  • Trying to reverse-engineer a cancelled document's effect from MKPF alone; a cancellation creates its own new material document header referencing the original, it does not delete or flag the original row

Whose problem this is

A question about a specific document header, such as who posted it or on what date, is a functional MM inventory management question, owned by whoever configured goods movement processes. Questions about the underlying table structure, indexing, or migration behavior into MATDOC belong to the technical/Basis or ABAP development side, particularly during an S/4HANA conversion project.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-tables/mkpfERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.