Integrating Hyperledger Fabric and SAP to Blockchain your Supply Chain

Raj Srinivas - Chief Technology Officer, Blockedge
Mar 19, 2021

With the growing popularity of Hyperledger Fabric among major enterprises who also widely use SAP in their Supply Chain ecosystem, we look into ways and means through which a robust integration can be done between SAP and Hyperledger Fabric.

SAP offers various techniques to communicate with external systems, amongst which the common ones are OData, SOAP, RFCs, IDOC and JCO. In order to communicate with SAP an external system like Hyperledger Fabric should be calling one of these protocol types. OData is a great choice because of its ability to communicate via REST Web Services.

In order to effectively integrate the two platforms, it’s highly recommended to deploy an API Integration Layer in front of Hyperledger. In Hyperledger Fabric appropriate Smart Contracts have to be written (either through GO Lang, node.js or Java). The smart contracts reflect the kind of integration you want to do with SAP, depending upon your business requirement. Hyperledger also provides SDKs written in Java, Python, Node.js and GO. The API Integration Layer will communicate with the smart contracts via Hyperledger SDKs. The API Integration Layer has APIs that will implement the OAuth protocol in order to authenticate the admin user of SAP which will enable the integration APIs to call SAP’s OData APIs. In order to test the whole system, appropriate user interfaces/applications can be built at the API Integration Layer level.

Care must be taken to write the Smart Contracts appropriately, so the right kind of payload from SAP gets stored into the blockchain. There are memory restrictions on smart contracts, and one should be cognizant of this when calling the APIs and storing huge volumes of SAP data payloads in blockchains.

Smart contracts can also be leveraged to query SAP data that is stored in the blockchain. This data can then be compared with the actual data in SAP which can help in making certain decisions in the Smart Contract that could help the business processes.

Of course, ensuring proper security measures is paramount to the integration. The API Integration Layer plays a crucial role in the communication, so appropriate security mechanisms have to be built into this layer in order to reject spurious external calls. The OAuth Layer should be planned in such a way that tokens such as Access and Refresh tokens are working synchronously with the Integration APIs. This will ensure a bi-directional flow of data between the SAP and Blockchain.

Finally, depending on the complexity of the integration, it could be a good strategy to leverage API Management platforms such as Apigee, MuleSoft or similar platforms.

Get an edge on Blockchain Transformation with Blockedge Platform.

For further discussion or immediate healthcare project-related assistance, drop an email to or schedule a consultation.

Recent Posts
Scroll to Top