Skip to Content
User Experience Insights
Author's profile photo Rajnish Shetty

Weigh Bridge integration in S/4HANA Public Cloud

co-authored with Prasanth Padmanabhan Menon

Business Context

  • In product centric industries, materials need to be delivered to the factory premises for purchase orders or need to be shipped to customers as part of sales deliveries
  • Typically a customized process knows as “Gate Entry” developed on S4HC is executed, to manage vehicle movements into or out of the factory premises
  • As part of this process, the vehicle used for material deliveries is weighed on a machine called “Weigh-Bridge”, at the factory gates to monitor deliveries and prevent material pilferage
  • The vehicle is loaded onto a weigh-bridge to capture its weight which is recorded during the gate entry process

Net Weight = Gross Weight – Tare Weight (Empty Truck)

Typical Integration Set-up with Weighbridge:

  • The Gate Entry Fiori UI is accessed via a browser session over open internet on a Terminal located at the Gate
  • The weighbridge software is installed on this terminal and provides streaming data via local port linked to the Weighbridge

Challenges Integrating with S4H Public Cloud:

  1. Difficult for whitelisted server API’s to capture streaming weight data and post it against the correct gate entry record in the context of the logged-in user
  2. Browser to local machine integration is one of option considered in S4H Public Cloud. Communication Arrangement to call a local host via browser is not supported anymore due to security implications. See SAP Note 3153784
  3. Most product centric customers in India need to integrate with a weighbridge and hence set-up this integration as part of the GATE Entry development on SAP using the ABAP platform

This integration is not a challenge in SAP Private Cloud or On-Premise instances as you have the option to have a SAP GUI client installed on the local terminal, and hence can access local machine serial port in the context of the users UI session via ABAP RFC calls

The Solution

  • Install SAP Cloud Connector on the terminal linked to the weighbridge. On the date of this writing, SAP Cloud Connector is free to use. For most updated info, refer to SAP note 2827108 – SAP Cloud Connector licensing, download and installation information:
  • Link your S4H Public Cloud solution to the local terminal via the Cloud Connector
  • A local service on that terminal that can connect with the serial port to read the streaming weight data

* Node.JS is what we used in our test set-up on the terminal as a local service, as we had a virtual port simulating a weighbridge one. The node.js application communicates with the virtual port to retrieve the weight data and hand it over to the calling application (S4H public cloud user interface) via the cloud connector

Depending on the type of software installed by the weighbridge provider on the local terminal, customers can use appropriate technologies to create this local service

Configuration Set-up:

  1. Install cloud connector on the local terminal as administrator and set-up the parameters as detailed below:
    • Maintain Sub-account details:Cloud%20Connector%20Setup
    • Maintain the “Cloud To On-Premise” settings: In our test set-up, the virtual port is set-up on 5000 to read the weight data
    • From your BTP cockpit, you can verify that your cloud system is able to connect with the local terminal via cloud connector
  2. Set-up Communication arrangement for Communication scenario SAP_COM_0574 to enable communication between your cloud and on-premise system (Cloud Connector on local terminal).Follow instructions as detailed in help doc: Integrating on-premise systems
    • Log into your BTP cockpit and create an instance for Connectivity Service:
    • The above step creates a service key for this instance in JSON format, which should be copied to the relevant box while creating a communication arrangement for communication scenario SAP_COM_0574

    • The communication arrangement will get created as below:
  3. Create a Communication system in S4HC to represent your cloud connector instance:
  4. Create an outbound Custom Communication Scenario on S4HC. This represents an outbound API call from S4HC to “read” the weight data from the relevant Cloud Connector instance
  5. Create communication arrangement in S4HC. This is the outbound set-up where the communication system representing the cloud connector & the custom communication scenario (outbound “read” API call) are linked

Quick Demo Video:

In our test set-up the end user clicks on the appropriate button (“Gross Weight” or “Tare Weight”) on a custom app on S4HC 3SL with developer extensibility. This triggers call to the outbound “read” API via the set-up done above. The weight data captured by the local service is captured by the API and updated onto the relevant weight field on the GATE Entry Screen

Benefits of this Solution

  • No need to develop a local third-party application to manage the weighbridge process
  • For customers subscribed to the public cloud solution along with a default BTP account, no need to purchase or subscribe to additional paid components (Terms and conditions stated within respective customer signed contracts will apply)
  • Adher’s to SAP’s generally recommend integration best practices

Please do provide your comments, feedback or share your experiences , if you have used this approach in your implementations

For more information of our S4HANA Public Cloud solution, please follow:

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Ganesh Bhosale
      Ganesh Bhosale

      Hi Rajnish Shetty , Prasanth Padmanabhan Menon ,

      We have done the setup of Weighbridge in S/4 HANA Public Cloud as you mentioned above.

      Now, we need to test, how can we test ?

      Please provide the solution.


      Ganesh Bhosale

      Author's profile photo Rajnish Shetty
      Rajnish Shetty
      Blog Post Author

      Hi Ganesh

      I assume that you have set this up for an active project where you have an actual weighbridge provider. The software from the weighbridge provider should be installed on the same machine terminal in which the cloud connector is installed. You can then call the events of this software via the "outbound “read” API call to interact with the local service deployed on the terminal

      Author's profile photo Tarka Karwadkar
      Tarka Karwadkar

      Is the gross weight and tare weight captured in custom fields or is any CDS view available for the weighbridge process?

      Author's profile photo Prasanth Padmanabhan Menon
      Prasanth Padmanabhan Menon

      Hi Tarka,

      Gross Weight and Tare Weight are captured in fields of a custom CDS view. Hope this answers your question.


      Best Regards,


      Author's profile photo Subrata Patra
      Subrata Patra

      Hi Rajnish Shetty Thanks for the details integration of Weighbridge. is there any Standard FIORI app or Program available in Standard SAP Private Cloud for Gate entry & Weighbridge? or program we need to  develop & customization we need to do in SAP ? Also we have a Business scenario like once we save the weighbridge in background automatically PO & GRN will be done on basis of net weight.

      Author's profile photo Prasanth Padmanabhan Menon
      Prasanth Padmanabhan Menon

      Hi Subatra,


      A standard application is not available for Gate Entry. But you can create a custom application using Developer Extensibility. In this scenario, we made use of the Business Object, to post Goods Receipt to S/4HANA Cloud, via the custom application which is explained in the blog.


      Best Regards,


      Author's profile photo Subrata Patra
      Subrata Patra

      Thanks Prasanth

      Author's profile photo Kalpesh Dethe
      Kalpesh Dethe

      Hello ,

      How We can TEST this if we dont have active Project.

      we need to test this in Patner Demo system

      Author's profile photo Rajnish Shetty
      Rajnish Shetty
      Blog Post Author

      Hi Kalpesh

      The set-up detailed in the blog was done in an internal demo landscape simulating a local weighbridge API via local service using Node JS in our case. You can also simulate a weighbridge call/API using some type of service on the local machine/desktop which interacts with S4HC via Cloud Connector

      Author's profile photo Samed Ersen
      Samed Ersen

      Hello Rajnish,

      First of all, thank you for sharing.
      Is it possible to share the api you developed with Nodejs?