# Customer Complaints Traced to Delivery, Batch and Inspection Lot Report

> A custom ALV report that shows customer complaint notifications on the same line as the delivery, the batch, the inspection lot of that batch, its usage decision and the number of rejected characteristics. Quality teams see at a glance how the complained batch was judged in production or at goods receipt, and whether other complaints came from the same batch.

- Type: Report, Custom development, ALV report
- Module: QM
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/customer-complaint-batch-and-inspection-lot-trace-report/


## Why is the standard not enough?

QM10 lists customer complaints; the delivery and batch are on the notification, but the production or goods receipt inspection lot of that batch, its usage decision and failed characteristics have to be looked up separately in QA03. MB56 traces where a batch came from but shows no quality result. No standard list shows the complaint and the inspection result on the same line.

### Closest standard alternatives

- QM10: Lists customer complaints; the inspection result and usage decision of the batch are not on the same line.
- QA33: Lists inspection lots with their decision; does not link them to customer complaints.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| QMEL | Customer complaint: customer, delivery, material, batch and complaint quantity (driving table) | Read | - | ECC + S/4 |
| QMFE | Defect code of the notification | Read | QMFE-QMNUM = QMEL-QMNUM | ECC + S/4 |
| LIPS | Batch from the delivery item when the notification has none | Read | LIPS-VBELN = QMEL-LS_VBELN AND LIPS-POSNR = QMEL-LS_POSNR | ECC + S/4 |
| QALS | Production or goods receipt inspection lot of the batch | Read | QALS-MATNR = QMEL-MATNR AND QALS-CHARG = QMEL-CHARG | ECC + S/4 |
| QAVE | Usage decision of the inspection lot | Read | QAVE-PRUEFLOS = QALS-PRUEFLOS | ECC + S/4 |
| QAMR | Rejected characteristics | Read | QAMR-PRUEFLOS = QALS-PRUEFLOS AND QAMR-MBEWERTG = 'R' | ECC + S/4 |
| KNA1 | Customer name | Read | KNA1-KUNNR = QMEL-KUNUM | ECC + S/4 |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_QMART | Customer complaint notification type | Range / multiple | QMEL-QMART | Yes |
| S_KUNUM | Customer | Range / multiple | QMEL-KUNUM | No |
| S_MATNR | Material | Range / multiple | QMEL-MATNR | No |
| S_CHARG | Batch | Range / multiple | QMEL-CHARG | No |
| S_QMDAT | Notification date | Range / multiple | QMEL-QMDAT | Yes |
| S_VKORG | Sales organization | Range / multiple | QMEL-VKORG | No |
| P_ALLLOT | Show all inspection lots of the batch | Checkbox | - | No |

## Output columns

| Column | Source |
|---|---|
| Notification | QMEL-QMNUM |
| Notification date | QMEL-QMDAT |
| Customer | QMEL-KUNUM |
| Customer name | KNA1-NAME1 |
| Delivery | QMEL-LS_VBELN |
| Material | QMEL-MATNR |
| Batch | QMEL-CHARG |
| Complaint qty | QMEL-RKMNG |
| Defect code | QMFE-FECOD |
| Inspection lot | QALS-PRUEFLOS |
| Lot origin | QALS-HERKUNFT |
| Usage decision | QAVE-VCODE |
| Rejected characteristics | Calculated: Number of characteristics with QAMR-MBEWERTG = R |
| Complaints on same batch | Calculated: Number of notifications for the same QMEL-MATNR and QMEL-CHARG |

## How does the report work?

1. QMEL is read with the customer complaint notification types, customer, material, date and sales organization from the selection screen.
2. If the batch is empty on the notification, it is taken from the delivery item (QMEL-LS_VBELN / LS_POSNR → LIPS-CHARG).
3. The inspection lots in QALS for the material and batch are found (production origin 04 or goods receipt 01); by default the latest lot is shown, optionally all of them.
4. The usage decision of the lot comes from QAVE and the number of rejected characteristics from QAMR records with MBEWERTG = R.
5. The first defect code of the notification is added from QMFE; other complaints for the same material and batch are counted. The customer name comes from KNA1.

## Authorization objects

- Q_QMEL: Quality notification display authorization by notification type
- Q_INSPTYPE: Inspection lot authorization by inspection type

## Frequently asked questions

### Does the report work without batch management?

Without batches, the link to the inspection lot can be made by material and date range, but the match is not exact. The report works best for batch-managed materials.

### Can it go down to the component batches?

Yes. By reading the batch where-used records, the component batches of the finished batch and their goods receipt inspection lots can be shown in an extra view; this raises the effort range.

### Does the report work on S/4HANA?

Yes. QMEL, QMFE, QALS, QAVE and QAMR keep the same structure in S/4HANA.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=qm-customer-complaint-batch-trace
