Code: Alles auswählen.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = ls_document_data
put_in_outbox = 'X'
sender_address = lv_sender
sender_address_type = lv_sender_type
commit_work = 'X'
IMPORTING
sent_to_all = lv_sent_to_all
TABLES
packing_list = lt_packing_list
contents_txt = lt_contents_txt
contents_bin = lt_contents_bin
receivers = lt_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
error_message = 99
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
COMMIT WORK.
Code: Alles auswählen.
ls_packing_list-doc_type = 'RAW'.
ls_document_data-sensitivty = 'F'.
ls_document_data-obj_name = 'SAPRPT'.
MOVE 'U' TO ls_receiver-rec_type.