Mass Production Order Release with Component Availability Check Program
Short answer: A custom background program that automatically releases production orders whose scheduled start is approaching, when the share of components covered by stock exceeds a plant-specific threshold. Orders below the threshold are not released and are reported to planning with the number of missing components.
- Estimated effort
- M · 4–6 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
COHV releases the selected orders in mass and can run an availability check depending on the order type settings, but the check follows a general rule such as 'do not release if missing' or 'release anyway'. A plant-specific threshold (for example, release when 90 percent of the components are covered) or a critical component exception cannot be defined. Planners filter the list by hand every morning; as a result either orders with shortages reach the shop floor or ready orders stay on hold.
Who uses it? Production planners, MRP controllers and shop floor supervisors who manage order release before the shift.
Closest standard alternatives
- COHV Mass Processing of Production Orders. Releases orders in mass; there is no plant-specific coverage threshold or critical component exception.
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| AUFKOrder Master Data | Order type, plant and object number | Read | ECC + S/4 |
| AFKOOrder Header Data for PP Orders | Scheduled start and MRP controller | Read | ECC + S/4 |
| RESBReservation/Dependent Requirements | Component requirements of the order | Read | ECC + S/4 |
| MARDStorage Location Data for Material | Unrestricted-use stock of the components | Read | ECC + S/4 |
| JESTIndividual Object Status | System status; release (I0002) is set through the BAPI | Write | ECC + S/4 |
S/4HANA notes
- MARD → MATDOC: In S/4HANA stock quantities are no longer stored physically; reading MARD returns values calculated on the fly from MATDOC through a compatibility view. Reads still work, but test performance on very large selections.
BAPIs and functions used
- BAPI_PRODORD_RELEASERelease Production Orders. Releases the orders that pass the threshold
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves the status change permanently
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | AUFK-WERKS | Yes | 1000 |
| S_AUART | Order type | Range / multiple | AUFK-AUART | No | PP01 |
| S_DISPO | MRP controller | Range / multiple | AFKO-DISPO | No | 001 |
| P_HORIZ | Release horizon (days) | Single value | — | Yes | 3 |
| P_THRESH | Component coverage threshold (%) | Single value | — | Yes | 90 |
| S_CRIT | Critical components (never release when short) | Range / multiple | RESB-MATNR | No | RM-3220 |
| P_TEST | Test mode (candidate list only) | Checkbox | — | No | X |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Production order | AFKO-AUFNR |
| 2 | Material | AFKO-PLNBEZ |
| 3 | Scheduled start | AFKO-GSTRP |
| 4 | MRP controller | AFKO-DISPO |
| 5 | Components | Calculated Number of evaluated RESB items |
| 6 | Short components | Calculated Number of items not covered by the allocated stock |
| 7 | Coverage % | Calculated (Components − short components) ÷ components × 100 |
| 8 | Result | Calculated Released, candidate (test), below threshold or critical component short |
| 9 | Message | Calculated BAPI return message or reason for skipping |
Sample result list
| Production order | Material | Scheduled start | MRP controller | Components | Short components | Coverage % | Result | Message |
|---|---|---|---|---|---|---|---|---|
| 1000452 | FG-5003 | 11/18/2026 | 001 | 6 | 0 | 100 | Released | Order released |
| 1000467 | FG-6100 | 11/19/2026 | 001 | 10 | 1 | 90 | Released | Threshold met (90%) |
| 1000471 | FG-6100 | 11/19/2026 | 001 | 10 | 1 | 90 | Critical component short | RM-3220 not in stock |
| 1000478 | FG-7200 | 11/20/2026 | 002 | 4 | 2 | 50 | Below threshold | Coverage 50% < 90% |
How does the program work?
- Orders whose scheduled start (GSTRP) falls within the release horizon from today are read from AUFK and AFKO for the plant, order type and MRP controller on the selection screen; only orders with just the created status (I0001) active in JEST and no deletion flag (I0076) become candidates.
- The component requirements of the candidates are read from RESB; bulk (SCHGT) and phantom (DUMPS) items are left out.
- Unrestricted stock is read from MARD-LABST and requirements are sorted by start date and allocated in turn, so the order that starts earlier gets the stock first.
- Coverage = components covered by stock ÷ all components × 100. When coverage is below the threshold, or a component from the critical component list is missing, the order is skipped and the allocated stock is left for the next order.
- Orders above the threshold are released in packages with BAPI_PRODORD_RELEASE and BAPI_TRANSACTION_COMMIT is called; return messages are logged per order.
- In test mode no order is released; only the candidate list and the decisions are shown. Optionally the result list is emailed to the MRP controllers.
Performance notes
Limit the candidates with the start date horizon and read RESB and MARD once. Releasing in packages of 50–100 orders reduces lock problems. The program is usually scheduled every night or one hour before the shift starts.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Runs as a background job Scheduled as a background job every night or before the shift.
- Send the result by email The list of released and held orders is sent to each MRP controller.
Authorization objects
- C_AFKO_AWKAuthorization to release orders by plant and order type
- C_AFKO_DISProduction order authorization by MRP controller
Frequently asked questions
Does it replace the standard availability check?
No. The program applies its own threshold before release; the standard availability check defined for the order type still runs during the BAPI call. The two checks complement each other.
Can the threshold differ by plant?
Yes. The threshold can be read from the selection screen or from a small settings table by plant / order type. A separate background variant can also be defined for each plant.
Are open purchase orders taken into account?
The base version only counts unrestricted stock on hand. If required, open purchase order schedule lines (EKET) due before the start date can be added as a coverage source.
Related reports
Production Order Missing Parts with Covering Purchase Order Report
A custom ALV report that shows the missing components of production orders, the shortage quantity and the open purchase order that will cover it, with …
Planned Order Conversion Readiness and Component Availability Report
A custom ALV report that ranks planned orders whose opening date has arrived by how much of their component demand today's stock covers. For each …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.