Sample ABAP code

You are here:

To use RFC HU_GET_RFC_DATA from your own ABAP’s, there are two steps.

  1. If you have defined packing station profiles in customizing (transaction HUPAST_C), you can use the function module read_packstation to determine the profile based on the hostname of the user’s PC.
  2. Use the RFC call HU_GET_RFC_DATA in conjunction with ERP-Scale to determine the current weight from the serial device
    Note: You can use the packing station profile with ERP-Scale even if you have not activated handling unit management in SAP.
Determine Packing station profile based on hostname of user’s PC

Call to RFC function HU_GET_RFC_DATA

Complete example

Determine Packing station profile based on hostname of user’s PC when using Fiori.

If the code is being used in a Fiori app, the function module TH_USER_INFO does not return the hostname of the operator’s PC, but the IP address. The FQDN of the operator’s PC can be determined using function module RFC_IP_TO_HOST.

We suggest creating a second packing station profile with the terminal matching the RFCHOST returned by RFC_IP_TO_HOST. This way the custom transaction will determine a valid packing station profile if called from the SAP gui or Fiori.

Was this article helpful?
Dislike 0
Views: 2328
Still have questions? Create a support ticket