Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem in sending Mail In TXT format.

Hi All,

I am developing a program for sending a mail in .TXT format using the FM SO_NEW_DOCUMENT_ATT_SEND_API1.

The Mail is getting successfully send with the attachment, but inside the file its coming as say for e.g.V i c k y k u m a r " , " 3 4 0 0 1 8 2 7 instead of "Vicky kumar","34001827". Can you please let me know why its coming in this way.

Below is the table where i am passing the data to li_objbin for the attachment.

LOOP AT TAB_105_FNL.

  • CONCATENATE wa_error-pernr wa_error-desc INTO lwa_objbin SEPARATED BY

  • cl_abap_char_utilities=>horizontal_tab.

lwa_objbin = TAB_105_FNL.

CONCATENATE cl_abap_char_utilities=>newline lwa_objbin

INTO lwa_objbin.

APPEND lwa_objbin TO li_objbin.

CLEAR lwa_objbin.

ENDLOOP.

lwa_objhead = 'Employee_Mass_Data.xls'.

APPEND lwa_objhead TO li_objhead.

lwa_objpack-transf_bin = 'X'.

lwa_objpack-head_start = 1.

lwa_objpack-head_num = 1.

lwa_objpack-body_start = 1.

lwa_objpack-body_num = LINES( li_objbin ).

lwa_objpack-doc_type = 'DAT'. " Here I tried with TXT also but still its is working the same way

lwa_objpack-obj_name = 'ATTACHMENT'.

lwa_objpack-obj_descr = 'Employee Mass Data'.

lwa_objpack-doc_size = lwa_objpack-body_num * 255.

APPEND lwa_objpack TO li_objpack.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = lv_doc_chng

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = li_objpack

object_header = li_objhead

contents_bin = li_objbin

contents_txt = li_objtxt

receivers = li_reclist

Thanks and Regards,

Salish

replied

First context_txt part is considered to be the body, and the following context_txt parts are considered as attachments.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question