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.
| From table | To table | Join fields | Cardinality | What 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.
Related Tools
SAP QM Database Tables Reference
Searchable lookup of the core SAP Quality Management tables, what each one stores and its main key fields, for report writers and data migration teams.
Developer ToolsSAP QM Inspection Lot ABAP SELECT Generator
Fill in plant, inspection type and date range and get a ready ABAP SELECT joining the inspection lot table QALS to the usage decision table QAVE.
Developer ToolsSAP Quality Notification Pareto SQL Query Generator
Build a SQL query over QMEL and QMFE that lists quality notifications and counts defects by code group and code, ready for a Pareto chart.
SAPSAP QM Transaction Codes Reference
A searchable list of the SAP QM transaction codes consultants and key users use every day, grouped by inspection, results, notifications and master data.
More Quality & Inspection tools
See all- SAP QM Process Capability Cp Cpk Calculator
- SAP QM Lot Rejection Rate, PPM and Sigma Level Calculator
- SAP QM Gauge R&R Study Calculator
- SAP QM Cp and Cpk Capability Calculator
- Job Shop Material Certification Log Worksheet
- Job Shop First Piece Inspection Sign-Off Template
- Job Shop Scrap and Rework Cost Calculator
- Master Data Audit Sample Size Calculator
- Data Quality Sigma Level Calculator
Keep exploring
Free tools
- SAP QM Tables Map: Notification, Inspection Plan and ResultsFind the SAP QM table for a quality notification, inspection plan, sample or result, with key fields and the table it joins to.
- SAP QM Database Tables ReferenceSearchable lookup of the core SAP Quality Management tables, what each one stores and its main key fields, for report writers and data migration teams.
- SAP MM Table Relationships and Join Keys ReferenceA searchable relationship map of SAP MM tables listing the join keys between purchasing, goods movement, invoice, material master and cost center tables.
ERP fixes and how-tos
- Define QM Procurement Key Error in SAP: What It Means and the FixFix the SAP QM procurement key error: define the key in OMJ7, assign it in the material QM view and tie it to the QM control key so inspection lots are created.
- SAP Error: Define QM Procurement Key (How to Fix It)Fix the SAP QM procurement key error: define the key in the QM in Procurement IMG, activate QM at plant level, and set QM proc. active and the control key in the material master.
- Inspection Results and Inspection Plan Reports in SAP QMWhich SAP QM transactions report inspection results and inspection plans? Use QA32, QE03, QGC1 for evaluation and QP19 for plan lists, plus the QM tables behind them.