Skip to Content

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

to remove the gaps in mail

Hi experts,

i have developed a report to send a mail with attachment.

the mail is going

li_objpack-head_start = 0.
li_objpack-head_num = 1.
li_objpack-body_start = 1.
li_objpack-body_num = lv_tablines.
li_objpack-doc_type = 'RAW'.
append li_objpack.
* attachement

CONCATENATE 'TOTAL NUMBER OF FILES UPLOADED :--  ' v_filecnt into objbin.
APPEND objbin.
clear objbin.
loop at it_file into wa_file.

CONCATENATE 'Uploaded Filename  :- ' wa_file into objbin .
 
 APPEND objbin.
 clear objbin.
ENDLOOP.

describe table objbin lines lv_tablines.

li_objpack-transf_bin = 'X'.
li_objpack-head_start = 0.
li_objpack-head_num = 1.
li_objpack-body_start = 1.
li_objpack-body_num = lv_tablines.
li_objpack-doc_type = 'TXT'.
li_objpack-obj_name = 'ATTACHMENT'(a01).
li_objpack-obj_descr = sy-title.
li_objpack-doc_size = lv_tablines * 255 .
append li_objpack.

li_reclist-receiver = sy-uname.
li_reclist-rec_type = 'B'.
*li_reclist-express = 'X'.
append li_reclist.

call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = lv_docchng
put_in_outbox = 'X'
commit_work = 'X'
tables
packing_list = li_objpack
object_header = li_objhead
contents_bin = objbin
contents_txt = li_objtxt
receivers = li_reclist

But 2 problems are there in that

1.the attachment is working for only TXT format . remaining formats are not working

I need to send my report as attachment it same .

2.even in TXT format also , in attachment the letters are coming like this.

_____________________________________________________

TOTAL NUMBER OF FILES UPLOADED: - - 0 02

... .. Uploaded Filename : - input file1.xls

.. .. ...Uploaded Filename : - input file2.xls

-


now i need to display like this without gaps.

_____________________________________________________

TOTAL NUMBER OF FILES UPLOADED: - - 0 0 2

Uploaded Filename : - input file1.xls

Uploaded Filename : - input file2.xls

-


please solve my problem

waiting for your valuble suggestions

Regards

sai

Edited by: sai on Sep 11, 2008 9:16 AM

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question