Quality & InspectionFree referencePDF, Excel, Word exportSAP ECC / S/4HANA

SAP QM Tables Relationship Diagram: QALS, QAVE, QAMV, MAPL, PLMK Key Joins

This is the relationship map of the SAP QM tables as a searchable list: for each table, the next table you reach and the key fields to join on. It stands in for an ER diagram when you need to write a report, a CDS view or an extractor and want the join path from inspection lot to results.

Download:
From tableTo tableJoin fieldsCardinalityWhat the join gives you
QALS
QAVE
PRUEFLOS = PRUEFLOS
1 to 0..1
Inspection lot to usage decision (UD code, quality score)
QALS
QAPO
PRUEFLOS = PRUEFLOS
1 to many
Inspection lot to inspection operations
QALS
QAMV
PRUEFLOS = PRUEFLOS
1 to many
Inspection lot to characteristic specifications (what to inspect)
QAPO
QAMV
PRUEFLOS + VORGLFNR
1 to many
Operation to its characteristics
QAMV
QAMR
PRUEFLOS + VORGLFNR + MERKNR
1 to many
Characteristic to its recorded results (mean, std deviation, valuation)
QAMV
QASR
PRUEFLOS + VORGLFNR + MERKNR
1 to many
Characteristic to sample results
QASR
QASE
PRUEFLOS + VORGLFNR + MERKNR + PROBENR
1 to many
Sample to single (individual) measured values
QALS
MAKT
MATNR = MATNR (and SPRAS)
many to 1
Material description for the lot
QALS
QMAT
MATNR + WERK(S) + ART
many to 1
Lot to the inspection type setup for the material
QALS
MAPL
PLNTY + PLNNR + PLNAL (task list reference) and MATNR + WERK
many to 1
Lot to the material to task list assignment it was created from
MAPL
PLKO
PLNTY + PLNNR + PLNAL
many to 1
Material assignment to the inspection plan header (group counter)
PLKO
PLAS
PLNTY + PLNNR + PLNAL
1 to many
Plan header to operation allocations
PLAS
PLPO
PLNTY + PLNNR + PLNKN
1 to 1
Allocation to operation data (work center, control key)
PLPO
PLMK
PLNTY + PLNNR + PLNKN
1 to many
Operation to inspection plan characteristics
PLMK
QPMK
Master characteristic number and version (VERWMERKM to MKMNR), with plant
many to 1
Plan characteristic to the master inspection characteristic it references
QPMK
QPMT
MKMNR + ZAEHLER (and language)
1 to many
Master characteristic to its descriptions
QALS
JEST
OBJNR = OBJNR
1 to many
Lot to its system and user statuses (filter on INACT blank)
QMEL
QMFE
QMNUM = QMNUM
1 to many
Quality notification to defects (items)
QMFE
QMUR
QMNUM + FENUM
1 to many
Defect item to causes
QMEL
QMMA
QMNUM = QMNUM
1 to many
Notification to tasks (corrective actions)
QMEL
QMSM
QMNUM = QMNUM
1 to many
Notification to activities

Field names are the standard ECC and S/4HANA names, but validate each join in SE11 or SE16N on your own system before building a report. Customer-specific fields, S/4HANA simplifications and archived data can change what you see. Join to status tables by OBJNR and always check the INACT flag.

Get a QM report spec reviewed

Send the tables and joins you plan to use and we will check the join path. Optional.

Optional. The tool and every export work without this. No spam.

How to read the map

Start at the inspection lot (QALS) because almost everything hangs off its key PRUEFLOS. Follow the chain down: operations in QAPO, characteristic specifications in QAMV, results in QAMR, samples in QASR and single values in QASE. The usage decision lives in QAVE. On the planning side, MAPL links a material to an inspection plan, PLKO is the plan header and PLMK holds the plan characteristics that point to master characteristics in QPMK.

  • Runtime data: QALS, QAPO, QAMV, QAMR, QASR, QASE, QAVE
  • Planning data: MAPL, PLKO, PLAS, PLPO, PLMK, QPMK
  • Notifications: QMEL, QMFE, QMUR, QMMA, QMSM

Typical report paths

A lot with its decision: QALS to QAVE on PRUEFLOS. Results per characteristic: QALS to QAMV to QAMR, joined on PRUEFLOS, VORGLFNR and MERKNR. A vendor quality score needs QALS with QAVE filtered by origin and vendor, then aggregated. The plan to results trace goes MAPL to PLKO to PLAS to PLPO to PLMK, then compares against QAMV for the lots created from that plan. Always join with the full composite key, or you will get row multiplication.

Pitfalls when joining QM tables

The most common error is joining QAMV to QAMR on PRUEFLOS and MERKNR only, which drops the operation number and duplicates rows. Another is forgetting that plans change: QALS holds a copy of the specification at lot creation, so compare against QAMV, not the current PLMK, if you want what was actually inspected. Statuses are not in QALS columns; use JEST with the object number and ignore inactive entries.

ERP and S/4HANA notes

In S/4HANA the data model for core QM tables is largely unchanged, but notification and master data tools are redirected through Fiori and business partner objects. Use CDS views released by SAP where they exist rather than reading tables directly in new developments.

Frequently Asked Questions

What is the main key of SAP QM inspection tables?

PRUEFLOS, the inspection lot number, is the main key. Operation and characteristic level tables add VORGLFNR (operation sequence) and MERKNR (characteristic number), and sample tables add PROBENR for the sample number.

How do I link an inspection plan to its inspection lots?

Use the task list reference stored on the inspection lot (plan type, group and group counter) and the material assignment in MAPL. For what was actually inspected, read QAMV, because the lot holds its own copy of the specification.

Where is the usage decision stored?

In QAVE, one record per inspection lot, joined on PRUEFLOS. It holds the code group and code of the decision, the quality score, and the person and date of the decision.

Is this the same as an official SAP ER diagram?

No. It is a practical relationship list built from standard keys. Validate each join in SE11 or SE16N on your system, since release, add-ons and custom fields can differ.

If your team keeps asking for QM reports built on these joins, Netray can add a read-only AI layer over your SAP data on your own servers so quality engineers can ask for lots, results and vendor scores in plain language, with the generated query visible.