Orders Using Expired or Locked Production Versions Report
Short answer: A custom ALV report that checks production versions against their validity dates, lock status and the validity of the BOM and routing they point to, and lists the open production and planned orders created with that version. Versions that will expire soon are flagged in advance.
- Estimated effort
- M · 3–5 working days
- System
- ECC and S/4HANA
- Tables
- 8
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
C223 is used to maintain production versions and run the consistency check; it does not show open orders that were created with a version before it expired or was locked. Even when the linked BOM alternative was deleted or the routing carries a deletion flag, each version has to be opened separately to see it. As a result orders fail when they are re-read, MRP cannot create new planned orders or the cost estimate stops. The custom report gives the problem versions and the orders they affect in one list.
Who uses it? Production master data owners, PP consultants, production planners and cost accounting (for product costing).
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 |
|---|---|---|---|
| MKALProduction Versions of Material | Production version: validity, lock, BOM and routing link (driving table) | — | ECC + S/4 |
| MASTMaterial to BOM Link | Existence of the version's BOM usage and alternative | MAST-MATNR = MKAL-MATNR AND MAST-WERKS = MKAL-WERKS AND MAST-STLAN = MKAL-STLAN AND MAST-STLAL = MKAL-STLAL | ECC + S/4 |
| STKOBOM Header | BOM header validity and deletion indicator | STKO-STLTY = 'M' AND STKO-STLNR = MAST-STLNR AND STKO-STLAL = MAST-STLAL | ECC + S/4 |
| PLKOTask List Header | Routing header validity and deletion flag | PLKO-PLNTY = MKAL-PLNTY AND PLKO-PLNNR = MKAL-PLNNR AND PLKO-PLNAL = MKAL-ALNAL | ECC + S/4 |
| AFPOOrder Item | Open production order items created with this version | AFPO-MATNR = MKAL-MATNR AND AFPO-DWERK = MKAL-WERKS AND AFPO-VERID = MKAL-VERID | ECC + S/4 |
| AFKOOrder Header Data for PP Orders | Scheduled start of the production order | AFKO-AUFNR = AFPO-AUFNR | ECC + S/4 |
| PLAFPlanned Order | Open planned orders created with this version | PLAF-MATNR = MKAL-MATNR AND PLAF-PLWRK = MKAL-WERKS AND PLAF-VERID = MKAL-VERID | ECC + S/4 |
| MAKTMaterial Descriptions | Material description | MAKT-MATNR = MKAL-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | MKAL-WERKS | Yes | 1000 |
| S_MATNR | Material | Range / multiple | MKAL-MATNR | No | FG-6100 |
| S_DISPO | MRP controller | Range / multiple | MARC-DISPO | No | 001 |
| P_KEYDT | Key date | Single value | — | Yes | 17.11.2026 |
| P_HORIZ | Expiry warning horizon (days) | Single value | — | No | 60 |
| P_OPEN | Only versions with open orders | Checkbox | — | No | X |
Output columns
| # | Column | Source |
|---|---|---|
| 1 | Material | MKAL-MATNR |
| 2 | Description | MAKT-MAKTX |
| 3 | Plant | MKAL-WERKS |
| 4 | Production version | MKAL-VERID |
| 5 | Version text | MKAL-TEXT1 |
| 6 | Valid from | MKAL-ADATU |
| 7 | Valid to | MKAL-BDATU |
| 8 | Lock | MKAL-MKSP |
| 9 | BOM alternative | MKAL-STLAL |
| 10 | Routing group | MKAL-PLNNR |
| 11 | Check status | MKAL-PRFG_F |
| 12 | Issue found | Calculated Expired, expiring soon, locked, BOM invalid or routing invalid |
| 13 | Open production orders | Calculated Number of AFPO items with the same MATNR, DWERK and VERID, ELIKZ blank and no TECO |
| 14 | Open planned orders | Calculated Number of PLAF records with the same MATNR, PLWRK and VERID |
| 15 | Earliest start | Calculated MIN(AFKO-GSTRP, PLAF-PSTTR) |
Sample output
| Material | Description | Plant | Production version | Version text | Valid from | Valid to | Lock | BOM alternative | Routing group | Check status | Issue found | Open production orders | Open planned orders | Earliest start |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FG-6100 | Panel cabinet 80 cm | 1000 | 0001 | Line 1 series production | 01/01/2025 | 10/31/2026 | 1 | 50000120 | Expired | 3 | 5 | 11/12/2026 | ||
| FG-5003 | Packed product C | 1000 | 0002 | New packaging line | 06/01/2026 | 12/31/9999 | 2 | 50000188 | BOM alternative deleted | 1 | 2 | 11/20/2026 | ||
| FG-7200 | Compressor unit K2 | 2000 | 0001 | Assembly cell B | 09/01/2024 | 12/31/2026 | 1 | 50000231 | Expires in 44 days | 2 | 8 | 11/25/2026 | ||
| SA-3100 | Body assembly | 1000 | 0003 | Subcontract welding | 02/01/2026 | 12/31/9999 | 1 | 1 | 50000245 | Locked | 1 | 0 | 11/18/2026 |
How does the report work?
- Production versions are read from MKAL for the plant and materials on the selection screen.
- Every version is checked: is the validity end (BDATU) before the key date; does it fall within the selected warning horizon; is the lock indicator (MKSP) set; does the consistency check status (PRFG_F) show an error.
- The BOM usage and alternative of the version (STLAN, STLAL) are looked up in MAST and STKO; when not found, flagged for deletion (STKO-LOEKZ) or not valid on the key date, it is marked as an issue.
- The routing of the version (PLNTY, PLNNR, ALNAL) is looked up in PLKO; a deletion flag (LOEKZ) or a validity start (DATUV) after the key date is written as an issue.
- For problem versions, open production orders created with the same material, plant and VERID (AFPO, ELIKZ blank, no TECO) and open planned orders (PLAF) are counted; the earliest order start comes from AFKO-GSTRP and PLAF-PSTTR.
- When ‘only with open orders’ is selected, versions without open orders are hidden.
Performance notes
MKAL is a small table; the expensive part is counting open orders. Read AFPO and PLAF with FOR ALL ENTRIES only for the materials of problem versions. The report can run as a weekly background job and be emailed to the master data team.
Features
- ALV list (sort, filter, subtotals)
- User-specific layout variants
- Double-click drill-down to the document The version opens C223, the order count opens the COOIS list of those orders.
- Export to Excel
- Runs as a background job
- Send the result by email The list of problem versions can be sent weekly to the master data team.
Authorization objects
- C_AFKO_AWKDisplay open production orders by plant and order type
- C_STUE_WRKDisplay the linked BOMs by plant
- C_ROUTDisplay the linked routings
Frequently asked questions
Does the report fix production versions?
No, the report only reads. Corrections are made in C223 or with a separate mass update program; the version number in the report leads directly to C223.
Are repetitive manufacturing and process orders included?
Production versions are used in all of these scenarios. The base version counts production and planned orders; process orders (PP-PI) use the same AFPO structure and can be included by order type selection.
Why does this matter more on S/4HANA?
In S/4HANA the production version is mandatory for MRP and order creation, so an invalid version stops planning directly. The report works on S/4HANA with the same tables.
Packages that include this solution
BOM, Routing and Production Version Pack
A five-component pack that loads, changes and audits production master data: mass routing creation from Excel, mass BOM component changes, an audit of …
Related reports
Multi-Level BOM Where-Used Report with Open Production Orders
A custom ALV report that shows in which assemblies and, at the top, in which finished goods one or more components are used, as a flat list that …
Overdue Production Orders and Remaining Quantity Report
A custom ALV report that lists production orders past their basic finish date that are not yet fully received, with days late, remaining quantity and …
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.