Hi,
I need to send .DAT file as email attachment.
I'm using SO_NEW_DOCUMENT_ATT_SEND_API1 for sending mail.
The below is the code which I'm using.
I changed doc_type even to 'DAT' but I I'm not getting data properly.
The formatting/alignment is not correct, all the data is coming in one line with space b/w each letter.
I tried all the approaches searching in SDN but its of no use.
Can you please send me any working code which is sending DAT file as attachment?
ls_objtxt = 'Please see attachment'.
APPEND ls_objtxt TO ex_t_objtxt.
ex_s_doc_data-doc_size = 1. --> even tried " ( lines( ex_t_objtxt ) - 1 ) * 255 + strlen( ls_objtxt )
ex_s_doc_data-obj_langu = sy-langu.
ex_s_doc_data-obj_name = 'Data File'.
ex_s_doc_data-obj_descr = 'Data File'.
ex_s_doc_data-sensitivty = 'F'.
ls_objpack-transf_bin = space.
ls_objpack-head_start = 1.
ls_objpack-head_num = 0.
ls_objpack-body_start = 1.
ls_objpack-body_num = lines( ex_t_objtxt ).
ls_objpack-doc_type = 'RAW.
APPEND ls_objpack TO ex_t_objpack.
CLEAR: ls_objpack.
ls_objpack-transf_bin = 'X'. ---> even tried as space
ls_objpack-head_start = 1.
ls_objpack-head_num = 1.
ls_objpack-body_start = 1.
ls_objpack-body_num = lines( ex_t_attachment ).
ls_objpack-doc_type = 'BIN'. --> even tried with 'DAT'
ls_objpack-obj_descr = 'Data File'.
ls_objpack-obj_name = 'Data File'.
ls_objpack-doc_size = ls_objpack-body_num * 255.
APPEND ls_objpack TO ex_t_objpack.
CLEAR: ls_objpack.
NOTE: .DAT file needed not .TXT file.
Thanks & Regards,
Adithya M.