Get backend RFC destination in SRM

This code is working properly, when the SRM system is connected to exactly one ECC Backend only.

    DATA:
      lt_logsys      TYPE bbpt_logical_system,
      ls_logsys      TYPE bbps_logical_system,
      lt_message     TYPE bbpt_balmi,
      lv_destination TYPE RFCDEST.

    CALL FUNCTION 'BBP_GET_BACKEND_SYSTEMS'
      TABLES
        et_logical_systems = lt_logsys
        et_messages        = lt_message.

    READ TABLE lt_logsys INTO ls_logsys INDEX 1.

    IF sy-subrc EQ 0 AND ls_logsys-logsys IS NOT INITIAL.

      CALL FUNCTION 'BBP_LOGICAL_SYSTEM_GETDETAIL'
        EXPORTING
          logical_system = ls_logsys-logsys
        IMPORTING
          destination    = lv_destination.
SAPDEV.EU
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.