Achieving Manufacturing Efficiency by Connecting SAP IoT Data to an MQTT Broker
Written by Ravi Subramanyan
Published: March 13, 2023
For a manufacturing company, an Enterprise Resource Planning (ERP) system typically handles back-end information like customer purchase history, billing and shipping details, and details regarding the manufacturing operations, financial, human resource, and supply chain management. This data provides context for the factory machine and process data coming through Industrial Internet of Things (IIoT) systems on the factory floor.
Combining data from ERP, Manufacturing Execution Systems (MES) with factory machine data is essential to support advanced data analytics, like supply demand forecasting and predictive maintenance. SAP is the world’s leading ERP software vendor with a 24% market share according to Gartner. MQTT is fast becoming the de facto protocol for IIoT message communication to the enterprise or to the cloud.
This blog will explore the process of integrating data from an SAP IoT system into an MQTT broker to support key IIoT use cases.
Building the Right Foundation for a Data-Driven Enterprise
MQTT is a standard binary publish-subscribe-based messaging protocol designed for fast and reliable data transport between devices, especially under very constrained conditions. Constrained conditions could be unreliable network connectivity, limited bandwidth, limited battery power, or similar. MQTT is built on top of TCP/IP and is ideal for IIoT use cases. It is used in a variety of applications, including manufacturing, to connect Operations Technology(OT) data to Information Technology(IT) data.
The following diagram represents an MQTT system’s components, including clients that could be publishers or subscribers and a central MQTT broker.
To enable data-driven manufacturing, components on the plant floor need access to real-time data from an ERP system such as SAP. For example, a system might need to find out, in real-time, what is running on any line in any factory to help decide whether to manufacture a new sales order or not. Typically, to get access to such data, multiple direct poll/response connections would have to be created from different systems to the ERP to query out this dataset. This creates a spaghetti architecture that is complex and unscalable while making real-time data sharing across the enterprise difficult.
In an ideal situation, all the relevant ERP information could be queried and published as tags to a central repository containing real-time information. This depository would be an MQTT broker, equally accessible by every interested network participant providing a unified source of truth.
The way to connect SAP IoT data to an MQTT broker is by implementing a native MQTT client within the SAP environment as part of its programming language, ABAP. The SAP help portal discusses in detail how to create an MQTT client in the SAP environment:
The ABAP application server of SAP provides an API to implement MQTT clients according to version 3.1.1 of the MQTT specification, an ISO standard (ISO/IEC 20922:2016). The MQTT implementation in ABAP is based on ABAP Push Channels (APC) technology. MQTT clients support the APC connection types WebSocket and TCP Socket.
Once the SAP MQTT client is created, it can publish the SAP data to the broker in the MQTT format on a specific topic. Another MQTT client application like a Process Historian or MES system can subscribe to that topic and receive the data through the broker when it is available. If the SAP data that the broker receives needs to be shared with another application that does have an MQTT client, you can create an application extension based on HiveMQ broker SDKs. This is another way to send the SAP data to the concerned application and a unique feature that HiveMQ offers.
Explore HiveMQ’s Solution Today and Take the First Step Towards Industry 4.0 Success
HiveMQ is a leading enterprise-grade MQTT data broker that offers scalable, reliable, and secure bidirectional data movement for various use cases, including manufacturing. There are several challenges to IIoT data collection, especially when bridging data efficiently from OT systems to IT systems. Data brokers like HiveMQ play a vital role in ensuring that the data is available for advanced use cases that allow organizations to fully benefit from Industry 4.0 technology.