MATDOC
transaction S/4HANA status: ActiveMaterial Document (S/4HANA)
What the badges mean
- S/4HANA status: Active
- Active and unchanged in S/4HANA.
- S/4HANA status: Deprecated
- Still readable today, but no longer SAP's strategic path — plan around it.
- S/4HANA status: Replaced
- Replaced by a new persistence in S/4HANA; the classic name may still answer reads (see read mechanism).
- S/4HANA status: Migrating to IBP
- Planning scope is moving from APO toward IBP.
- S/4HANA status: Active (StRM) · Replaced (EWM)
- Path-dependent: active with SAP Stock Room Management, replaced where EWM is the warehouse path.
- S/4HANA status: Replaced · Compat View
- Compatibility view: the classic table name is redirected to a view over the new persistence — see how the physical model moved.
- S/4HANA status: Active · Proxy View
- Proxy view: reads route through NSDM proxy/CDS views — see how the physical model moved.
- master
- Data class: what the table holds — master data, transaction documents, org structure, config, or texts (one row per language — see the quirks guide).
- Linked type codes
CLNT — the client key; filter it explicitly and carry it through every join.
NUMC — fixed-width numeric text; keep it a string and keep the leading zeros.
DATS, TIMS — character date (YYYYMMDD) and time (HHMMSS), zero-filled when initial.
CURR, CUKY, QUAN, UNIT — amounts and quantities, meaningful only beside the currency key or unit that qualifies them.
LANG — a language key in a text table — one row per language.
Fields
22 fields · 7 key
22 fields.
| Key | Field | Description | Type | Length | References |
|---|---|---|---|---|---|
| Primary key | MANDT | Client | CLNT | 3 | |
| Primary key | KEY1 | Split GUID Part 1 | RAW | 4 | |
| Primary key | KEY2 | Split GUID Part 2 | RAW | 4 | |
| Primary key | KEY3 | Split GUID Part 3 | RAW | 5 | |
| Primary key | KEY4 | Split GUID Part 4 | RAW | 1 | |
| Primary key | KEY5 | Split GUID Part 5 | RAW | 1 | |
| Primary key | KEY6 | Split GUID Part 6 | RAW | 1 | |
| MBLNR | Number of Material Document | CHAR | 10 | ||
| MJAHR | Material Document Year | NUMC | 4 | ||
| ZEILE | Item in Material Document | NUMC | 4 | ||
| LINE_ID | Unique Line ID | INT4 | 10 | ||
| PARENT_ID | Parent Line ID | INT4 | 10 | ||
| BWART | Movement Type | CHAR | 3 | T156 | |
| MATNR | Material Number | CHAR | 18 / 40 | MARA | |
| WERKS | Plant | CHAR | 4 | T001W | |
| LGORT | Storage Location | CHAR | 4 | T001L | |
| CHARG | Batch Number | CHAR | 10 | ||
| MENGE | Quantity | QUAN | 13,3 | ||
| SHKZG | Debit/Credit Indicator | CHAR | 1 | ||
| BUDAT | Posting Date in the Document | DATS | 8 | ||
| BLDAT | Document Date in Document | DATS | 8 | ||
| SOBKZ | Special Stock Indicator | CHAR | 1 | T148 |
Lengths shown as ECC / S/4HANA where the extended material number applies.
Linked type codes in the Type column jump to the matching section of the SAP data quirks guide.
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading MATDOC on Databricks. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.
3 parameters not filled: <catalog>, <schema>, <MANDT>
-- ============================================================
-- Table : MATDOC Material Document (S/4HANA)
-- Purpose: Column-selected read of MATDOC — auto-generated from field metadata
-- Grain : One row per KEY1 + KEY2 + KEY3 + KEY4 + KEY5 + KEY6
-- Notes : Auto-generated skeleton. For multi-table transaction query patterns, see the linked t-codes on this page. Set catalog/schema to your Unity Catalog location; fill remaining placeholders (<...>) for your tenant.
-- ============================================================
SELECT
m.MANDT AS "Client",
m.KEY1 AS "Split GUID Part 1",
m.KEY2 AS "Split GUID Part 2",
m.KEY3 AS "Split GUID Part 3",
m.KEY4 AS "Split GUID Part 4",
m.KEY5 AS "Split GUID Part 5",
m.KEY6 AS "Split GUID Part 6",
m.MBLNR AS "Number of Material Document",
m.MJAHR AS "Material Document Year",
m.ZEILE AS "Item in Material Document",
m.LINE_ID AS "Unique Line ID",
m.PARENT_ID AS "Parent Line ID",
m.BWART AS "Movement Type",
m.MATNR AS "Material Number",
m.WERKS AS "Plant",
m.LGORT AS "Storage Location",
m.CHARG AS "Batch Number",
m.MENGE AS "Quantity",
m.SHKZG AS "Debit/Credit Indicator",
m.BUDAT AS "Posting Date in the Document",
m.BLDAT AS "Document Date in Document",
m.SOBKZ AS "Special Stock Indicator"
FROM <catalog>.<schema>.matdoc m
WHERE
m.MANDT = '<MANDT>'
ORDER BY m.KEY1;Verified August 2026
Released CDS views over this table
Released SAP standard VDM views that read over MATDOC. Prefer these over classic-table reads on S/4HANA where available.
Relationships
Diagram of 1-hop neighbors — join details below.
Transaction Codes That Use This Table
No t-code mappings populated for this table yet.