# Process Capability (Cp/Cpk) Report by Inspection Characteristic

> A custom ALV report that calculates the mean, standard deviation, Cp and Cpk for each master inspection characteristic from the quantitative results of the inspection lots of the selected material and period, and classifies them as capable, marginal or not capable against a target Cpk. Quality engineers get the capability table requested in customer audits and PPAP files from SAP data in one run.

- 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/process-capability-cp-cpk-report-by-inspection-characteristic/


## Why is the standard not enough?

QGA2 and QE03 show results per inspection lot and characteristic; they do not combine the results of many lots for one characteristic and calculate Cp/Cpk. SPC control charts only work with configured control chart types and task list settings and are not active in most systems. Teams export the results and calculate them in statistics software. The custom report calculates the capability indices directly from single values or summarized results and also handles one-sided tolerances correctly.

### Closest standard alternatives

- QGA2: Shows inspection results per lot; does not combine lots or calculate Cp/Cpk.
- QE03: Shows the characteristic results of one lot; no capability analysis over a period.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| QALS | Inspection lot: material, plant, inspection type, creation date (driving table) | Read | - | ECC + S/4 |
| QAMV | Characteristic specification: master characteristic, target value, lower and upper tolerance, unit | Read | QAMV-PRUEFLOS = QALS-PRUEFLOS | ECC + S/4 |
| QAMR | Characteristic summary result: mean, variance, number of values | Read | QAMR-PRUEFLOS = QAMV-PRUEFLOS AND QAMR-VORGLFNR = QAMV-VORGLFNR AND QAMR-MERKNR = QAMV-MERKNR | ECC + S/4 |
| QASE | Single measured values | Read | QASE-PRUEFLOS = QAMV-PRUEFLOS AND QASE-VORGLFNR = QAMV-VORGLFNR AND QASE-MERKNR = QAMV-MERKNR | ECC + S/4 |
| MAKT | Material description | Read | MAKT-MATNR = QALS-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |
| I_InspectionResultValue | In S/4HANA it can replace QASE with a clean core approach | Read | InspectionLot = QALS-PRUEFLOS | S/4HANA only |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_WERK | Plant | Range / multiple | QALS-WERK | Yes |
| S_MATNR | Material | Range / multiple | QALS-MATNR | Yes |
| S_ART | Inspection type | Range / multiple | QALS-ART | No |
| S_DATE | Lot creation date range | Range / multiple | QALS-ENSTEHDAT | Yes |
| S_MIC | Master inspection characteristic | Range / multiple | QAMV-VERWMERKM | No |
| P_MINN | Minimum number of values | Single value | - | No |
| P_CPK | Target Cpk | Single value | - | Yes |
| P_SINGLE | Calculate from single values (QASE) | Checkbox | - | No |

## Output columns

| Column | Source |
|---|---|
| Material | QALS-MATNR |
| Material description | MAKT-MAKTX |
| Master characteristic | QAMV-VERWMERKM |
| Characteristic text | QAMV-KURZTEXT |
| Target value | QAMV-SOLLWERT |
| Lower limit (LSL) | QAMV-TOLERANZUN |
| Upper limit (USL) | QAMV-TOLERANZOB |
| Unit | QAMV-MASSEINHSW |
| Lots | Calculated: Number of distinct QALS-PRUEFLOS |
| Values | Calculated: Number of QASE single values or Σ QAMR-ANZWERTG |
| Mean | Calculated: Mean of all values (x̄) |
| Standard deviation | Calculated: σ = √(sample variance) |
| Cp | Calculated: (USL − LSL) ÷ 6σ; empty for a one-sided tolerance |
| Cpk | Calculated: min(USL − x̄, x̄ − LSL) ÷ 3σ |
| Out of tolerance % | Calculated: Values outside the limits ÷ number of values × 100 |
| Status | Calculated: Capable (Cpk ≥ target), marginal (1.00 – target), not capable (< 1.00) or insufficient data |

## How does the report work?

1. QALS is read by plant, material, inspection type and lot creation date (ENSTEHDAT); cancelled lots are skipped.
2. Quantitative characteristics with at least one tolerance limit are taken from QAMV; results are grouped by master inspection characteristic (QAMV-VERWMERKM), so different lots and plans are combined. Limits are taken from the latest lot; if limits changed between lots, the line is flagged.
3. With "Calculate from single values" selected, the QASE-MESSWERT single values (except those flagged invalid) are used; otherwise the mean (MITTELWERT), variance (VARIANZ) and number of values (ANZWERTG) are taken from the QAMR summary of each lot and the pooled variance is calculated as Σ((nᵢ − 1)·sᵢ² + nᵢ·(x̄ᵢ − x̄)²) ÷ (N − 1).
4. σ = √variance; Cp = (USL − LSL) ÷ 6σ; Cpk = min(USL − x̄, x̄ − LSL) ÷ 3σ. For a one-sided tolerance only the available side is used and Cp stays empty.
5. Out of tolerance % = number of values outside the limits ÷ total values × 100.
6. Classification: Cpk ≥ target is capable, between 1.00 and the target is marginal, below 1.00 is not capable; if the number of values is below the minimum, "insufficient data" is shown.

## Authorization objects

- Q_INSPTYPE: Inspection lot display authorization by inspection type
- M_MATE_WRK: Material authorization by plant

## Frequently asked questions

### Should single values or summarized results be used?

If the characteristic is recorded with single values (QASE filled), single values give the most accurate result. If only summarized results are recorded, the report calculates the pooled variance from each lot's mean and variance, taking both within-lot and between-lot spread into account.

### How are one-sided tolerances calculated?

For characteristics with only an upper or only a lower limit, Cpk is calculated against the available limit (e.g. (USL − x̄) ÷ 3σ). Cp is left empty because it needs both limits.

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

Yes. QALS, QAMV, QAMR and QASE also exist in S/4HANA. For a clean core approach, the I_InspectionCharacteristic, I_InspectionResult and I_InspectionResultValue CDS views can be used.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=qm-process-capability-cpk
