MES vs ERP in Pharma: Key Differences, GxP Overlap and How They Work Together

Software vendors are a persuasive lot, and the ones who sell to pharma plants are the most persuasive of them all. Strip the sales pitch away, and what is left is simple: the ERP plans and accounts for production across the business, whereas the MES controls and records how each batch is made on the shop floor.

That is the short answer to the MES vs ERP question. It is seldom the one that a plant hears, though, as the ERP partner says that the ERP can run the whole plant and the MES vendor says that the batch belongs on the shop floor. Meanwhile, the batch goes on being made on paper, and its deviations go on being logged in a third system altogether.

Let’s understand more about the difference between MES and ERP, where the two overlap under GxP and how they work together.

What is ERP and what is MES?

ERP (enterprise resource planning)

ERP is short for enterprise resource planning, and in a pharma company, it is the software which the accounts, purchase, stores and planning teams open first thing in the morning. No payment is made and no kilo is received without an entry in it, so the ERP is usually the first system that a growing pharma company buys, with the MES following some years later. It is an unglamorous piece of software, albeit an indispensable one. A typical pharma ERP takes care of the following.

  • Every batch is costed in it.
  • Purchase orders go out from it, and only to suppliers QA has approved.

  • Each lot’s status (quarantine, released or rejected) is tracked in it, warehouse by warehouse.
  • The production plan gets built in it, month by month and then week by week, until the process order is released to the floor.

If the ERP is yet to be picked, then our blog on choosing ERP software for the pharmaceutical industry lists the things which have to be checked before the contract is signed.

MES (manufacturing execution system)

So, what is MES? When plant heads ask us about the MES full form, we tell them that it is manufacturing execution system, and that it is the software which runs on the shop floor and not in the office. A process order is released by the ERP, and the MES takes it from there. The master batch record that QA has approved is opened on a screen next to the operator, and each step of it has to be done and signed before the next one is opened. It is a strict regime, and rightly so. On a typical pharma shop floor, the MES is used for the following.

  • Operators carry out and e-sign every step of the batch.
  • Each weighing is checked against its target weight and tolerance.
  • In case of a critical step, the step is verified by a second person before the batch is allowed to move on.
  • The status of every room, line and equipment (cleaned, line cleared or in use) is put on record.

Once the batch is over, the executed batch record which is generated by the MES is reviewed by QA, and only then is the batch released.

MES vs ERP: key differences at a glance

ERP

MES

Plans the batch and does the accounting

Runs the batch on the shop floor

Used by planning, accounts, purchase and stores

Used by operators, supervisors and production QA

Months, weeks and days

Shifts, hours and minutes

Orders, receipts and stock

Weights, steps and signatures

Level 4 of ISA-95

Level 3 of ISA-95

 The ERP keeps transactions whereas the MES keeps events, and that is the main difference between the two. By a transaction we mean an entry like a goods receipt or a stock transfer, and by an event we mean a weighing or a step which is done at a particular time by a particular person. When clients ask us about ERP vs MES, we tell them that the signatures are also different, since in the ERP the decision of QA is put on record as one status change from quarantine to released, whereas in the MES each critical step is signed by the operator and checked by a second person, as per 21 CFR 211.188.

Where MES and ERP overlap in a pharma plant

The overlap between the two systems is the data which is used by both of them, and most of the doubts about MES in pharma come from this overlap. Four pieces of data are usually shared between the two.

 

  • The lot number is given by the ERP at the GRN stage and is used by the MES at dispensing.

     

  • The material status is kept in the ERP and is read by the MES.

     

  • The weekly plan is made in the ERP, and the order of the batches is decided in the MES.

     

  • The executed batch record is kept by the MES, or by a GxP platform which has electronic batch records built in.

 

Most of the industry would rather not build the electronic batch record inside the ERP, and we are of the same view, as every ERP upgrade after that becomes a GMP change, which is seldom a quick affair.

How MES and ERP integration works

What flows between the two systems

MES and ERP integration binds the two together, and in most plants the link is built as per ISA-95. Under ISA-95, the ERP is a Level 4 system and the MES is a Level 3 system. In a typical MES ERP integration, the ERP sends this data or information down to the MES.

  • The released process order goes down with its batch size and due date.
  • The bill of materials and master data for each product follow it.
  • Each material’s lot status is passed on before dispensing starts.

Upon completion, MES records the true consumption, the yield and its status of completion. Only after all these stringent checks, does the ERP reflect the correct stock. They both use the same units of measure and rounding. Not using the same units would result in a shortage during the end of month.

Protecting data integrity at the interface

Inspectors look at the interface as a part of the computerised system, which means that it is checked like any other GMP function in a pharma plant. Out of sight is seldom out of mind for an auditor.

  • Built-in checks confirm that each message is entered and processed correctly and securely, as EU GMP Annex 11 expects.
  • Failed messages land in an error queue that a named person reviews.
  •  Any change to an already-signed value shows up in the audit trail.

Our blog on data integrity in pharma goes into the ALCOA principles in more detail.

Where QMS, LIMS and document control fit

Most pharma plants operate five or six systems and the ERP system and the MES system are two of those systems yet the ERP system and the MES system attract most of the attention. 

 

Consider a balance at the dispensing booth that shows 2.1 percent more than the allowed or the permissible limit, for magnesium stearate. The step is stopped by the MES and a deviation is raised in the QMS, and the lot is kept on hold in the ERP till QA closes the deviation, be it a day later or a fortnight. Our GxP platform shows how quality, documents and training come together.

Part 11, Annex 11 and validation: what changes for each system

Which records are in scope

21 CFR Part 11 is the regulation which is laid down by the FDA for electronic records and electronic signatures. It goes by the record, and the name of the system is neither here nor there. In a typical MES vs ERP set-up, the following records come under its scope.

  • The executed batch record in the MES, which 21 CFR 211.188 requires.

     

  • The material status that QA sets in the ERP.

     

  • The distribution records held in the ERP.


In the EU computerised systems are covered by EU GMP Annex 11. This applies to any system used in a GMP activity. The version from 2011 is still the one that’s in force. A revised draft was released for consultation in July 2025. We go into detail about audit trails and e-signatures, in our blog on 21 CFR Part 11 requirements.

How much validation each system needs

Both systems are validated using GAMP 5 Second Edition (2022). How much testing a function gets depends on its risk, to patient safety, product quality and data integrity. The FDAs Computer Software Assurance guidance, finalised in September 2025 was written for medical device production and quality system software. Pharma teams borrow its risk-based thinking too. In practice the testing usually splits like this.

  • MES weighing and dispensing is tested with scripts and documented evidence.

     

  • The general ledger in the ERP may need little more than a supplier assessment and a few spot checks.

     

  • Each system’s GAMP category depends on its configuration and intended use, and it is recorded in the validation master plan.

Do you need an MES, an ERP or both?

Company stage

What generally works

Early-stage biotech/virtual pharma

ERP and QMS first, as execution is done by the CDMO

Small CDMO/simple-process plant

ERP with lot control and a GxP platform with eBR, MES later

Multi-product commercial plant with heavy equipment integration

ERP, MES and QMS, integrated with each other

 Ask these questions, even before you process an advance to your vendors:

 

  • How many batches do you run each month, and how many products share a line?
  • How many readings are operators still copying by hand from balances or HMIs?
  • Which deviations keep recurring, and are they execution errors?
  • What did your last inspection say about batch records or data integrity?

 

MES vs ERP is a debate thats never to be had. Most efficient or prudent sites which own their production lines incorporate them both.

How KOSA AI fits into your systems

KOSA AI is a GxP ERP platform which puts quality management, document control, training, electronic batch records and electronic logbooks in one place, and it is designed for 21 CFR Part 11, EU GMP Annex 11 and GAMP 5. It runs next to your existing ERP and MES and does not replace a dedicated MES. To see how quality, documents, training and batch records work together next to your ERP and MES, book a demo with our team.

 

Book a demo

Frequently asked questions about MES and ERP

1. What is the main difference between MES and ERP?

The ERP is used for the business side of the plant, whereas the MES is used for the shop floor.

2. Can an ERP replace an MES in pharmaceutical manufacturing?

Yes, for a simple process. With complex, equipment-heavy production, an MES is usually still needed.

3. Do MES and ERP both need to comply with 21 CFR Part 11?

Yes, if they hold GMP records. Part 11 applies to the record, whatever the system is called.

4. Where does a QMS fit alongside MES and ERP?

It sits between the two, more or less. A deviation which is raised in the MES is logged in the QMS, and the decision of QA on it, like a hold on the lot, is sent back to the ERP.

5. What is the difference between ERP, MRP and MES?

In ERP vs MRP vs MES, the MRP is used to plan materials, the ERP is used to run the business and the MES is used to run the shop floor.

6. How are MES and ERP integrated?

As per ISA-95, in most cases. In MES and ERP integration, process orders go down from the ERP and batch results come back up from the MES.

Thank You!

Your 1-Month Free Trial request has been received successfully.

Our team will contact you with the next steps.

Get 1 Month FREE
on KOSA DMS & LMS

Simplify document control and GxP training with KOSA’s compliance-ready platform

Request Your 1-Month Free Trial

Share your details and our team will contact you to set up your trial.

Your information will be used to process your request.