[ABAP] Textobjekte per RFC lesen

DATA: lv_rfc_syst TYPE sy-sysid.
DATA: it_txt_lines TYPE STANDARD TABLE OF ibiptextln.
DATA: it_ret TYPE STANDARD TABLE OF bapiret2.
DATA: it_links TYPE STANDARD TABLE OF bapi_doc_drad_keys.

lv_rfc_syst = sy-sysid.

it_txt_lines = VALUE #( ( tdobject = 'MATERIAL' tdid = 'BEST' tdname = '000000001234567890' tdspras = 'DE' ) ).

CALL FUNCTION 'RFC_READ_TEXT' DESTINATION lv_rfc_syst
  TABLES
    text_lines  = it_txt_lines
    messages    = it_ret
    objectlinks = it_links.

IF lines( it_ret ) = 0.
  LOOP AT it_txt_lines ASSIGNING FIELD-SYMBOL(<fs_txt_line>).
    WRITE: / <fs_txt_line>-tdline.
  ENDLOOP.
ENDIF.