04-21-2009 3:11 PM
Hi Experts,
SO_DOCUMENT_SEND_API1 Fm is used to send mail with text file attachment,
E-MAil message body is coming perfect, but the content in text file is displaying different formate .
PFB the content in Text file.
IM7330003226161208RIBA20
140000001 200904210700
200000001Wella Italia Labocos SrlVia
I need to display the content as shown in below.
IM7330003226161208RIBA20
140000001 200904210700
200000001Wella Italia Labocos SrlVia
Please help.
04-21-2009 3:13 PM
t_packing_list-doc_type = 'RAW'.
....
----
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_data
* PUT_IN_OUTBOX = ' '
commit_work = 'X'
IMPORTING
sent_to_all = lv_flag
* NEW_OBJECT_ID =
TABLES
packing_list = t_packing_list
04-21-2009 3:13 PM
t_packing_list-doc_type = 'RAW'.
....
----
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_data
* PUT_IN_OUTBOX = ' '
commit_work = 'X'
IMPORTING
sent_to_all = lv_flag
* NEW_OBJECT_ID =
TABLES
packing_list = t_packing_list
04-21-2009 3:17 PM
Hi,
pass attachment data to contents_hex instead of contents_bin. use thebelow logic to convert to hexa..
CALL FUNCTION 'SO_RAW_TO_RTF'
TABLES
objcont_old = lt_objbin
objcont_new = lt_objbin.
LOOP AT lt_objbin INTO l_line.
conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' endian = 'B').
CALL METHOD conv->write( data = l_line ).
l_buffer = conv->get_buffer( ).
MOVE l_buffer TO l_hexa.
MOVE l_hexa TO l_hex-line.
APPEND l_hex TO lt_contents_hex.
ENDLOOP.
Refer to thie link with example...Instead of DOC use the TXT attachement..
04-21-2009 3:41 PM
Hi,
Check for the documentation of the FM used where example is also provided how to use the FM.