We use cookie to ensure that we give you best experience on our website. With further use of this website you accept the application of cookies.  mehr...  I agree  reject

Sample ABAP Code to use function module HU_GET_RFC_DATA

The following ABAP code shows how to use function module HU_GET_RFC_DATA to read the weight and the unit from a scale.

DATA:
  ls_scale TYPE hum_scale,
  lt_scale TYPE STANDARD TABLE OF hum_scale.
  REFRESH lt_scale.
  CLEAR ls_scale.
  ls_scale-waage = 'S001'.
  APPEND ls_scale TO lt_scale.
  CALL FUNCTION 'HU_GET_RFC_DATA'
    DESTINATION 'RFCSCALE'
    TABLES
      et_weight = lt_scale.
  READ TABLE lt_scale INDEX 1 INTO ls_scale.
  IF ( ls_scale-brgew IS NOT INITIAL ).
    WRITE: / ls_scale-brgew , ls_scale-gewei.
  ENDIF.