Skip to content
SAP Reference

QALS

transaction S/4HANA status: Active

Inspection Lot Record

Identity
Key fields

MANDANT · PRUEFLOS

All 27 fields
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.
Used in the library
KPI definitions
Dashboard patterns

What QALS is for

One row per inspection lot, created when an inspection-relevant event happens — a goods receipt, a production order, a manual request; HERKUNFT records the origin. A lot is a question ("is this stock any good?"), not an answer: the answer arrives later in QAVE.

Joins that work — and the traps

  • QAVE on (MANDANT, PRUEFLOS)

    1:N despite what most reports assume: the usage-decision table's key carries a type and counter, so take the latest counter per lot. Trap symptom: acceptance rates over 100% of lots.

    QAVE

  • QMEL on PRUEFLOS

    Lot-origin notifications point back at their lot.

    QMEL

  • Vendor analytics need no purchasing join

    LIFNR and EBELN/EBELP sit on the lot for GR-sourced inspections.

  • The plant field is WERK, not WERKS

    And the client field is MANDANT, not MANDT — same class of trap on the same table. Copy-pasted join templates fail silently on both.

What QALS does not contain

No usage decision (QAVE); no measurement results (QAMR characteristic results, QASE sample results); no defect records (QMFE via the notification). The lot knows its quantities and where they were posted — the full standard posting family LMENGE01LMENGE09 (unrestricted, scrap, sample, blocked, reserves, transfer to another material, return to vendor, and two other-posting buckets) plus LMENGEZUB still open and LMENGEIST actual — but not why. Customer appends and release variance still mean checking your own DDIC before hard-coding the list.

What breaks in practice

  • Open lots counted as failures: no QAVE row means undecided, not rejected — LEFT JOIN + NULL-as-fail understates every vendor with recent receipts.
  • Disposition read as verdict: the LMENGE split says where stock went, not whether the lot passed; accepted lots can still scrap part of their quantity.
  • Lots with LMENGEZUB > 0 are still posting — disposition percentages computed on them drift daily.

Shape & growth

Grows with goods receipts and production volume — one row per lot, no reversal churn; decided lots stop changing once STAT35 is set and postings complete.

ECC vs S/4HANA

No simplification-list entry restructuring QALS shows up in published material — an absence, not an SAP statement; verify against the simplification list for your release.

Fields

27 fields · 2 key

27 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. 27 fields.
KeyFieldDescriptionTypeLengthReferences
Primary keyMANDANTClientCLNT3
Primary keyPRUEFLOSInspection Lot NumberNUMC12
MATNRMaterial NumberCHAR18 / 40MARA
WERKPlantCHAR4T001W
LOSMENGEInspection Lot QuantityQUAN13,3
HERKUNFTInspection Lot OriginCHAR2TQ31
LIFNRVendor Account NumberCHAR10LFA1
EBELNPurchasing Document NumberCHAR10EKKO
EBELPItem Number of Purchasing DocumentNUMC5EKPO
CHARGBatch NumberCHAR10
STAT34Stock Postings CompletedCHAR1
STAT35Usage Decision Has Been MadeCHAR1
LMENGE01Quantity Posted to Unrestricted-Use StockQUAN13,3
LMENGE02Quantity Posted to ScrapQUAN13,3
LMENGE03Quantity Posted to SampleQUAN13,3
LMENGE04Quantity Posted to Blocked StockQUAN13,3
LMENGE05Quantity Posted to ReservesQUAN13,3
LMENGE06Quantity Posted to Another MaterialQUAN13,3
LMENGE07Quantity Returned to VendorQUAN13,3
LMENGE08Other Quantity Posted from Inspection Lot StockQUAN13,3
LMENGE09Other Quantity (2) Posted from Inspection Lot StockQUAN13,3
LMENGEZUBQuantity That Must Be PostedQUAN13,3
LMENGELZSample Quantity for Long-Term CharacteristicsQUAN13,3
LMENGEPRQuantity Actually InspectedQUAN13,3
LMENGEZERQuantity Destroyed During InspectionQUAN13,3
LMENGEISTActual Lot QuantityQUAN13,3
LMENGESCHDefective Quantity in Inspected QuantityQUAN13,3

Lengths shown as ECC / S/4HANA where the extended material number applies.

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 QALS 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  : QALS Inspection Lot Record
-- Purpose: Column-selected read of QALS — auto-generated from field metadata
-- Grain  : One row per PRUEFLOS
-- 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.MANDANT   AS "Client",
  h.PRUEFLOS  AS "Inspection Lot Number",
  h.MATNR     AS "Material Number",
  h.WERK      AS "Plant",
  h.LOSMENGE  AS "Inspection Lot Quantity",
  h.HERKUNFT  AS "Inspection Lot Origin",
  h.LIFNR     AS "Vendor Account Number",
  h.EBELN     AS "Purchasing Document Number",
  h.EBELP     AS "Item Number of Purchasing Document",
  h.CHARG     AS "Batch Number",
  h.STAT34    AS "Stock Postings Completed",
  h.STAT35    AS "Usage Decision Has Been Made",
  h.LMENGE01  AS "Quantity Posted to Unrestricted-Use Stock",
  h.LMENGE02  AS "Quantity Posted to Scrap",
  h.LMENGE03  AS "Quantity Posted to Sample",
  h.LMENGE04  AS "Quantity Posted to Blocked Stock",
  h.LMENGE05  AS "Quantity Posted to Reserves",
  h.LMENGE06  AS "Quantity Posted to Another Material",
  h.LMENGE07  AS "Quantity Returned to Vendor",
  h.LMENGE08  AS "Other Quantity Posted from Inspection Lot Stock",
  h.LMENGE09  AS "Other Quantity (2) Posted from Inspection Lot Stock",
  h.LMENGEZUB AS "Quantity That Must Be Posted",
  h.LMENGELZ  AS "Sample Quantity for Long-Term Characteristics",
  h.LMENGEPR  AS "Quantity Actually Inspected",
  h.LMENGEZER AS "Quantity Destroyed During Inspection",
  h.LMENGEIST AS "Actual Lot Quantity",
  h.LMENGESCH AS "Defective Quantity in Inspected Quantity"
FROM <catalog>.<schema>.qals h
WHERE
  h.MANDANT = '<MANDT>'
ORDER BY h.PRUEFLOS;

Verified August 2026

More query patterns: QA01 QA02 QA03

Released CDS views over this table

Released SAP standard VDM views that read over QALS. Prefer these over classic-table reads on S/4HANA where available.

Relationships

Diagram of 1-hop neighbors — join details below.

Join details

  • QALSQAMRheader item · 1:N
    ON qals.PRUEFLOS = qamr.PRUEFLOS
  • QALSMARAforeign key · N:1
    ON qals.MATNR = mara.MATNR
  • QALSQAVEforeign key · 1:N
    ON qals.PRUEFLOS = qave.PRUEFLOS
  • QALSQAMVheader item · 1:N
    ON qals.PRUEFLOS = qamv.PRUEFLOS
  • QALSQAPPheader item · 1:N
    ON qals.PRUEFLOS = qapp.PRUEFLOS

Transaction Codes That Use This Table

More Quality Management tables