{"audience":"Production master data owners, PP consultants, production planners and cost accounting (for product costing).","authorization_objects":[{"note":"Display open production orders by plant and order type","object":"C_AFKO_AWK"},{"note":"Display the linked BOMs by plant","object":"C_STUE_WRK"},{"note":"Display the linked routings","object":"C_ROUT"}],"components":[],"countries":[],"effort_days_max":5,"effort_days_min":3,"effort_size":"M","faq":[{"a":"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.","q":"Does the report fix production versions?"},{"a":"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.","q":"Are repetitive manufacturing and process orders included?"},{"a":"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.","q":"Why does this matter more on S/4HANA?"}],"features":[{"code":"alv","label":"ALV list (sort, filter, subtotals)","note":""},{"code":"layout","label":"User-specific layout variants","note":""},{"code":"drilldown","label":"Double-click drill-down to the document","note":"The version opens C223, the order count opens the COOIS list of those orders."},{"code":"excel","label":"Export to Excel","note":""},{"code":"background","label":"Runs as a background job","note":""},{"code":"email","label":"Send the result by email","note":"The list of problem versions can be sent weekly to the master data team."}],"functions":[],"gap":"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.","id":"pp-expired-production-version-orders","industries":[],"input_columns":[],"kind":"report","language":"en","lastmod":"2026-11-17","logic":"1. Production versions are read from MKAL for the plant and materials on the selection screen.\n2. 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.\n3. 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.\n4. 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.\n5. 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.\n6. When 'only with open orders' is selected, versions without open orders are hidden.","module":"PP","object_type":"alv_report","output_columns":[{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Description","source_field":"MAKTX","source_table":"MAKT"},{"calculated":false,"formula":"","label":"Plant","source_field":"WERKS","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Production version","source_field":"VERID","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Version text","source_field":"TEXT1","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Valid from","source_field":"ADATU","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Valid to","source_field":"BDATU","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Lock","source_field":"MKSP","source_table":"MKAL"},{"calculated":false,"formula":"","label":"BOM alternative","source_field":"STLAL","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Routing group","source_field":"PLNNR","source_table":"MKAL"},{"calculated":false,"formula":"","label":"Check status","source_field":"PRFG_F","source_table":"MKAL"},{"calculated":true,"formula":"Expired, expiring soon, locked, BOM invalid or routing invalid","label":"Issue found","source_field":null,"source_table":null},{"calculated":true,"formula":"Number of AFPO items with the same MATNR, DWERK and VERID, ELIKZ blank and no TECO","label":"Open production orders","source_field":null,"source_table":null},{"calculated":true,"formula":"Number of PLAF records with the same MATNR, PLWRK and VERID","label":"Open planned orders","source_field":null,"source_table":null},{"calculated":true,"formula":"MIN(AFKO-GSTRP, PLAF-PSTTR)","label":"Earliest start","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERKS","ref_field":"MKAL-WERKS","required":true},{"example":"FG-6100","kind":"select_option","label":"Material","name":"S_MATNR","ref_field":"MKAL-MATNR","required":false},{"example":"001","kind":"select_option","label":"MRP controller","name":"S_DISPO","ref_field":"MARC-DISPO","required":false},{"example":"17.11.2026","kind":"parameter","label":"Key date","name":"P_KEYDT","ref_field":"","required":true},{"example":"60","kind":"parameter","label":"Expiry warning horizon (days)","name":"P_HORIZ","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Only versions with open orders","name":"P_OPEN","ref_field":"","required":false}],"part_of":["pp-production-master-data-pack"],"performance":"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.","quote_url":"https://nekuhub.com/en/request-a-quote/?report=pp-expired-production-version-orders","related":["pp-bom-where-used-open-orders","pp-overdue-production-orders"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Maintains and checks production versions; does not list open orders created with the version.","tcode":"C223"},{"note":"Can list orders with their production version, but does not check whether the version is still valid.","tcode":"COOIS"}],"summary":"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.","tables":[{"access":"read","join_on":"","role":"Production version: validity, lock, BOM and routing link (driving table)","table":"MKAL","variant":"both"},{"access":"read","join_on":"MAST-MATNR = MKAL-MATNR AND MAST-WERKS = MKAL-WERKS AND MAST-STLAN = MKAL-STLAN AND MAST-STLAL = MKAL-STLAL","role":"Existence of the version's BOM usage and alternative","table":"MAST","variant":"both"},{"access":"read","join_on":"STKO-STLTY = 'M' AND STKO-STLNR = MAST-STLNR AND STKO-STLAL = MAST-STLAL","role":"BOM header validity and deletion indicator","table":"STKO","variant":"both"},{"access":"read","join_on":"PLKO-PLNTY = MKAL-PLNTY AND PLKO-PLNNR = MKAL-PLNNR AND PLKO-PLNAL = MKAL-ALNAL","role":"Routing header validity and deletion flag","table":"PLKO","variant":"both"},{"access":"read","join_on":"AFPO-MATNR = MKAL-MATNR AND AFPO-DWERK = MKAL-WERKS AND AFPO-VERID = MKAL-VERID","role":"Open production order items created with this version","table":"AFPO","variant":"both"},{"access":"read","join_on":"AFKO-AUFNR = AFPO-AUFNR","role":"Scheduled start of the production order","table":"AFKO","variant":"both"},{"access":"read","join_on":"PLAF-MATNR = MKAL-MATNR AND PLAF-PLWRK = MKAL-WERKS AND PLAF-VERID = MKAL-VERID","role":"Open planned orders created with this version","table":"PLAF","variant":"both"},{"access":"read","join_on":"MAKT-MATNR = MKAL-MATNR AND MAKT-SPRAS = SY-LANGU","role":"Material description","table":"MAKT","variant":"both"}],"title":"Orders Using Expired or Locked Production Versions Report","url":"https://nekuhub.com/en/reports/production-orders-with-expired-or-locked-production-version-report/","vendor_id":"nekudos"}