Code: Alles auswählen.
mo_send_request = cl_bcs=>create_persistent( ).
"Dokument mit Betreff-Zeile anlegen
mo_document = cl_document_bcs=>create_document( i_type = 'RAW'
i_text = mt_content
i_subject = mv_subject ).
"Attachment anhängen
IF mv_attachment_type IS NOT INITIAL AND mt_bin IS NOT INITIAL.
mo_document->add_attachment( i_attachment_type = mv_attachment_type
i_attachment_subject = mv_filename
i_att_content_hex = mt_bin ).
ENDIF.
mo_send_request->set_document( mo_document ).