1.7 ERP-MES Contract: Orders, confirmations, consumption, scrap, WIP
The interface between ERP (Enterprise Resource Planning) and MES (Manufacturing Execution System) is the financial and operational equator of the factory. If this data contract fails, the company either ships products it cannot bill or builds products it does not need. Define this integration with strict transactional logic, not vague synchronization promises.
Production Orders (ERP → MES)
The ERP dictates what to build and when. The MES executes how. Do not allow the MES to create production orders autonomously; it must remain a slave to the ERP planning engine.
Download Triggers
- Trigger: Order Status change to "Released" in ERP.
- Frequency: Real-time (Webhook) or near real-time (Polling ≤ 15 mins).
Validation Logic
Upon receiving an order, the MES must perform a "Sanity Check" before accepting it.
- If SKU does not exist in MES Master Data → Reject Order + Alert Planning.
- If Required BOM components are obsolete/blocked → Hold Order.
- If Order Qty > 0 AND Due Date ≥ Today → Accept & Schedule.
Pro-Tip: Never update an active order's quantity in the ERP while it is running in the MES. Instead, close the original order and issue a new "Child Order" for the delta. This preserves traceability.
Confirmations & WIP Updates (MES → ERP)
The MES must report progress back to the ERP to keep financial accounts accurate. Balance the granularity of reporting against system load.
Reporting Granularity
- Milestone Reporting: Report only at key financial gateways (e.g., SMT Complete, Box Build Complete, Shipping).
- Step-by-Step Reporting: Report every barcode scan.
- Decision: Use Milestone Reporting. Step-by-step floods the ERP with noise and creates locking issues during high-volume production.
Confirmation Logic
- If Operation = "Critical Gateway" (e.g., End of Line) → Trigger ERP Confirmation.
- If ERP API is down → Queue Message locally (Store & Forward). Never stop the line because SAP is patching.
Material Consumption (Backflush vs. Discrete)
Inventory accuracy depends on when and how you deduct components.
Strategy A: Backflushing (Standard)
Deduct components automatically based on the BOM when the parent assembly is confirmed.
- Use Case: High volume, low cost components (Resistors, Screws).
- Risk: Implicitly assumes 100% yield. If you scrap a unit but don't record it, inventory drifts.
Strategy B: Discrete Issue (Real-Time)
Deduct components exactly when scanned/loaded onto the machine.
- Use Case: High value, serialized components (CPU, PCBA, Displays).
- Control:
- If Material is "Class A" (High Value) → Require Discrete Issue.
- If Material is "Bulk" → Set to Backflush.
Scrap & Non-Conformance
Scrap is money on fire. The digital system must record the burn immediately to trigger replacement orders and financial write-offs.
Scrap Workflows
- Material Scrap: Component damaged during assembly.
- Action: Operator selects reason code on HMI → MES deducts component from WIP → MES sends "Goods Issue to Scrap" movement to ERP.
- Assembly Scrap: Entire unit fails and cannot be repaired.
- Action: Supervisor authorizes scrap → MES consumes all child parts → MES closes specific serial number as "Scrapped" → ERP reduces Production Order open quantity.
Pro-Tip: Map every MES defect code to a specific GL (General Ledger) account in the ERP. "Vendor Fault" goes to a different account than "Operator Error."
Final Checklist
Category | Metric / Control | Threshold / Rule |
Orders | Master | ERP is the only source of Production Orders |
Sync | Latency | ERP → MES Order sync ≤ 10 mins |
Consumption | High Value Parts | Deduct in Real-Time (Discrete Issue) |
Consumption | Bulk Parts | Backflush at Key Milestones |
Financial | WIP Accuracy | MES WIP = ERP WIP (Daily Reconciliation) |
Failure | API Downtime | Store & Forward enabled (No Line Stop) |
Scrap | Authorization | Supervisor password required for Unit Scrap |