Code: Alles auswählen.
CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'
EXPORTING
archiv_id = ia_archiv_id
document_type = ia_document_type
archiv_doc_id = ia_archiv_doc_id
* ALL_COMPONENTS =
* SIGNATURE = 'X'
compid = <ls_al_components>-compid
IMPORTING
* length = length
binlength = binlength
TABLES
archivobject = arch_obj
binarchivobject = binarch_obj
EXCEPTIONS
error_archiv = 1
error_communicationtable = 2
error_kernel = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR ld_stream.
LOOP AT binarch_obj ASSIGNING <ls_binary>.
CONCATENATE ld_stream <ls_binary>-line INTO ld_stream IN BYTE MODE.
ENDLOOP.
t_attachment = cl_bcs_convert=>xstring_to_solix( iv_xstring = ld_stream ).
DESCRIBE TABLE lt_attachment LINES lv_lines_att.
"Aufbau der Packing list für den Anhang
ls_packing_list-transf_bin = 'X'.
ls_packing_list-head_start = 1.
ls_packing_list-head_num = 1.
ls_packing_list-body_start = 1.
ls_packing_list-body_num = lv_lines_att.
ls_packing_list-doc_type = 'BIN'.
ls_packing_list-obj_descr = iv_dateiname.
ls_packing_list-doc_size = xstrlen( ld_stream ).
APPEND ls_packing_list TO lt_packing_list.