AFKO
transaction S/4HANA status: ActiveOrder Header Data PP Orders
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
27 fields · 2 key
27 fields.
| Key | Field | Description | Type | Length | References |
|---|---|---|---|---|---|
| Primary key | MANDT | Client | CLNT | 3 | T000 |
| Primary key | AUFNR | Order Number | CHAR | 12 | AUFK |
| AUFPL | Routing Number of Operations in the Order | NUMC | 10 | ||
| STLNR | Bill of Material | CHAR | 8 | ||
| STLBEZ | BOM Material Number | CHAR | 18 | ||
| PLNTY | Task List Type | CHAR | 1 | ||
| PLNNR | Key for Task List Group | CHAR | 8 | ||
| PLNAL | Group Counter | CHAR | 2 | ||
| PLNME | Task List Unit of Measure | UNIT | 3 | T006 | |
| STLAL | Alternative BOM | CHAR | 2 | ||
| STLAN | BOM Usage | CHAR | 1 | ||
| RSNUM | Number of Reservation/Dependent Requirements | NUMC | 10 | ||
| GLTRP | Scheduled Finish (Basic) | DATS | 8 | ||
| GSTRP | Scheduled Start (Basic) | DATS | 8 | ||
| GLTRS | Scheduled Finish (Scheduled) | DATS | 8 | ||
| GSTRS | Scheduled Start (Scheduled) | DATS | 8 | ||
| GLTRI | Actual Finish (Confirmed) | DATS | 8 | ||
| GSTRI | Actual Start (Confirmed) | DATS | 8 | ||
| FHORI | Scheduling Margin Key | CHAR | 3 | ||
| GAMNG | Total Order Quantity | QUAN | 13,3 | ||
| GMEIN | Unit of Measure for Total Order Quantity | UNIT | 3 | T006 | |
| IGMNG | Confirmed Yield | QUAN | 13,3 | ||
| PLSVB | To Lot Size | QUAN | 13,3 | ||
| PLNBEZ | Material Number | CHAR | 18 | MARA | |
| CY_SEQNR | Sequence Number Counter for Repetitive Manufacturing | NUMC | 14 | ||
| LEAD_AUFNR | Lead Order Number | CHAR | 12 | ||
| FEVOR | Production Supervisor | CHAR | 3 |
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 AFKO on Databricks. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.
4 parameters not filled: <catalog>, <schema>, <MANDT>, <AUFNR>
-- ============================================================
-- Table : AFKO Order Header Data PP Orders
-- Purpose: Column-selected read of AFKO — auto-generated from field metadata
-- Grain : One row per AUFNR
-- 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
h.MANDT AS "Client",
h.AUFNR AS "Order Number",
h.AUFPL AS "Routing Number of Operations in the Order",
h.STLNR AS "Bill of Material",
h.STLBEZ AS "BOM Material Number",
h.PLNTY AS "Task List Type",
h.PLNNR AS "Key for Task List Group",
h.PLNAL AS "Group Counter",
h.PLNME AS "Task List Unit of Measure",
h.STLAL AS "Alternative BOM",
h.STLAN AS "BOM Usage",
h.RSNUM AS "Number of Reservation/Dependent Requirements",
h.GLTRP AS "Scheduled Finish (Basic)",
h.GSTRP AS "Scheduled Start (Basic)",
h.GLTRS AS "Scheduled Finish (Scheduled)",
h.GSTRS AS "Scheduled Start (Scheduled)",
h.GLTRI AS "Actual Finish (Confirmed)",
h.GSTRI AS "Actual Start (Confirmed)",
h.FHORI AS "Scheduling Margin Key",
h.GAMNG AS "Total Order Quantity",
h.GMEIN AS "Unit of Measure for Total Order Quantity",
h.IGMNG AS "Confirmed Yield",
h.PLSVB AS "To Lot Size",
h.PLNBEZ AS "Material Number",
h.CY_SEQNR AS "Sequence Number Counter for Repetitive Manufacturing",
h.LEAD_AUFNR AS "Lead Order Number",
h.FEVOR AS "Production Supervisor"
FROM <catalog>.<schema>.afko h
WHERE
h.MANDT = '<MANDT>'
-- AND h.AUFNR = '<AUFNR>'
ORDER BY h.AUFNR;Verified August 2026
Released CDS views over this table
Released SAP standard VDM views that read over AFKO. 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
R read · W write · R/W read + write