Skip to content
EWM Reference

/LIME/PI_DOC_TB

transactionMixed key

Physical inventory quantities — the book and counted quantities behind a document item, one row per quantity parameter per unit of measure

Grain note

Not one row per item: the quantity status (QAN_DOC_STATUS), sequence, and unit are all in the key — pick the status you mean (book against counted) before comparing, or the difference is computed against itself

Notes

This is where a count difference actually comes from: the book quantity and the counted quantity are rows in the same table discriminated by a status column, not two columns on one row. ENTERED_QUANTITY and ENTERED_UNIT preserve what the counter typed before conversion to the inventory-managed unit, and the zero-count and not-counted indicators distinguish a counted-empty bin from one nobody visited.

What the badges mean
master
Data class: what the table holds — master data, transaction documents, configuration, an organizational object, or a language-striped text companion.

Structural facts — how the table is keyed, not a trap by itself

Semantic key
Every non-client key column is readable business data — LGNUM plus a bin, task, or order number. Joins run on the columns you can see (see the quirks guide).

Join & extract hazards — verify before you rely on this

GUID key
Every non-client key column is a GUID — RAW(16) on the /SCWM, /SCDL, /LIME, and /SCMB tables, and the CHAR(22) compressed form on the product master. Join the raw column; a hex rendering is for reading only, and the two encodings need converting between (see the quirks guide).
Mixed key
The key mixes readable and GUID columns in either direction — a product GUID inside an otherwise-readable bin key, or a readable status type inside an otherwise-GUID key. Check which side of a join you are on (see the quirks guide).
DOCCAT: PDO
A /SCDL delivery table holds several document categories in one table — inbound and outbound requests, the inbound delivery, the outbound delivery order, and the final outbound delivery — discriminated by DOCCAT. The chips list the categories this table carries; anchor the one you mean or documents of every kind come back together (see the quirks guide).
Embedded S/4HANA only
Deployment: shown only when a table does not exist in both embedded S/4HANA EWM and decentralized EWM. No table in this wave is deployment-specific, so the badge stays absent until one is.
In field listings, the Key chip marks a primary-key field, and UTC marks a timestamp stored in UTC rather than warehouse-local time.

Fields

17 fields · 9 key

17 fields.

Table fields: position, field name, description, data type, and flags. 17 fields.
#FieldDescriptionTypeFlags
1MANDTClientCLNT(3)
Key
2GUID_DOCGUID of the physical inventory documentRAW(16)
Key
3ITEM_NOItem number within the counting documentNUMC(6)
Key
4LINE_IDXRow index within the itemINT4(10)
Key
5CHANGE_SEQChange version of the item the quantity belongs toINT4(10)
Key
6ITEM_TYPELine category of the itemCHAR(2)
Key
7QAN_DOC_STATUSWhich quantity the row holds — the status that separates the book quantity from the counted oneCHAR(4)
Key
8QUAN_SEQSequence number of the quantity rowINT4(10)
Key
9UNITInventory-managed unit of measure — part of the key, so one item carries a row per unitUNIT(3)
Key
10QUANTITYQuantity in the inventory-managed unitQUAN(31,14)
11ENTERED_QUANTITYQuantity as the counter entered it, before conversionQUAN(31,14)
12ENTERED_UNITUnit the counter entered the quantity inUNIT(3)
13IND_ZERO_COUNTFlag: counted and found emptyCHAR(1)
14IND_NOT_COUNTFlag: not counted — the row that must never be read as a zeroCHAR(1)
15PARAM_NAMEName of the document parameter the row carries, where the row is a parameter rather than a quantityCHAR(61)
16PARAM_VALUEValue of that parameterCHAR(255)
17PARAM_GROUPGrouping of document parametersCHAR(4)

Field provenance: hand-curated. 9 key fields.

Boilerplate SQL

Starting point for reading the replicated copy of /LIME/PI_DOC_TBon Databricks — the client anchor is already in place, the namespaced name is rendered as the underscore bronze name replication targets conventionally land it under, and any RAW16 GUID column selects a hex rendering alongside the raw value. Set your Unity Catalog location, schema, and filter values below; they’re substituted into the SQL and the copy button.

Query parameters

4 parameters not filled: <catalog>, <schema>, <client>, <UNIT>

-- ============================================================
-- Table  : /LIME/PI_DOC_TB — Physical inventory quantities — the book and counted quantities behind a document item, one row per quantity parameter per unit of measure
-- Purpose: Column-selected read of /LIME/PI_DOC_TB — auto-generated from field metadata
-- Grain  : One row per client + GUID_DOC + ITEM_NO + LINE_IDX + CHANGE_SEQ + ITEM_TYPE + QAN_DOC_STATUS + QUAN_SEQ + UNIT
-- Caution: Not one row per item: the quantity status (QAN_DOC_STATUS), sequence, and unit are all in the key — pick the status you mean (book against counted) before comparing, or the difference is computed against itself
-- Notes  : Auto-generated skeleton for SAP EWM data replicated into your lakehouse — it reads the replicated copy, not the SAP database. Source table /LIME/PI_DOC_TB; slashes aren't legal in unquoted Databricks identifiers, so replication targets conventionally land it as lime_pi_doc_tb — adjust to your landing convention (see quirks #namespace-slashes). RAW16 GUID columns are joined raw; the hex aliases are for display only (#guid-keys). Timestamps flagged UTC are DEC(15) yyyymmddhhmmss values in UTC, not warehouse local time (#utc-timestamps).
-- ============================================================
SELECT
  t.MANDT AS "Client",
  t.GUID_DOC AS "GUID of the physical inventory document",
  lower(hex(t.GUID_DOC)) AS "GUID of the physical inventory document (hex)",  -- display rendering of the RAW16 GUID — join on the raw column; see quirks guide #guid-keys
  t.ITEM_NO AS "Item number within the counting document",
  t.LINE_IDX AS "Row index within the item",
  t.CHANGE_SEQ AS "Change version of the item the quantity belongs to",
  t.ITEM_TYPE AS "Line category of the item",
  t.QAN_DOC_STATUS AS "Which quantity the row holds — the status that separates the book quantity from the counted one",
  t.QUAN_SEQ AS "Sequence number of the quantity row",
  t.UNIT AS "Inventory-managed unit of measure — part of the key, so one item carries a row per unit",
  t.QUANTITY AS "Quantity in the inventory-managed unit",
  t.ENTERED_QUANTITY AS "Quantity as the counter entered it, before conversion",
  t.ENTERED_UNIT AS "Unit the counter entered the quantity in",
  t.IND_ZERO_COUNT AS "Flag: counted and found empty",
  t.IND_NOT_COUNT AS "Flag: not counted — the row that must never be read as a zero",
  t.PARAM_NAME AS "Name of the document parameter the row carries, where the row is a parameter rather than a quantity",
  t.PARAM_VALUE AS "Value of that parameter",
  t.PARAM_GROUP AS "Grouping of document parameters"
FROM <catalog>.<schema>.lime_pi_doc_tb t
WHERE
  t.MANDT = '<client>'  -- client filter — drop on single-client systems
  -- AND t.UNIT = '<UNIT>'
ORDER BY t.GUID_DOC;

Verified August 2026

Landing conventions differ — see namespaced names in a lakehouse.

Relationships

Diagram of 1-hop neighbors — join details below. GUID joins and text-table joins are highlighted; they’re the joins newcomers most often get wrong.

Join details

  • /LIME/PI_DOC_IT/LIME/PI_DOC_TBGUID join · 1:N
    ON lime_pi_doc_it.MANDT = lime_pi_doc_tb.MANDT AND lime_pi_doc_it.GUID_DOC = lime_pi_doc_tb.GUID_DOC AND lime_pi_doc_it.ITEM_NO = lime_pi_doc_tb.ITEM_NO AND lime_pi_doc_it.LINE_IDX = lime_pi_doc_tb.LINE_IDX AND lime_pi_doc_it.CHANGE_SEQ = lime_pi_doc_tb.CHANGE_SEQ AND lime_pi_doc_it.ITEM_TYPE = lime_pi_doc_tb.ITEM_TYPE -- RAW16 GUID equality — join raw; hex is for display/conformance only · join the whole five-column item key including CHANGE_SEQ, or a recount's quantities attach to the original count

    join the whole five-column item key including CHANGE_SEQ, or a recount's quantities attach to the original count

Transaction codes that touch this table

Curated: the EWM transactions an analyst would trace back to these rows, and how each one touches them.

R read · W write · R/W read + write

Browse more Physical Inventory tables

More Physical Inventory tables

Maintained by Summit Analytics, a supply chain analytics practice. The tools and references are free — the consulting is selective.

Part of the Summit Analytics reference library.

Work with the practice

Not affiliated with or endorsed by SAP. SAP, SAP S/4HANA, and SAP Extended Warehouse Management are trademarks or registered trademarks of SAP SE.