Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Email HTML file

Former Member
0 Kudos
105

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

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos
67

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

Former Member
0 Kudos
67

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

Clemenss
Active Contributor
0 Kudos
67

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

Former Member
0 Kudos
67

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