Using ABAP function module SRTFT_GET_SYSTEM_META_DATA to retrieve data from ERP-Scale

You are here:

Note: This function is available in ERP-Scale V4.0.2 from build B23275 and ERP-Scale V5.0.1.

The function module SRTFT_GET_SYSTEM_META_DATA can be used from SAP to retrieve the following data from ERP-Scale:

  • Operating system of the PC where ERP-Scale is installed
  • ERP-Scale version
  • Overall status of:
    • Device (scale) communication
    • RFC communication
    • Licence activation
  • List of devices (scales)
  • List of RFC destinations
  • Device information
    • Licence data
    • Device connection
    • Status
  • RFC information
    • Connection data
    • SNC connection
    • Status
ABAP function module RFC_GET_SYSTEM_INFO can be used to retrieve further information.
data: ls_function type qname,
      lt_options type SRTFT_NAMED_VALUE_LIST_CHAR,
      ls_option type LINE OF SRTFT_NAMED_VALUE_LIST_CHAR,
      lt_meta_binary type SRTFT_NAMED_VALUE_LIST_BINARY,
      lt_meta_char type SRTFT_NAMED_VALUE_LIST_CHAR,
      lv_return_code type i,
      lt_messages type SRTFT_MESSAGE_LIST.

ls_function-name = 'ERPSCALE'.
ls_function-namespace = 'POCKETPROGRAMS'.

ls_option-name = 'ERPSCALE.VERSION'.
append ls_option to lt_options.
ls_option-name = 'ERPSCALE.STATUS'.
append ls_option to lt_options.
ls_option-name = 'HOST.OS.VERSION'.
append ls_option to lt_options.
ls_option-name = 'DEVICE.LICENCE'.
ls_option-value = 'SCALE1'. 
append ls_option to lt_options.
ls_option-name = 'RFC.STATUS'.
ls_option-value = '1'. 
append ls_option to lt_options.

CALL FUNCTION 'SRTFT_GET_SYSTEM_META_DATA'  destination lv_destination
  EXPORTING
    FUNCTION               = ls_function
    OPTIONS                = lt_options
  IMPORTING
    META_DATA_BINARY       = lt_meta_binary
    META_DATA_CHAR         = lt_meta_char
    RETURN_CODE            = lv_return_code
    MESSAGES               = lt_messages
  EXCEPTIONS
    UNKNOWN_FUNCTION       = 1
    OTHERS                 = 2
          .
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

FIELD-SYMBOLS: <fs_meta_char> TYPE LINE OF SRTFT_NAMED_VALUE_LIST_CHAR.
LOOP AT lt_meta_char ASSIGNING <fs_meta_char>.
  write: / <fs_meta_char>-Name, ':' NO-GAP, AT 60 <fs_meta_char>-value.
ENDLOOP.

Supported options:

Name Value Response Sample value
ERPSCALE.VERSION   ERPSCALE.VERSION V4.0.2.23260
ERPSCALE.STATUS   ERPSCALE.STATUS.COMMUNICATION
ERPSCALE.STATUS.COMMUNICATION.TEXT
ERPSCALE.STATUS.RFC
ERPSCALE.STATUS.RFC.TEXT
ERPSCALE.STATUS.RFC.LAST.TIME
ERPSCALE.STATUS.ACTIVATION
ERPSCALE.STATUS.ACTIVATION.TEXT
1
Ok
1
Ok
20231009060855 (UTC)
1
Ok
HOST.OS.VERSION   OS.VERSION 10.0.19045
DEVICE.LIST   DEVICE.xxx.STATUS.ACTIVE DEVICE.PS60.STATUS.ACTIVE  X
DEVICE.LICENCE Name of device in ERP-Scale e.g. PS60 DEVICE.PS60.LICENCE.NUMBER
DEVICE.PS60.LICENCE.PASSWORD
DEVICE.PS60.LICENCE.LEVEL
DEVICE.PS60.ACTIVATION.EXPIRY
DEVICE.PS60.LICENCE.ACTIVATED
DEVICE.PS60.LICENCE.ACTIVATION.MESSAGE
DEVICE.PS60.LICENCE.ACTIVATION.RESPONSE
DEVICE.PS60.LICENCE.EXPIRY
DEVICE.PS60.LICENCE.SUPPORT.EXPIRY
12345678
9876
10
2023.12
Y
Device Activated
Activation Key Updated
2024.12
2013.06
DEVICE.CONNECTION Name of device in ERP-Scale DEVICE.PS60.CONNECTION.METHOD
DEVICE.PS60.CONNECTION.METHOD.VENDORNAME
DEVICE.PS60.CONNECTION.METHOD.VENDORID
DEVICE.PS60.CONNECTION.METHOD.SERIALNR
DEVICE.PS60.CONNECTION.METHOD.PRODUCTID
DEVICE.PS60.CONNECTION.METHOD.PRODUCTNAME
USBHID
Mettler Toledo
376861440
PS60
DEVICE.STATUS Name of device in ERP-Scale DEVICE.PS60.STATUS.ACTIVE
DEVICE.PS60.STATUS.COMMUNICATION
DEVICE.PS60.STATUS.COMMUNICATION.TEXT
DEVICE.PS60.LAST.LOG
DEVICE.PS60.LAST.TIME
X
E
Error
kg 4.52
20231009060857
RFC.LIST   RFC.3DLB.CONNECTION.ACTIVE
RFC.3DLB.CONNECTION.PROGRAMID
RFC.3DLB.CONNECTION.GATEWAY
RFC.3DLB.CONNECTION.SERVICE
RFC.BC5L.CONNECTION.ACTIVE
RFC.BC5L.CONNECTION.PROGRAMID
RFC.BC5L.CONNECTION.GATEWAY
RFC.BC5L.CONNECTION.SERVICE
X
ERP-SCALE-WS3
172.16.2.103
sapgw00
X
ERP-SCALE-PS6
172.16.2.190
sapgw00
RFC.STATUS Id of RFC connection e.g. 3DLB RFC.3DLB.CONNECTION.ACTIVE
RFC.3DLB.CONNECTION.STATUS.MANAGED
RFC.3DLB.CONNECTION.STATUS
RFC.3DLB.CONNECTION.STATUS.TEXT
X
RFC_SERVER_RUNNING
Ok
RFC.CONNECTION Id of RFC connection e.g. 3DLB RFC.3DLB.CONNECTION.ACTIVE
RFC.3DLB.CONNECTION.PROGRAMID
RFC.3DLB.CONNECTION.GATEWAY
RFC.3DLB.CONNECTION.SERVICE
RFC.3DLB.CONNECTION.HOSTTYPE
RFC.3DLB.CONNECTION.METHOD
RFC.3DLB.CONNECTION.COUNT
X
ERP-SCALE-WS3
172.16.2.103
sapgw00
ERP
MANAGED
2
RFC.CONNECTION.SNC Id of RFC connection e.g. 3DLB RFC.3DLB.CONNECTION.SNCMODE
RFC.3DLB.CONNECTION.SNCQOP
RFC.3DLB.CONNECTION.SNCMYNAME
RFC.3DLB.CONNECTION.SNCPARTNERNAME
RFC.3DLB.CONNECTION.SNCLIB
1
3
p:CN=WORKSTATION3
sapcrypto.dll

Status codes:

  1. Unknown
  2. Ok
  3. Incomplete
  4. Error
Was this article helpful?
Dislike 0
Views: 157
Still have questions? Create a support ticket