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

> Source: https://netray.co/tools/sap-qm-tables-er-diagram-key-joins-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

A searchable relationship map of the main SAP QM tables with the key fields to join them, so you can build reports without guessing.

## Category

quality

## Erp

SAP ECC / S/4HANA

## Audience

- SAP developer
- SAP QM analyst
- Report builder

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### From table

**Key:** from_table

**Type:** text

#### To table

**Key:** to_table

**Type:** text

#### Join fields

**Key:** join

**Type:** text

#### Cardinality

**Key:** cardinality

**Type:** text

#### What the join gives you

**Key:** use

**Type:** text

**Rows:**

**From table:** QALS

**To table:** QAVE

**Join:** PRUEFLOS = PRUEFLOS

**Cardinality:** 1 to 0..1

**Use:** Inspection lot to usage decision (UD code, quality score)

**From table:** QALS

**To table:** QAPO

**Join:** PRUEFLOS = PRUEFLOS

**Cardinality:** 1 to many

**Use:** Inspection lot to inspection operations

**From table:** QALS

**To table:** QAMV

**Join:** PRUEFLOS = PRUEFLOS

**Cardinality:** 1 to many

**Use:** Inspection lot to characteristic specifications (what to inspect)

**From table:** QAPO

**To table:** QAMV

**Join:** PRUEFLOS + VORGLFNR

**Cardinality:** 1 to many

**Use:** Operation to its characteristics

**From table:** QAMV

**To table:** QAMR

**Join:** PRUEFLOS + VORGLFNR + MERKNR

**Cardinality:** 1 to many

**Use:** Characteristic to its recorded results (mean, std deviation, valuation)

**From table:** QAMV

**To table:** QASR

**Join:** PRUEFLOS + VORGLFNR + MERKNR

**Cardinality:** 1 to many

**Use:** Characteristic to sample results

**From table:** QASR

**To table:** QASE

**Join:** PRUEFLOS + VORGLFNR + MERKNR + PROBENR

**Cardinality:** 1 to many

**Use:** Sample to single (individual) measured values

**From table:** QALS

**To table:** MAKT

**Join:** MATNR = MATNR (and SPRAS)

**Cardinality:** many to 1

**Use:** Material description for the lot

**From table:** QALS

**To table:** QMAT

**Join:** MATNR + WERK(S) + ART

**Cardinality:** many to 1

**Use:** Lot to the inspection type setup for the material

**From table:** QALS

**To table:** MAPL

**Join:** PLNTY + PLNNR + PLNAL (task list reference) and MATNR + WERK

**Cardinality:** many to 1

**Use:** Lot to the material to task list assignment it was created from

**From table:** MAPL

**To table:** PLKO

**Join:** PLNTY + PLNNR + PLNAL

**Cardinality:** many to 1

**Use:** Material assignment to the inspection plan header (group counter)

**From table:** PLKO

**To table:** PLAS

**Join:** PLNTY + PLNNR + PLNAL

**Cardinality:** 1 to many

**Use:** Plan header to operation allocations

**From table:** PLAS

**To table:** PLPO

**Join:** PLNTY + PLNNR + PLNKN

**Cardinality:** 1 to 1

**Use:** Allocation to operation data (work center, control key)

**From table:** PLPO

**To table:** PLMK

**Join:** PLNTY + PLNNR + PLNKN

**Cardinality:** 1 to many

**Use:** Operation to inspection plan characteristics

**From table:** PLMK

**To table:** QPMK

**Join:** Master characteristic number and version (VERWMERKM to MKMNR), with plant

**Cardinality:** many to 1

**Use:** Plan characteristic to the master inspection characteristic it references

**From table:** QPMK

**To table:** QPMT

**Join:** MKMNR + ZAEHLER (and language)

**Cardinality:** 1 to many

**Use:** Master characteristic to its descriptions

**From table:** QALS

**To table:** JEST

**Join:** OBJNR = OBJNR

**Cardinality:** 1 to many

**Use:** Lot to its system and user statuses (filter on INACT blank)

**From table:** QMEL

**To table:** QMFE

**Join:** QMNUM = QMNUM

**Cardinality:** 1 to many

**Use:** Quality notification to defects (items)

**From table:** QMFE

**To table:** QMUR

**Join:** QMNUM + FENUM

**Cardinality:** 1 to many

**Use:** Defect item to causes

**From table:** QMEL

**To table:** QMMA

**Join:** QMNUM = QMNUM

**Cardinality:** 1 to many

**Use:** Notification to tasks (corrective actions)

**From table:** QMEL

**To table:** QMSM

**Join:** QMNUM = QMNUM

**Cardinality:** 1 to many

**Use:** Notification to activities

**Notes:** 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.

## Content

**Intro:** 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.

**Sections:**

#### How to read the map

**Body:** 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.

**Bullets:**

- 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

**Body:** 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

**Body:** 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

**Body:** 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.

**Cta:** 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.

**Faq:**

#### What is the main key of SAP QM inspection tables?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

sap qm tables relationship diagram, sap qm er diagram, sap qm table joins, qals qave join, mapl plmk join, qals qamv join, sap qm inspection lot tables, sap qm data model

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
