EKKO
transaction S/4HANA status: ActivePurchasing Document Header
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
54 fields · 2 key
54 fields.
| Key | Field | Description | Type | Length | References |
|---|---|---|---|---|---|
| Primary key | MANDT | Client | CLNT | 3 | T000 |
| Primary key | EBELN | Purchasing Document Number | CHAR | 10 | |
| BUKRS | Company Code | CHAR | 4 | T001 | |
| BSTYP | Purchasing Document Category | CHAR | 1 | ||
| BSART | Purchasing Document Type | CHAR | 4 | T161 | |
| BSAKZ | Control Indicator for Purchasing Document Type | CHAR | 1 | ||
| LOEKZ | Deletion Indicator in Purchasing Document | CHAR | 1 | ||
| STATU | Status of Purchasing Document | CHAR | 1 | ||
| AEDAT | Created On | DATS | 8 | ||
| ERNAM | Name of Person Who Created the Object | CHAR | 12 | ||
| PINCR | Item Number Interval | NUMC | 5 | ||
| LPONR | Last Item Number | NUMC | 5 | ||
| LIFNR | Vendor Account Number | CHAR | 10 | LFA1 | |
| SPRAS | Language Key | LANG | 1 | ||
| ZTERM | Terms of Payment Key | CHAR | 4 | T052 | |
| ZBD1T | Cash Discount Days 1 | DEC | 3 | ||
| ZBD2T | Cash Discount Days 2 | DEC | 3 | ||
| ZBD3T | Cash Discount Days 3 (Net Payment) | DEC | 3 | ||
| ZBD1P | Cash Discount Percentage 1 | DEC | 5,3 | ||
| ZBD2P | Cash Discount Percentage 2 | DEC | 5,3 | ||
| EKORG | Purchasing Organization | CHAR | 4 | T024E | |
| EKGRP | Purchasing Group | CHAR | 3 | T024 | |
| WAERS | Currency Key | CUKY | 5 | TCURC | |
| WKURS | Exchange Rate | DEC | 9,5 | ||
| KUFIX | Indicator: Fixing of Exchange Rate | CHAR | 1 | ||
| BEDAT | Purchasing Document Date | DATS | 8 | ||
| KDATB | Start of Validity Period | DATS | 8 | ||
| KDATE | End of Validity Period | DATS | 8 | ||
| BWBDT | Closing Date for Applications | DATS | 8 | ||
| ANGDT | Deadline for Submission of Bid/Quotation | DATS | 8 | ||
| BNDDT | Binding Period for Quotation | DATS | 8 | ||
| GWLDT | Warranty Date | DATS | 8 | ||
| KUNNR | Customer Number | CHAR | 10 | KNA1 | |
| LLIEF | Supplying Vendor | CHAR | 10 | LFA1 | |
| LPHIS | Indicator for Scheduling Agreement Release Documentation | CHAR | 1 | ||
| SUBMI | Collective Number | CHAR | 10 | ||
| KNUMV | Number of the Document Condition | CHAR | 10 | ||
| KALSM | Procedure (Pricing, Output Control, Acct Det, etc.) | CHAR | 6 | ||
| PROCSTAT | Purchasing Document Processing State | CHAR | 2 | ||
| RLWRT | Value at Time of Release (Total) | CURR | 15,2 | ||
| REVNO | Version Number in Purchasing | CHAR | 8 | ||
| SCMPROC | S&OP Process | CHAR | 1 | ||
| REASON_CODE | Goods Receipt Reason Code | CHAR | 4 | ||
| RETPC | Retention in Percent | DEC | 5,2 | ||
| MSR_ID | MSR ID | CHAR | 10 | ||
| HIERARCHY_EXISTS | Hierarchy Exists | CHAR | 1 | ||
| THRESHOLD_EXISTS | Threshold Value Exists | CHAR | 1 | ||
| LEGAL_CONTRACT | Legal Contract Number | CHAR | 40 | ||
| DESCRIPTION | Description | CHAR | 40 | ||
| RELEASE_DATE | Purchase Contract Release Date | DATS | 8 | ||
| FORCE_ID | Internal ID for Force Element | CHAR | 32 | ||
| FORCE_CNT | Internal Counter for Force Element | NUMC | 6 | ||
| RELOC_ID | Relocation ID | CHAR | 10 | ||
| RELOC_SEQ_ID | Relocation Sequence ID | CHAR | 4 |
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 EKKO 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 : EKKO Purchasing Document Header
-- Purpose: Column-selected read of EKKO — auto-generated from field metadata
-- Grain : One row per EBELN
-- 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.EBELN AS "Purchasing Document Number",
h.BUKRS AS "Company Code",
h.BSTYP AS "Purchasing Document Category",
h.BSART AS "Purchasing Document Type",
h.BSAKZ AS "Control Indicator for Purchasing Document Type",
h.LOEKZ AS "Deletion Indicator in Purchasing Document",
h.STATU AS "Status of Purchasing Document",
h.AEDAT AS "Created On",
h.ERNAM AS "Name of Person Who Created the Object",
h.PINCR AS "Item Number Interval",
h.LPONR AS "Last Item Number",
h.LIFNR AS "Vendor Account Number",
h.SPRAS AS "Language Key",
h.ZTERM AS "Terms of Payment Key",
h.ZBD1T AS "Cash Discount Days 1",
h.ZBD2T AS "Cash Discount Days 2",
h.ZBD3T AS "Cash Discount Days 3 (Net Payment)",
h.ZBD1P AS "Cash Discount Percentage 1",
h.ZBD2P AS "Cash Discount Percentage 2",
h.EKORG AS "Purchasing Organization",
h.EKGRP AS "Purchasing Group",
h.WAERS AS "Currency Key",
h.WKURS AS "Exchange Rate",
h.KUFIX AS "Indicator: Fixing of Exchange Rate",
h.BEDAT AS "Purchasing Document Date",
h.KDATB AS "Start of Validity Period",
h.KDATE AS "End of Validity Period",
h.BWBDT AS "Closing Date for Applications",
h.ANGDT AS "Deadline for Submission of Bid/Quotation",
h.BNDDT AS "Binding Period for Quotation",
h.GWLDT AS "Warranty Date",
h.KUNNR AS "Customer Number",
h.LLIEF AS "Supplying Vendor",
h.LPHIS AS "Indicator for Scheduling Agreement Release Documentation",
h.SUBMI AS "Collective Number",
h.KNUMV AS "Number of the Document Condition",
h.KALSM AS "Procedure (Pricing, Output Control, Acct Det, etc.)",
h.PROCSTAT AS "Purchasing Document Processing State",
h.RLWRT AS "Value at Time of Release (Total)"
-- … plus 14 more columns — full list in the Fields section above
FROM <catalog>.<schema>.ekko h
WHERE
h.MANDT = '<MANDT>'
ORDER BY h.EBELN;Verified August 2026
Released CDS views over this table
Released SAP standard VDM views that read over EKKO. Prefer these over classic-table reads on S/4HANA where available.
Relationships
Diagram of 1-hop neighbors — join details below.
Join details
ON ekko.EBELN = ekpo.EBELNON ekko.LIFNR = lfa1.LIFNRON mseg.EBELN = ekko.EBELNON resb.EBELN = ekko.EBELNON ekko.EKORG = t024e.EKORGON ekko.WAERS = tcurc.WAERSON ekko.ZTERM = t052.ZTERMON ekko.BSART = t161.BSART
Transaction Codes That Use This Table
R read · W write · R/W read + write
Primary t-codes
- ME21NCreate Purchase OrderWrite accessCreate
- ME22NChange Purchase OrderRead/write accessChange
- ME23NDisplay Purchase OrderRead accessDisplay
- ME2LPurchasing Documents per VendorRead accessReport
- ME2MPurchasing Documents per MaterialRead accessReport
- ME2NPurchasing Documents per Document NumberRead accessReport
- ME31KCreate ContractWrite accessCreate
- ME31LCreate Scheduling AgreementWrite accessCreate
- ME32KChange ContractRead/write accessChange
- ME33KDisplay ContractRead accessDisplay