ā2013 Jul 23 6:39 AM
Hi Experts,
My three ALV report is scheduled through sm36 and sending three attachment as a html file with customized variant to one person. Now my requirement is to send these three attachments in one mail. Please suggest me the ways.
Is this possible through SM36 or Coding?
Regards,
Anshuman
ā2013 Jul 23 6:42 AM
Hi,
make a little search on the forum, mail with attachments is one of the most asked question
regards
Fred
ā2013 Jul 23 6:47 AM
Hi,
Just check the program code each will be having its code to send the report output as HTML attachment. There might be a development required. May be a new program to check that these programs have completed and then read each spool in HTML and send across as HTML attachments in a single mail.
Cheers,
Arindam
ā2013 Jul 23 6:59 AM
ā2013 Jul 23 7:05 AM
Hi Anshuman,
You can do this through coding itself, use CL_DOCUMENT_BCS class.
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = '<value>' " HTML/PDF/DOC
i_attachment_subject = '<subject_to_attachement>' " Any text
i_attachment_size = <file_size> "eg: lp_pdf_size (TYPE so_obj_len)
i_att_content_hex = <file_content> "eg: lt_solix_tab (Type solix_tab )
* Then call below method to set document, add document to send request
send_request->set_document( document ).
Like this you can do for multiple Attachments.
You can refer report "BCS_EXAMPLE_6" which demonstrates sending files attachment through mails. PDF attachment considered for demonstration, you can try with HTML.
Thanks & Regards,
-VIJAY
ā2013 Jul 23 8:01 AM
Hi Anshuman,
here is the code example : http://scn.sap.com/thread/3345900
You can call method add_attachment more than one to add multiable attachment.
Regards
Tolga