Batches Due for Re-Test or Shelf-Life Expiry Report
Short answer: A custom ALV report that lists batches in stock with their next inspection (re-test) date and shelf-life expiry date, the days remaining and any open recurring inspection lot. Quality and warehouse teams see expired or soon-to-expire stock before it is used.
- Estimated effort
- S · 2–4 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
QA07 creates recurring inspection lots in the background for batches whose next inspection date has arrived, but it does not give a list of batches that will fall due in the coming weeks. MB5M shows the shelf-life expiry date but does not show the re-test date, quality stock and the open inspection lot on the same line. Tracking both dates together with stock needs a custom report.
Who uses it? Quality control and quality assurance teams, warehouse supervisors and production planning, especially in chemicals, food and pharma.
Closest standard alternatives
Tables used
The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.
| Table | Role | Join | System |
|---|---|---|---|
| MCHBBatch Stocks | Batch stock: unrestricted, quality and blocked (driving table) | — | ECC + S/4 |
| MCHABatches (Plant Level) | Batch dates at plant level | MCHA-MATNR = MCHB-MATNR AND MCHA-WERKS = MCHB-WERKS AND MCHA-CHARG = MCHB-CHARG | ECC + S/4 |
| MCH1Batches (Cross-Plant Batch Management) | Batch dates at material or client level | MCH1-MATNR = MCHB-MATNR AND MCH1-CHARG = MCHB-CHARG | ECC + S/4 |
| QALSInspection Lot Record | Open recurring inspection lot | QALS-MATNR = MCHB-MATNR AND QALS-CHARG = MCHB-CHARG AND QALS-WERK = MCHB-WERKS (HERKUNFT = 09) | ECC + S/4 |
| MAKTMaterial Descriptions | Material description | MAKT-MATNR = MCHB-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |
S/4HANA notes
- MCHB → MATDOC: In S/4HANA batch stock quantities are calculated from MATDOC through a compatibility view; reads work, but test performance on large selections.
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | MCHB-WERKS | Yes | 1000 |
| S_LGORT | Storage location | Range / multiple | MCHB-LGORT | No | 0001 |
| S_MATNR | Material | Range / multiple | MCHB-MATNR | No | RM-3100 |
| S_CHARG | Batch | Range / multiple | MCHB-CHARG | No | B260815 |
| P_KEYDT | Key date | Single value | — | Yes | 17.11.2026 |
| P_DAYS | Days ahead for warning | Single value | — | No | 30 |
| P_STOCK | Only batches with stock | Checkbox | — | No | X |
Output columns
| # | Column | Source |
|---|---|---|
| 1 | Material | MCHB-MATNR |
| 2 | Material description | MAKT-MAKTX |
| 3 | Storage location | MCHB-LGORT |
| 4 | Batch | MCHB-CHARG |
| 5 | Unrestricted stock | MCHB-CLABS |
| 6 | Quality stock | MCHB-CINSM |
| 7 | Blocked stock | MCHB-CSPEM |
| 8 | Next inspection date | MCHA-QNDAT |
| 9 | Days to re-test | Calculated QNDAT − key date (a negative value means overdue) |
| 10 | Shelf-life expiry | MCHA-VFDAT |
| 11 | Days to expiry | Calculated VFDAT − key date |
| 12 | Open inspection lot | QALS-PRUEFLOS |
| 13 | Status | Calculated Expired, re-test overdue (no lot), re-test overdue (lot open), due soon or OK |
Sample output
| Material | Material description | Storage location | Batch | Unrestricted stock | Quality stock | Blocked stock | Next inspection date | Days to re-test | Shelf-life expiry | Days to expiry | Open inspection lot | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RM-3100 | Resin type A | 0001 | B260815 | 1,200 | 0 | 0 | 11/10/2026 | -7 | 02/15/2027 | 90 | Re-test overdue (no lot) | |
| RM-3100 | Resin type A | 0001 | B260902 | 0 | 800 | 0 | 11/14/2026 | -3 | 03/02/2027 | 105 | 090000004512 | Re-test overdue (lot open) |
| RM-3240 | Additive K2 | 0002 | B260611 | 350 | 0 | 0 | 12/05/2026 | 18 | 12/11/2026 | 24 | Due soon | |
| FG-8020 | Paint base 20 L | 0001 | B260304 | 0 | 0 | 140 | 09/30/2026 | -48 | 11/01/2026 | -16 | Expired |
How does the report work?
- Batch stocks in the selected plants and storage locations are read from MCHB; optionally only batches with unrestricted, quality or blocked stock above zero are taken.
- Batch dates are read according to the batch level: from MCHA at plant level, from MCH1 at material or client level. The next inspection date is QNDAT, the shelf-life expiry date VFDAT and the production date HSDAT.
- Days remaining = date − key date, calculated separately for both dates.
- For the same material, batch and plant an inspection lot with origin 09 (recurring inspection) and no usage decision (QALS-STAT35 blank) is searched and its number is shown.
- Status: shelf life expired, re-test date passed and no lot (QA07 did not run or no lot was created), due within the days in the parameter, or OK. The material description is added from MAKT.
Performance notes
Read MCHB with the plant and material filters and drop zero-stock batches in the database. Read QALS in bulk with HERKUNFT = 09 and the material list.
Features
- ALV list (sort, filter, subtotals)
- User-specific layout variants
- Double-click drill-down to the document Double-clicking the batch opens MSC3N; clicking the inspection lot opens QA03.
- Export to Excel
- Runs as a background job
- Send the result by email Batches due within the next 30 days can be sent weekly to the quality team.
Authorization objects
- M_MSEG_WMBStock display authorization by plant
- Q_INSPTYPEInspection lot authorization by inspection type
Frequently asked questions
Why are batch dates sometimes in MCHA and sometimes in MCH1?
It depends on the batch level setting of the system. At plant level the dates are kept in MCHA; at material or client level in MCH1. The report reads this setting at installation and uses the right table.
Can the report create the recurring inspection lot itself?
The standard version only lists; creating lots is the job of QA07. "Re-test overdue, no lot" lines usually mean the QA07 job is not scheduled or recurring inspection is not active for the material.
What changes on S/4HANA?
On S/4HANA MCHB can still be read as a compatibility view and stock is calculated from material documents; the batch date fields do not change. The report logic stays the same.
Related reports
Stock Aging Report
A custom ALV report that shows how many days each material has been in stock since its last goods receipt and which age bucket (0–30, 31–90, 91–180, …
Inspection Lots Awaiting Usage Decision Aging Report
A custom ALV report that lists inspection lots without a usage decision, with how many days they have been waiting, whether they exceed the target …
Let us build this report for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.