PP Report Custom development ALV report

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

  • C223 Maintain Production Versions. Maintains and checks production versions; does not list open orders created with the version.
  • COOIS Production Order Information System. Can list orders with their production version, but does not check whether the version is still valid.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
MKALProduction Versions of MaterialProduction version: validity, lock, BOM and routing link (driving table)—ECC + S/4
MASTMaterial to BOM LinkExistence of the version's BOM usage and alternativeMAST-MATNR = MKAL-MATNR AND MAST-WERKS = MKAL-WERKS AND MAST-STLAN = MKAL-STLAN AND MAST-STLAL = MKAL-STLALECC + S/4
STKOBOM HeaderBOM header validity and deletion indicatorSTKO-STLTY = 'M' AND STKO-STLNR = MAST-STLNR AND STKO-STLAL = MAST-STLALECC + S/4
PLKOTask List HeaderRouting header validity and deletion flagPLKO-PLNTY = MKAL-PLNTY AND PLKO-PLNNR = MKAL-PLNNR AND PLKO-PLNAL = MKAL-ALNALECC + S/4
AFPOOrder ItemOpen production order items created with this versionAFPO-MATNR = MKAL-MATNR AND AFPO-DWERK = MKAL-WERKS AND AFPO-VERID = MKAL-VERIDECC + S/4
AFKOOrder Header Data for PP OrdersScheduled start of the production orderAFKO-AUFNR = AFPO-AUFNRECC + S/4
PLAFPlanned OrderOpen planned orders created with this versionPLAF-MATNR = MKAL-MATNR AND PLAF-PLWRK = MKAL-WERKS AND PLAF-VERID = MKAL-VERIDECC + S/4
MAKTMaterial DescriptionsMaterial descriptionMAKT-MATNR = MKAL-MATNR AND MAKT-SPRAS = SY-LANGUECC + S/4

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_WERKSPlantRange / multipleMKAL-WERKSYes1000
S_MATNRMaterialRange / multipleMKAL-MATNRNoFG-6100
S_DISPOMRP controllerRange / multipleMARC-DISPONo001
P_KEYDTKey dateSingle value—Yes17.11.2026
P_HORIZExpiry warning horizon (days)Single value—No60
P_OPENOnly versions with open ordersCheckbox—NoX

Output columns

#ColumnSource
1MaterialMKAL-MATNR
2DescriptionMAKT-MAKTX
3PlantMKAL-WERKS
4Production versionMKAL-VERID
5Version textMKAL-TEXT1
6Valid fromMKAL-ADATU
7Valid toMKAL-BDATU
8LockMKAL-MKSP
9BOM alternativeMKAL-STLAL
10Routing groupMKAL-PLNNR
11Check statusMKAL-PRFG_F
12Issue foundCalculated Expired, expiring soon, locked, BOM invalid or routing invalid
13Open production ordersCalculated Number of AFPO items with the same MATNR, DWERK and VERID, ELIKZ blank and no TECO
14Open planned ordersCalculated Number of PLAF records with the same MATNR, PLWRK and VERID
15Earliest startCalculated MIN(AFKO-GSTRP, PLAF-PSTTR)

Sample output

MaterialDescriptionPlantProduction versionVersion textValid fromValid toLockBOM alternativeRouting groupCheck statusIssue foundOpen production ordersOpen planned ordersEarliest start
FG-6100Panel cabinet 80 cm10000001Line 1 series production01/01/202510/31/2026150000120Expired3511/12/2026
FG-5003Packed product C10000002New packaging line06/01/202612/31/9999250000188BOM alternative deleted1211/20/2026
FG-7200Compressor unit K220000001Assembly cell B09/01/202412/31/2026150000231Expires in 44 days2811/25/2026
SA-3100Body assembly10000003Subcontract welding02/01/202612/31/99991150000245Locked1011/18/2026
A view built with fictional sample data; not real system data.

How does the report work?

  1. Production versions are read from MKAL for the plant and materials on the selection screen.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

PP Package Custom

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 …

5 components · v1.0

Related reports

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.

Related report: Orders Using Expired or Locked Production Versions Report