Skip to content
SAP Reference

ME5A

Report S/4HANA status: Active

List Display of Purchase Requisitions

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).
In field listings, K marks a primary-key field, and linked type codes in the Type column jump to the matching quirks-guide section.

Boilerplate SQL

Databricks SQL

Starting point for querying the tables behind this transaction. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.

Query parameters

7 parameters not filled: <catalog>, <schema>, <MANDT>, <DATE_FROM>, <DATE_TO>, <WERKS>, <EKGRP>

-- ============================================================
-- T-Code : ME5A List Display of Purchase Requisitions
-- Purpose: List purchase requisitions with release status and PO-reference
-- Grain  : One row per purchase requisition item
-- Tables : EBAN, EBKN, MAKT, MARA, T001W, T001L
-- Notes  : EBKN is optional — only populated for account-assigned items. Filter LOEKZ = '' to exclude deleted items; EBELN <> '' means PR has been converted to PO.
-- ============================================================
SELECT
  -- Keys
  h.MANDT   AS "Client",
  h.BANFN   AS "Purchase Requisition",
  h.BNFPO   AS "PR Item",

  -- Descriptive text
  h.TXZ01   AS "Short Text",
  mt.MAKTX  AS "Material Description",

  -- Quantities + UOM (paired)
  h.MENGE   AS "Requested Quantity",
  h.MEINS   AS "Base Unit of Measure",
  h.PREIS   AS "Price",
  h.PEINH   AS "Price Unit",
  h.WAERS   AS "Currency",

  -- Dates
  h.BADAT   AS "PR Date",
  h.LFDAT   AS "Delivery Date",
  h.FRGDT   AS "Release Date",
  h.ERDAT   AS "Last Changed On",

  -- Status / indicators
  h.LOEKZ   AS "Deletion Indicator",
  h.STATU   AS "Processing Status",
  h.FRGKZ   AS "Release Indicator",
  h.EBELN   AS "Following PO (if any)",

  -- Org fields
  h.WERKS   AS "Plant",
  pt.NAME1  AS "Plant Name",
  h.LGORT   AS "Storage Location",
  sl.LGOBE  AS "Storage Location Name",
  h.EKGRP   AS "Purchasing Group",

  -- Master data enrichment
  h.BSART   AS "Document Type",
  h.MATNR   AS "Material Number",
  m.MTART   AS "Material Type",
  m.MATKL   AS "Material Group",
  h.KNTTP   AS "Account Assignment Category",
  acct.KOSTL AS "Cost Center",
  acct.SAKTO AS "G/L Account",
  acct.AUFNR AS "Order Number",
  h.ERNAM   AS "Created By"
FROM <catalog>.<schema>.eban h
LEFT JOIN <catalog>.<schema>.ebkn acct
  ON  acct.MANDT = h.MANDT
  AND acct.BANFN = h.BANFN
  AND acct.BNFPO = h.BNFPO
LEFT JOIN <catalog>.<schema>.makt mt
  ON  mt.MANDT = h.MANDT
  AND mt.MATNR = h.MATNR
  AND mt.SPRAS = 'E'
LEFT JOIN <catalog>.<schema>.mara m
  ON  m.MANDT = h.MANDT
  AND m.MATNR = h.MATNR
LEFT JOIN <catalog>.<schema>.t001w pt
  ON  pt.MANDT = h.MANDT
  AND pt.WERKS = h.WERKS
LEFT JOIN <catalog>.<schema>.t001l sl
  ON  sl.MANDT = h.MANDT
  AND sl.WERKS = h.WERKS
  AND sl.LGORT = h.LGORT
WHERE
  h.MANDT = '<MANDT>'
  AND h.BADAT BETWEEN '<DATE_FROM>' AND '<DATE_TO>'
  AND h.LOEKZ = ''
  -- AND h.WERKS = '<WERKS>'
  -- AND h.EKGRP = '<EKGRP>'
ORDER BY h.BADAT DESC, h.BANFN, h.BNFPO;

Tables Used by This Transaction

How these tables connect — join details in the list below.

Join details

  • EBANEBKNheader item · 1:N
    ON eban.BANFN = ebkn.BANFN
  • MARAMAKTtext table · 1:N
    ON mara.MATNR = makt.MATNR

More Materials Management t-codes