2015 Apr 02 12:29 PM
Hi All,
I have HTML Content in an internal table of type SOLI_TAB which is actually the body of the mail.
I need to send the same content as an PDF attachment.
I have written the below code for adding the attachment.
CALL METHOD lp_document->add_attachment lp_document -> Refrence variable of the type cl_document_bcs
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = iv_msg_subj
i_attachment_size = lv_size lv_size -> Total number of lines in lt_text * 255
i_att_content_text = lt_text. lt_text-> Internal Table with html content
I tried multiple things like converting into XSTRING and various other methods. But no breakthrough.
Just want to understand can we send the HTML content as PDF Attachment.
Anypointers will be helpful.
Thanks in advance.
Regards,
Vinay Mutt
Hi All,
I have HTML Content in an internal table of type SOLI_TAB which is actually the body of the mail.
I need to send the same content as an PDF attachment.
I have written the below code for adding the attachment.
CALL METHOD lp_document->add_attachment lp_document -> Refrence variable of the type cl_document_bcs
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = iv_msg_subj
i_attachment_size = lv_size lv_size -> Total number of lines in lt_text * 255
i_att_content_text = lt_text. lt_text-> Internal Table with html content
I tried multiple things like converting into XSTRING and various other methods. But no breakthrough.
Just want to understand can we send the HTML content as PDF Attachment.
Anypointers will be helpful.
Thanks in advance.
Regards,
Vinay Mutt
2015 Apr 02 12:47 PM
Hello Vinay,
Hope this Wiki link helps you in converting the Internal Table to PDF attachment.
Convert Spool request to PDF and send as e-mail - Code Gallery - SCN Wiki
Hope you find this helpful.
Best Regards,
Jagraj Singh
2015 Apr 02 12:58 PM
2015 Apr 02 1:15 PM
Hi,
you need to search for a html to pdf routine.
try this Post.
regards
Stefan Seeburger
2015 Apr 05 8:58 AM
Hi All,
Thanks for your replies.
But all the links provided mentions the idea of SPOOL generation and Sending the mail.
As i specified in the post, i want to send the body of the mail content as attachment in the same mail.
Any ideas for using the method specified in the post. Is it possible to achive through that method.
Because, now the pdf attachment is appearing but it is not having valid content so it is not possible to open the attachment.
Thanks and Regardsm,
Vinay Mutt
2015 Apr 06 7:11 AM
Hello Vinay,
I am not sure wheather it is possible to send the email body of same email in PDF as atatchment, but you can do 1 thing.
Create a smartform print your email body content in the smartform then call your smartform before email send functionality and collect the smart form data as PDF (OTF to PDF ).
You should be able to send this as a PDF attachment, and the content of the PDF will be smartform output.
Regards,
Satyam
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |