Free SAP ABAP module: work center queue, confirmations, downtime and OEE
ModernMES for SAP is a small, free ABAP package that runs inside SAP. It lists a work center's open operations, posts the same confirmation as CO11N in one click, records machine downtime with a reason and reports OEE per work center and day. The source is open on GitHub under the MIT license, and it installs with abapGit.
Last updated: 28 October 2026
What is in the package
| Program | What it does |
|---|---|
| ZMODMES_QUEUE | Lists the open operations of one work center. These are operations not yet fully confirmed, on production orders that are released and not technically complete, earliest start first. The icon on a row posts yield, scrap and final confirmation. |
| ZMODMES_DOWNTIME | Starts and ends a downtime for a work center with a reason, optionally with the order it held up. It also lists recent downtimes. |
| ZMODMES_OEE | Availability, performance, quality and OEE per work center and day, with the minutes and quantities behind each figure on the same row. |
The screens are standard ALV lists in English. Run the programs with SA38 or SE38, or give them transaction codes in SE93.
Confirmations post the same way as CO11N
Confirmations go through SAP's standard BAPI_PRODORDCONF_CREATE_TT. SAP first proposes activities and goods movements from the order, so backflushing and automatic goods receipt follow your routing, control keys and BOM exactly as they do in CO11N.
If SAP refuses a confirmation, nothing is posted and SAP's own messages are shown in a list. The BAPI runs the same authorization checks as CO11N.
How OEE is calculated
- Availability is planned minutes minus downtime minutes, divided by planned minutes. Planned minutes per day is a selection parameter with a default of 480. Downtime comes from ZMODMES_DOWNTIME, and a downtime still open counts until now.
- Performance is standard minutes divided by run minutes. Standard minutes are the confirmed quantity (yield plus scrap) times the operation's standard value. You pick which standard value (1 to 6) holds machine time, and the default is 2. Units S, MIN and H are converted. Times in other units are counted in a separate column.
- Quality is yield divided by yield plus scrap.
- OEE is the product of the three.
Quantities come from production order confirmations in table AFRU, by posting date. Reversed confirmations are left out. To try the formula with your own numbers, use the OEE calculator.
Requirements and installation
- SAP NetWeaver or ABAP Platform 7.50 or newer with PP. That is SAP ECC 6.0 EhP8, or SAP S/4HANA on-premise or private cloud.
- abapGit to install it.
- The package reads standard tables (AUFK, AFKO, AFVC, AFVV, AFRU, CRHD, JEST, MAKT) directly, so it does not run in SAP S/4HANA Cloud, public edition, or in the BTP ABAP environment.
- In abapGit choose New Online and enter https://github.com/modernmes/modernmes-sap and a package. A local package such as $ZMODMES lets you try it without transports.
- Pull to create the table, data element, classes and programs.
- If SAP has no internet access, download the repository as a ZIP and import it with abapGit's New Offline.
The package is in beta. The code passes abaplint and the unit tests of the OEE arithmetic, but it has not yet been run on a real SAP system. Try it in a sandbox or test client first, and open an issue on GitHub with what you find.
Good to know
- Writing downtimes is not authorization-checked in the code. Control who may run ZMODMES_DOWNTIME with an authorization group on the program or a transaction code with its own check.
- A work center has at most one open downtime. End it before starting the next one.
- The package does not collect data from machines. SAP users enter downtimes and confirmations.
How it differs from ModernMES
This package covers the basics inside SAP. ModernMES is the full manufacturing execution system that runs next to SAP, with operator terminals at the machine, badge sign-in and barcoded route cards, a live shop floor view, quality and maintenance records, and reports. It connects to S/4HANA through SAP's standard OData APIs, see SAP S/4HANA integration. It runs in the cloud or on your own server, and you can try it free for 14 days.
Frequently asked questions
Is it really free?
Yes. The package is MIT licensed. You can install, use, change and distribute it in your own systems at no cost, and no ModernMES account is needed.
Does it work with SAP Business One?
No. Business One does not run ABAP. For Business One, ModernMES has a separate SAP Business One connection.
Can we change the code?
Yes. Change it to fit your needs. If your change would help others, open a pull request on GitHub.
Does it open a connection out of SAP?
No. The package runs entirely inside SAP and sends no data anywhere.
Related pages
- SAP S/4HANA MES Integration: Production and ScrapAn MES next to SAP S/4HANA, with no add-on installed in SAP. Finished work posts as a 521 goods receipt, scrap as 551, products and customers come from SAP.
- OEE Calculator: Calculate OEE With a Worked ExampleFree OEE calculator. Enter planned time, downtime, ideal cycle time and counts and get OEE as you type, with a worked example, the formula and common mistakes.
- Machine Downtime Tracking: Downtime Reasons and AnalysisHow to track machine downtime: a short list of downtime reasons, paper vs Excel vs software, Pareto analysis, MTTR and MTBF, and common mistakes.
- What Is MES? Manufacturing Execution System Software ExplainedWhat a manufacturing execution system (MES) does in production, how it differs from ERP and MRP, the MES software options and what to look for when choosing one.