SO_DOCUMENT_SEND_API1, sending a text attachment.
Hello all,
I need to send the following text as a txt file attachment in an email :
1 A
2 B
3 C
but what i receive in the email attachment was:
1 A 2 B 3 C
everything in a single line.. which is not what i want...
bellow is part of my code....
CONSTANTS:
con_tab TYPE C VALUE cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret TYPE C VALUE
cl_abap_char_utilities=>CR_LF.
CONCATENATE '1 ' 'A' INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
CONCATENATE '2 ' 'B' INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
CONCATENATE '3 ' 'C' INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
......
......
......
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_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
OTHERS = 8.
thank you..