How Is MES–ERP Integration Done?

How Is MES–ERP Integration Done?

MES-ERP integration is the automatic transfer of planning data such as work orders, products, BOMs and routings from the ERP to the MES, and the automatic reporting back to the ERP of production, scrap, consumption and work order closure realised in the MES. The goal is to eliminate double data entry, ensure that inventory and cost information matches reality on the shop floor, and set up the Level 3–4 exchange defined by ISA-95 in a standard way.

In brief

  • ERP → MES: work orders, product/material, BOM, routing, customer and order information.
  • MES → ERP: production confirmation (good/scrap quantity), consumption, work order status, labour time.
  • Methods: web services (REST/OData/SOAP), RFC/BAPI, IDoc, staging tables, files.
  • Critical success factor: clarifying the owner of master data and code mapping at the very start.

Which Data Flows in Which Direction?

DirectionData objectFrequency
ERP → MESMaterial / product master dataOn change or daily
ERP → MESBOM and routing (operation, work centre, standard time)On change
ERP → MESWork order (product, quantity, due date, operations)Within minutes
MES → ERPOperation confirmation (good quantity, scrap quantity, time)At the end of the operation or periodically
MES → ERPMaterial consumption (lot-based)Together with the confirmation
MES → ERPWork order closure / statusEvent-based

Integration Methods

  • Web services (REST/OData/SOAP): Available in most modern ERPs; suitable for two-way, event-based operation.
  • RFC/BAPI, IDoc (SAP): Established methods in the SAP world; BAPIs are common for confirmations and IDocs for bulk transfers.
  • Staging table: A database table both systems can access; simple and often used with local ERPs, but care is needed with the pitfall of the table being emptied during a reload.
  • File transfer: Periodic exchange via CSV/XML; the simplest but most delayed method.

Project Steps

  1. Scope and object list: Which data, in which direction, how often. This list is the contract document.
  2. Master data ownership: Product, BOM and routing in the ERP; machines, downtime codes and control plans in the MES. If there is overlap, it does not get resolved later.
  3. Code mapping: ERP work centre code ↔ MES machine; ERP scrap reason ↔ MES scrap code; ERP unit ↔ MES unit. A code that does not match silently produces a zero quantity or an empty record.
  4. Interface design: Method, field list, behaviour on error (retry, queue, alert).
  5. Test environment: An end-to-end scenario with the ERP test client: open a work order → produce in the MES → the confirmation lands in the ERP → inventory is verified.
  6. Parallel running: For a while it runs alongside the old method (manual entry) and differences are analysed.
  7. Go-live and monitoring: The transfer queue, error log and number of pending records are monitored regularly.

Common Pitfalls

  • Mistaking deletion for completion: While the ERP source is being reloaded, a record temporarily disappears; an integration that interprets this as “work order closed” closes jobs that are still running. Deletion should always be handled as “cancelled” and must not cut off active production.
  • Unit mismatch: If the ERP works in kilograms and the MES in metres, the conversion factor must be defined in master data.
  • Unmapped scrap reasons: If the MES has 40 scrap reasons and the ERP has 5 scrap codes, a mapping table is essential.
  • Silent errors: If nobody is alerted when a transfer fails, it is noticed days later. A threshold alert should be defined for the number of pending records.
  • Forgetting the scheduled task: If periodic transfer depends on an operating system task, it may stop when the server restarts; a heartbeat should be monitored.

Frequently Asked Questions

Which technical method is used for MES-ERP integration?
It depends on the interface the ERP offers: RFC/BAPI, IDoc or OData for SAP; REST/OData for IFS; mostly web services or an intermediate database table for local ERPs. The capability and support available on the ERP side are decisive in choosing the method.
Should integration be real-time?
For work order transfer and production confirmation, a delay of a few minutes is usually sufficient. Real time matters within the MES itself; the ERP side does not need minute-level precision for daily inventory and cost. What is critical is reliable, repeatable transfer.
When a record is deleted in the ERP, should it also be deleted in the MES?
No, direct deletion is dangerous. A work order not visible in the ERP may be a temporary transfer error or a reload moment. The right approach is to turn deletion into a “cancelled” status and notify the user without interrupting ongoing production.

ERP Integration in EFFIX MES

EFFIX MES offers ready-made adapters for SAP, IFS and Netsis and a generic adapter structure for other ERPs; work orders, products, BOMs and routings are taken from the ERP, and production and scrap confirmations are sent automatically from the MES to the ERP. The same adapter approach is also used for QMS and time-and-attendance connections. Thanks to unit conversion and code equivalence definitions, unit and code differences between the ERP and the shop floor are resolved in the integration layer. For details, see the EFFIX MES page or request a demo.