(713) 479-7300 [email protected]

SAP Process Messages with Special Posting Logic

Automate - Simplify - Mobilize


A couple of years ago, Junot Systems was contacted by an AVEVA Systems Integrator based in South America. They were in the process of trying to sell AVEVA’s Manufacturing Execution System (MES) to a large multi-national manufacturer of agricultural fertilizers who had a manufacturing plant in Guatemala. The Systems Integrator was looking for a zero code SAP integration solution that provided a simple, flexible and reliable way to connect AVEVA’s MES to SAP.

The customer subsequently purchased AVEVA’s MES along with NLINK® to connect it to their SAP ECC system. So far so good. But during the implementation we ran into an interesting problem that required a simple but elegant solution.

The Problem

For this particular project, the NLINK SAP Connector received IDocs from the SAP system for Material Master, Batch Master, and Warehouse Inventory downloads. It also proactively polled the SAP ECC system for new and change Process Orders, using BAPIs and the NLINK SAP Query Connector, and reports production, consumption and status changes from the MES back to SAP using SAP’s RFC-based PI-PCS Process Message interface.

SAP Integration

The problem occurred when posting Process Messages for partial consumption quantities to multiple operations on the same order. For example, we observed that when the NLINK SAP Connector posted PI_CONS Process Messages for operations 0010, 0020 and 0030, these messages sat in SAP’s inbound queue for a brief period of time, and then SAP processed them simultaneously. This sounds good, but in this particular case the message for operation 0010 needed to process completely before the others began because it ended up re-calculating hours for the remaining operations. By posting all the message simultaneously, these re-calculations occurred out of order.

The Solution

To fix this, we configured a simple two-part posting solution. For these operations, NLINK first reads the calculated operation hours for a partial quantity via BAPI. Then it posts a Time Ticket confirmation, also via BAPI, and waits a configurable amount of time, currently 30 seconds, before posting the remaining messages. This slight delay allows the SAP system enough time to finish the necessary re-calculations. Then, the NLINK SAP Connector posts the PI_SRCON or PI_PHCON process message for the same operation, which ends up with the proper hour calculations in the customer’s SAP system.


Connecting a Manufacturing Execution System to SAP is a complex problem that requires a sophisticated SAP integration tool purpose built for the unique demands for the world of Manufacturing plant floor to SAP integration. The NLINK SAP Connector is a zero code, field proven Industrial Middleware solution that simplifies and streamlines the process of connecting commercial MESs to SAP.