Code: Alles auswählen.
TRY.
CALL METHOD cl_binary_relation=>read_links_of_binrel
EXPORTING
is_object = is_object " Startobjekt
* ip_logsys = " Logisches System
ip_relation = me->gc_reltype_attachment " Verknüpfungstyp
* ip_role = " Rollentyp
* ip_propnam = " Attributname
* ip_no_buffer = SPACE " Puffer ignorieren
IMPORTING
et_links = et_links. " Tabelle mit Verknüpfungssätzen
CATCH cx_obl_parameter_error.
CATCH cx_obl_internal_error. "
CATCH cx_obl_model_error. "
ENDTRY.
Code: Alles auswählen.
LOOP AT et_links INTO ls_links WHERE typeid_b = me->gc_typeid_message.
lv_doc_id = ls_links-instid_b.
CLEAR: lt_cont,
lt_contx,
lt_object_hea,
ls_doc_data.
CALL FUNCTION 'SO_DOCUMENT_READ_API1'
EXPORTING
document_id = lv_doc_id
IMPORTING
document_data = ls_doc_data
TABLES
object_header = lt_object_hea
object_content = lt_cont
contents_hex = lt_contx
EXCEPTIONS
document_id_not_exist = 1
operation_no_authorization = 2
x_error = 3
OTHERS = 4.
ENDLOOP.