‎2012 May 14 7:57 PM
Hi All,
I have a HTML file output. I need to email HTML file from SAP ABAP program.
Custom Program will use standard Function Module - SO_NEW_DOCUMENT_ATT_SEND_API1. In the program, how to append
internal table for storing binary contents (CONTENTS_HEX). Since already a output HTML file exist, I need a help in filing the internal table.
Thank you.
With Regards,
Gandhi Subramani
‎2012 May 21 5:12 PM
Hi Gandhi Subramani,
use CL_BCS as outlined in the other HTML-MAIL thread.
SO_NEW_DOCUMENT_ATT_SEND_API1 is no longer supported.
Regards,
Clemens
‎2012 May 21 8:23 PM
Clemens,
Thank you.
How to append internal table for storing binary contents (CONTENTS_HEX)? Since already a output HTML file exist, I need a help in filing the internal table. Please let me know whether there is any function module to parse the HTML tags so I can append the internal table (contents for email). If no function module, I have to write code to parse and fill internal table.
With Regards,
Gandhi Subramani
‎2012 May 22 12:07 PM
Hi Gandhi,
HTML anx XML is defined as pure (ASCII) character file. So what is your binary content?
* if you got a list object, use
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
* EXPORTING
* report_name = prog
TABLES
html = lt_html
listobject = lt_list.
lt_soli = lt_html.
TRY.
lo_bcs = cl_bcs=>create_persistent( ).
lo_document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_text = lt_soli
i_subject = lv_subject ).
Regards,
Clemens
‎2012 May 22 9:52 PM
Hi Clemens,
Thank you. I don't have a list object, I have a HTML file itself in a directory. For this, whether I need to parse based on tags to fill internal table and use in i_text? Any function module exist to parse the file.
With Regards,
Gandhi Subramani