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: https://launchpad.support.sap.com/#/notes/0002827108
  • 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: https://community.sap.com/topics/s4hana-cloud

Assigned Tags

      4 Comments
      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.

      Thanks,

      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,

      Prasanth