[ABAP] RFC-Abruf aller verlinkten Dokumente zu einem Business Object

* System-ID
PARAMETERS: p_rfc TYPE sy-sysid DEFAULT 'XYZ'.
* Typ-Material 
PARAMETERS: p_sobj TYPE toav0-sap_object DEFAULT 'BUS1001006'.
* MATNR
PARAMETERS: p_oid TYPE toav0-object_id DEFAULT '000000001234567890'.

START-OF-SELECTION.

  DATA: lv_message TYPE bapiret2.
  DATA: it_results TYPE STANDARD TABLE OF toars_s WITH DEFAULT KEY.
  DATA: it_urls TYPE STANDARD TABLE OF toadurl_s WITH DEFAULT KEY.

* Gibt alle Dokumente zum Business Object zurück
  CALL FUNCTION 'ALINK_RFC_DOCUMENTS_GET' DESTINATION p_rfc
    EXPORTING
      im_botype             = p_sobj
      im_boid               = p_oid
      im_x_urls             = abap_false " Schalter zum Füllen von IT_URLS => Performance beachten
    IMPORTING
      ex_message            = lv_message
    TABLES
      ex_results            = it_results
      ex_urls               = it_urls
    EXCEPTIONS
      system_failure        = 1
      communication_failure = 2
      OTHERS                = 3.

  WRITE: / lv_message-message.

  IF sy-subrc = 0.
    cl_demo_output=>display( it_results ).
  ENDIF.