Production version in SAP S/4HANA: how to create it and why it is required
production version in sap s4hana
Also searched as
- how to create production version in sap s4hana
- c223 production version
- mass maintenance of production versions sap
Short answer
A production version links a material, a plant and a validity period to one BOM and one routing or recipe. In S/4HANA you create it in C223 (or the Manage Production Versions app) and the system then uses it to pick the BOM and task list for planned and production orders. Without a valid one, order creation and MRP conversion fail.
Applies to: SAP S/4HANA (on-premise and private cloud editions); concept also applies to ECC. Menu text varies slightly by release.
Create a production version in C223
- 1Run transaction C223 (Logistics > Production > Master Data > Production Versions > Edit). Enter the material and plant and press Enter.
- 2Create a new line: give the version a four character key such as 0001 and a short text.
- 3Set Valid From and Valid To dates and, if you use lot size ranges, the Lot Size From and To so the version applies only to those quantities.
- 4Enter the routing: task list type (N for routing, R for rate routing, S for reference rate routing, or a recipe type), group and group counter.
- 5Enter the BOM: alternative BOM and BOM usage, or let the system derive them from the material and plant.
- 6Press Check. The system validates that the BOM and the routing exist, are valid in the date range and that components and operations are consistent.
- 7Save. Open the material master (MM03), MRP 4 view, and confirm the Selection Method and, if needed, that the version shows under the work scheduling view.
Why S/4HANA insists on production versions
In older ECC systems a production order could find its BOM and routing from the material master through automatic selection, using the BOM usage and plant. That path still exists in some configurations, but SAP's direction in S/4HANA is that the production version is the master data object that ties a manufacturing definition to a material. Planned orders, production orders, process orders, MRP conversion and costing all read it. If no version is found for the order quantity and date, you get the familiar message that no production version exists or that none is valid.
The production version is stored in table MKAL, keyed by material, plant and version. It carries the BOM and routing keys, validity dates and lot size range, and the version is locked or unlocked through a status flag. Because it carries dates and quantity bands, you can run two versions for the same product, for example a legacy line and a new line, and let the lot size or date decide which one MRP uses.
-- Quick check of versions for a material (SE16N on MKAL or ABAP SQL)
SELECT matnr, werks, verid, bdatu, adatu, plnty, plnnr, plnal, stlal, stlan
FROM mkal WHERE matnr = '000000000012345678' AND werks = '1010'.
Mass maintenance of production versions
When you onboard hundreds of materials, one by one entry in C223 is too slow. SAP provides a mass processing function for production versions (transaction C202 in many releases, also reachable from the Production Versions menu) where you select materials by plant or MRP controller and either create versions from a template or change fields in bulk, such as extending the valid-to date or switching the routing group. Run it first in test mode if the option exists, and check the log.
The other route is a migration object through the Migration Cockpit, or a controlled upload using a standard BAPI or a recorded batch input. Whatever you choose, load BOMs and routings first, because the version check fails if the referenced objects are missing or not valid on the validity dates. After a mass change, rerun the check function on a sample and read MKAL to confirm.
How production versions interact with MRP and costing
MRP converts planned orders using the version selected for the lot size and date. Materials that are externally procured do not need one. Materials flagged as made in house, including those with special procurement keys that produce in house, do. If MRP creates planned orders with no BOM explosion, the usual cause is a missing, locked or expired version.
For costing, the cost estimate with quantity structure (CK11N) takes its BOM and routing from the version determined for the costing lot size, so a wrong or missing version produces a wrong standard cost. Keep the versions reviewed in the same cycle as your standard cost run.
Try it here, free
SAP BAPI Production Order Create and Release ABAP Template
Fill in material, plant, order type and dates and get an ABAP skeleton that creates and releases a production order with a commit.
Common pitfalls
- !Validity dates that expire silently: a version with a Valid To in the past causes order creation to fail the day after, with no change to the material.
- !Lot size ranges that leave gaps: a version valid for 1 to 100 and another from 200 up leaves quantities 101 to 199 with no version.
- !Locked versions: a version locked in the status field is ignored by planning and by order creation.
- !Mass changing without checking: a bulk update can point many materials at a routing group whose validity does not cover the dates.
- !Assuming automatic BOM selection still works: configuration may allow it, but design for production versions to avoid surprises on upgrade.
How an ERP-grounded AI assistant handles this
An assistant grounded in your SAP data, such as ERPray reading MKAL, MAST and PLPO read-only, can list every in-house material that has no valid production version for the next planning horizon, or whose version expires within 60 days, and show the query it ran. Because it runs read-only, a planner reviews the list and a person still makes the change in C223. On-prem deployment keeps that material data inside your network.
Frequently asked questions
What is the transaction code to create a production version in SAP?
Use C223 for single maintenance. In S/4HANA you can also use the Fiori app Manage Production Versions. Mass processing is available from the production version mass processing function (C202 in many releases). Authorization objects for the plant and for production planning master data apply.
Is a production version mandatory in S/4HANA?
In practice yes for in-house produced materials, because planned order conversion, production order creation and costing look for one. SAP's direction is to make it the standard way to select BOM and routing. Treat it as required and test your own configuration.
Which table stores production versions?
Table MKAL holds production versions, keyed by material, plant and version. It stores the validity dates, lot size range, BOM and routing references and the lock status. Use SE16N for display only and never change it directly.
Why does the check in C223 fail?
Typical causes are a BOM or routing that does not exist or is not valid on the version's dates, an unreleased routing status, a plant mismatch between BOM and routing, or a lot size range outside the routing's lot size limits. The check message names the object to fix.
Related
SAP CO01 Error: No Production Version Found for Material
SAP cannot pick a production version for the order quantity and date, so it cannot determine the BOM and routing. Fix it in C223 or on the MRP 4 view of the material: create a version for the plant, make its validity dates and lot size range cover the order, link a valid BOM alternative and routing, and remove the lock indicator.
How-toSAP MD01N (MRP Live) vs MD01: How to Run MRP Correctly
MD01N is MRP Live: the same planning logic as classic MD01, but executed inside the SAP HANA database instead of looping through materials in ABAP. Run it from MD01N by entering the plant, choosing a processing key (net change or regeneration), setting the purchase requisition and scheduling parameters, and executing in the background for large scopes.
How-toSAP Production Order Technically Complete (TECO): Set and Reverse in CO02
TECO (technically complete) stops further goods movements and confirmations on a production order and removes open reservations and capacity requirements. Set it in CO02 under Functions > Restrict Processing > Technically Complete, and reverse it with Reset Technically Complete when the order still needs postings. CLSD, the business close, is a separate step that comes after settlement.
Error fixSAP M7 021: Deficit of SL Stock Quantity
M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.
Error fixSAP IDoc Status 51: Application Document Not Posted
Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.
Error fixSAP Short Dump TIME_OUT: Maximum Runtime Exceeded
A TIME_OUT runtime error means a dialog (or RFC) work process ran longer than the maximum allowed runtime, controlled by profile parameter rdisp/max_wprun_time (600 seconds by default). The fix is almost always to move the long-running work to background processing or tune the underlying program, not to raise the timeout.
AI for ERPAI Agents for SAP Production Planning, MRP, and Exception Triage
AI agents that triage SAP MD04 exceptions, explain predictive MRP shortages, and draft planned-order actions, grounded on your own SAP data, deployed on-prem.
AI for ERPAI for SAP S/4HANA, Running On-Prem or in Your Private Cloud
Run AI on SAP S/4HANA without sending ERP data to a public API. On-prem and private-cloud architecture, CDS views, OData, and honest deployment trade-offs.
Stuck on SAP S/4HANA?
Talk to engineers who work inside SAP S/4HANA every week, and who build private AI that answers these questions from your own ERP data.
Keep exploring
Free tools
- SAP BAPI Production Order Create and Release ABAP TemplateFill in material, plant, order type and dates and get an ABAP skeleton that creates and releases a production order with a commit.
- SAP Planned Order to Production Order Conversion ChecklistA step by step checklist to verify materials, BOM, routing, capacity and release before converting planned orders to production orders in SAP.
ERP fixes and how-tos
- SAP CO01 Error: No Production Version Found for MaterialFix the SAP missing or invalid production version error in CO01, MD04 or planned order conversion: check C223, validity dates, lot size range and locks.
- How to create a routing, work center and production supervisor in SAP PPSet up SAP PP master data: create a work center with CR01, a routing with CA01, and a production supervisor with OPJ2, plus the production version link.
- How to Create a Material in SAP S/4HANA: MM01, Fiori and Manufacturing ViewsCreate a material in SAP S/4HANA with MM01 or the Manage Product Master Fiori app, and see which views a manufactured part needs (MRP, costing).
Integrations
- How to add an AI chatbot to SAP S/4HANAAdd an AI chatbot to SAP S/4HANA for users or customers, grounded in OData data and documents, embedded in Fiori or a portal, and runnable fully on-prem.
- How to add a mobile app to SAP S/4HANABuild a mobile app for SAP S/4HANA: barcode scanning, goods movements, labor reporting and approvals over OData APIs, with offline sync and Fiori options compared.