Skip to content
SAP Reference

EKKO

transaction S/4HANA status: Active

Purchasing Document Header

Identity
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.

In field listings, K marks a primary-key field, and linked type codes in the Type column jump to the matching quirks-guide section.

Fields

54 fields · 2 key

54 fields.

Table fields: key flag, field name, description, data type (linked to the data quirks guide where the type carries a known trap), length, and check-table references. 54 fields.
KeyFieldDescriptionTypeLengthReferences
Primary keyMANDTClientCLNT3T000
Primary keyEBELNPurchasing Document NumberCHAR10
BUKRSCompany CodeCHAR4T001
BSTYPPurchasing Document CategoryCHAR1
BSARTPurchasing Document TypeCHAR4T161
BSAKZControl Indicator for Purchasing Document TypeCHAR1
LOEKZDeletion Indicator in Purchasing DocumentCHAR1
STATUStatus of Purchasing DocumentCHAR1
AEDATCreated OnDATS8
ERNAMName of Person Who Created the ObjectCHAR12
PINCRItem Number IntervalNUMC5
LPONRLast Item NumberNUMC5
LIFNRVendor Account NumberCHAR10LFA1
SPRASLanguage KeyLANG1
ZTERMTerms of Payment KeyCHAR4T052
ZBD1TCash Discount Days 1DEC3
ZBD2TCash Discount Days 2DEC3
ZBD3TCash Discount Days 3 (Net Payment)DEC3
ZBD1PCash Discount Percentage 1DEC5,3
ZBD2PCash Discount Percentage 2DEC5,3
EKORGPurchasing OrganizationCHAR4T024E
EKGRPPurchasing GroupCHAR3T024
WAERSCurrency KeyCUKY5TCURC
WKURSExchange RateDEC9,5
KUFIXIndicator: Fixing of Exchange RateCHAR1
BEDATPurchasing Document DateDATS8
KDATBStart of Validity PeriodDATS8
KDATEEnd of Validity PeriodDATS8
BWBDTClosing Date for ApplicationsDATS8
ANGDTDeadline for Submission of Bid/QuotationDATS8
BNDDTBinding Period for QuotationDATS8
GWLDTWarranty DateDATS8
KUNNRCustomer NumberCHAR10KNA1
LLIEFSupplying VendorCHAR10LFA1
LPHISIndicator for Scheduling Agreement Release DocumentationCHAR1
SUBMICollective NumberCHAR10
KNUMVNumber of the Document ConditionCHAR10
KALSMProcedure (Pricing, Output Control, Acct Det, etc.)CHAR6
PROCSTATPurchasing Document Processing StateCHAR2
RLWRTValue at Time of Release (Total)CURR15,2
REVNOVersion Number in PurchasingCHAR8
SCMPROCS&OP ProcessCHAR1
REASON_CODEGoods Receipt Reason CodeCHAR4
RETPCRetention in PercentDEC5,2
MSR_IDMSR IDCHAR10
HIERARCHY_EXISTSHierarchy ExistsCHAR1
THRESHOLD_EXISTSThreshold Value ExistsCHAR1
LEGAL_CONTRACTLegal Contract NumberCHAR40
DESCRIPTIONDescriptionCHAR40
RELEASE_DATEPurchase Contract Release DateDATS8
FORCE_IDInternal ID for Force ElementCHAR32
FORCE_CNTInternal Counter for Force ElementNUMC6
RELOC_IDRelocation IDCHAR10
RELOC_SEQ_IDRelocation Sequence IDCHAR4

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.

Query parameters

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

More query patterns: ME21N ME22N ME23N

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

  • EKKOEKPOheader item · 1:N
    ON ekko.EBELN = ekpo.EBELN
  • EKKOLFA1foreign key · N:1
    ON ekko.LIFNR = lfa1.LIFNR
  • MSEGEKKOforeign key · N:1
    ON mseg.EBELN = ekko.EBELN
  • RESBEKKOforeign key · N:1
    ON resb.EBELN = ekko.EBELN
  • EKKOT024Eforeign key · N:1
    ON ekko.EKORG = t024e.EKORG
  • EKKOTCURCcheck table · N:1
    ON ekko.WAERS = tcurc.WAERS
  • EKKOT052check table · N:1
    ON ekko.ZTERM = t052.ZTERM
  • EKKOT161check table · N:1
    ON ekko.BSART = t161.BSART

Transaction Codes That Use This Table

More Materials Management tables