Connect Tradelens with SAP

The legally compliant exchange of documents and information between business partners is a prerequisite for efficient supply chain management. Important documents such as the bill of lading or insurance policies can only be recognized in digital form if it can be proven at any time that no data manipulation has taken place. With its blockchain solution, TradeLens creates the prerequisites and guarantees its participants legal certainty and reliability with regard to transport-relevant documents, status information and order information. We have therefore developed a connector service that enables the secure exchange of data between ERP/WMS/TMS systems such as SAP and TradeLens within a short period of time.
Most SAP ECC and S/4HANA systems exchange order or transport data with other systems via RFC and IDoc. This is the standard way that has been established for decades. TradeLens, on the other hand, relies on REST services and JSON with a sophisticated modified OAuth2 authentication. Each TradeLens participant manages their accounts independently in the IBM Cloud; this is part of the TradeLens solution.
Consequently, four measures must be taken to connect SAP and TradeLens, which we will now explain in more detail step by step:
- Authentication between SAP and TradeLens so that only authorized requests are processed.
- Conversion of the XML data format (IDoc/RFC) to JSON and vice versa.
- Mapping of data fields between the two systems
- Asynchronous response processing from TradeLens to SAP.
Authentication, conversion, mapping and asynchronous response processing are the core elements of SAP TradeLens communication
Two configurations must be made in TradeLens itself. Firstly, the events that are of interest must be selected. Secondly, a webhook must be defined to which the information on these events is sent, e.g. the electronic Bill of Lading (eBL) as soon as it has been created.
What does the communication between the two systems look like in detail and what activities take place?
SAP sends data to TradeLens
Let's assume that shipping orders are generated for a carrier in an SAP ECC system (it should be emphasized: the same applies to S/4HANA, of course). These are available in a shipment IDoc SHPMNT05 and are made available via RFC to a recipient defined in screen SM59. The first step is the secure transmission of the shipment IDoc to an automation platform, which generates a corresponding query in TradeLens from the information it contains. As a rule, this will be the Carrier Booking Number (CBN) and the container number or the Bill of Lading (BoL) and the container number. TradeLens requires one of the two combinations in addition to technical data to reliably identify the transport order.
The automation platform now handles the authentication, conversion and transmission of the IDoc content to TradeLens in the required JSON format and in this way notifies TradeLens of the transport request. TradeLens provides a transaction number in response, which serves as a unique reference for the notification. This can be logged in a database or transferred to SAP for documentation - e.g. as an IDoc.
IDocs are correctly translated into TradeLens data records
The order is known in TradeLens and the carrier can add further transport events to this order, such as the handover to a shipping company, by specifying the two identification features CBN and container number or BoL and container number in TradeLens. In addition, a transport insurer can transmit policy data to TradeLens and a terminal operator can report the arrival or loading of the container to TradeLens. The blockchain is filled - forgery-proof and can be viewed by authorized transport participants.

Communication with and without secure on-premise agent
TradeLens sends data to SAP
But how does the shipper - or the recipient - of the container receive status updates during transportation? Changes in the Expected Time of Arrival (ETA) and notification of the Actual Time of Arrival (ATA) are coveted information that usually triggers further production processes or reporting chains such as invoicing.
This is where the aforementioned webhook is used in the automation platform, which is called by TradeLens as soon as an interesting (i.e. subscribed) event in TradeLens has been populated with data. This data is transmitted to the webhook, which then converts the information into an IDoc or reports it directly back to SAP via an RFC call. Conversion, mapping and secure transmission are ensured by the automation platform, which is usually securely connected to an on-premise agent in the demilitarized zone (DMZ) of the SAP system. In a separate this secure architecture in a separate article so that no inbound port openings on the firewall are necessary.
| Security of access to SAP has top priority
SAP processes the information as part of its normal processes and can also log this in standard SAP monitoring. TradeLens therefore appears to be an extension of its own ERP system.
CRM, customer reporting and transportation management
In contrast to a point-to-point connection, in which the aforementioned data exchange could be carried out directly by ABAP programming in SAP, the automation platform allows the use case to be extended in addition to faster and, above all, more transparent implementation.
Status information about the transport can be transferred to a CRM system such as Salesforce or to a customer reporting system and data warehouse such as Snowflake/PowerBI/Tableau, where it can be processed graphically. For example, the transport route can be displayed on Google Maps or the entire supply chain movements can be saved in a transport management system as a "digital twin". In this way, customers, suppliers, producers, shippers and management have transparency about the whereabouts of their goods at all times. Geofencing can also be implemented in this way, as can push notifications in an MS Teams channel to Customer Service in the event of transport disruptions.
SAP-TradeLens Connector by Business Automatica GmbH
Business Automatica GmbH has developed a corresponding connector to TradeLens and extended it with a customizable implementation template for SAP ECC or S/4HANA in order to be able to implement these use cases quickly in the respective conditions of an SAP system. Individual data mappings (e.g. in SHPMNT05) can thus be carried out quickly, as the technical basis is already available and the connection to SAP is carried out by means of configuration. In addition, the settings in the SAP system are precisely documented so that SAP Basis operations can make them quickly.
A secure on-premise agent can be installed on a virtual Linux or Windows machine on request, so that no inbound port shares are required on the firewall.
If required, Business Automatica GmbH can also help with the configuration of IBM Cloud Authentication and the selection of events in TradeLens, so that TradeLens and SAP can exchange the desired data with each other in the shortest possible time.
| The sky is the limit
If the application should be extended to other systems, there are no limits to your creativity: it all depends on your will and imagination.
About Business Automatica GmbH:
Business Automatica reduces process costs by automating manual activities, increases the quality of data exchange in complex system architectures and connects on-premise systems with modern cloud and SaaS architectures.