PP Program Custom development Background program

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.

TableRoleAccessSystem
AUFKOrder Master DataOrder type, plant and object numberReadECC + S/4
AFKOOrder Header Data for PP OrdersScheduled start and MRP controllerReadECC + S/4
RESBReservation/Dependent RequirementsComponent requirements of the orderReadECC + S/4
MARDStorage Location Data for MaterialUnrestricted-use stock of the componentsReadECC + S/4
JESTIndividual Object StatusSystem status; release (I0002) is set through the BAPIWriteECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
S_WERKSPlantRange / multipleAUFK-WERKSYes1000
S_AUARTOrder typeRange / multipleAUFK-AUARTNoPP01
S_DISPOMRP controllerRange / multipleAFKO-DISPONo001
P_HORIZRelease horizon (days)Single value—Yes3
P_THRESHComponent coverage threshold (%)Single value—Yes90
S_CRITCritical components (never release when short)Range / multipleRESB-MATNRNoRM-3220
P_TESTTest mode (candidate list only)Checkbox—NoX

Result list columns

#ColumnSource
1Production orderAFKO-AUFNR
2MaterialAFKO-PLNBEZ
3Scheduled startAFKO-GSTRP
4MRP controllerAFKO-DISPO
5ComponentsCalculated Number of evaluated RESB items
6Short componentsCalculated Number of items not covered by the allocated stock
7Coverage %Calculated (Components − short components) ÷ components × 100
8ResultCalculated Released, candidate (test), below threshold or critical component short
9MessageCalculated BAPI return message or reason for skipping

Sample result list

Production orderMaterialScheduled startMRP controllerComponentsShort componentsCoverage %ResultMessage
1000452FG-500311/18/202600160100ReleasedOrder released
1000467FG-610011/19/202600110190ReleasedThreshold met (90%)
1000471FG-610011/19/202600110190Critical component shortRM-3220 not in stock
1000478FG-720011/20/20260024250Below thresholdCoverage 50% < 90%
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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.
  2. The component requirements of the candidates are read from RESB; bulk (SCHGT) and phantom (DUMPS) items are left out.
  3. 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.
  4. 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.
  5. Orders above the threshold are released in packages with BAPI_PRODORD_RELEASE and BAPI_TRANSACTION_COMMIT is called; return messages are logged per order.
  6. 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

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.

Related report: Mass Production Order Release with Component Availability Check Program