Application Development and Automation 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: 
Read only

How to send program output as mail in HTML format

Former Member
0 Likes
2,933

Hi Friends,

I have a BDc which runs in background and its been Stored in my system and displayed as HTML format.

My requirement is now i want that Same HTML file which i am displaying to be sent as a mail in HTML format itself..Kindly help me on this

Thanks in advance

kishore

Hi Kishore,

Below is the sample code.


=====================================================================
           SEND AN EMAIL                                            *
=====================================================================
PARAMETERS: p_email LIKE pa0105-usrid_long
            DEFAULT 'eswarATxyz.com'.
*----------------------------------------------------------------------
*
*      D A T A   F O R   S E N D I N G   E M A I L
*----------------------------------------------------------------------
*
DATA: wa_objcont   LIKE solisti1,
      wa_reclist   LIKE somlreci1,
      wa_objpack   LIKE sopcklsti1,
      wa_objhead   LIKE solisti1,
      wa_content   LIKE solisti1,
      wa_doc       LIKE sodocchgi1.
 
DATA: it_objcont   TYPE STANDARD TABLE OF solisti1,
      it_reclist   TYPE STANDARD TABLE OF somlreci1,
      it_objpack   TYPE STANDARD TABLE OF sopcklsti1,
      it_objhead   TYPE STANDARD TABLE OF solisti1,
      it_content   TYPE STANDARD TABLE OF solisti1.
DATA: fv_lines TYPE i.
 
 
MOVE '<body>' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE '<p>' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE 'This is a test' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE '</p>' TO  wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE '</body>' TO  wa_objcont.
APPEND wa_objcont TO it_objcont.
 
 
wa_reclist-receiver = p_email.
wa_reclist-rec_type = 'U'.
wa_reclist-copy = ' '.
wa_reclist-blind_copy = ' '.
wa_reclist-no_forward = ' '.
wa_reclist-no_print = ' '.
APPEND wa_reclist TO it_reclist.
 
 
* Creation of the document attachment
wa_objhead = 'TEST.HTM'.
APPEND wa_objhead TO it_objhead.
 
wa_content = 'Please see the report in the attachment'.
APPEND wa_content TO it_content.
 
DESCRIBE TABLE it_content LINES fv_lines.
READ TABLE it_content INTO wa_content INDEX fv_lines.
wa_doc-doc_size = ( fv_lines - 1 ) * 255 + STRLEN( wa_content ).
wa_doc-obj_langu  = 'E'.
wa_doc-obj_name   = 'NOTIFICATION'.
wa_doc-obj_descr  = 'Event Notifier Progam Test'.
wa_doc-sensitivty = 'C'.
 
* Creation of the entry for the compressed document (MAIN)
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = fv_lines.
wa_objpack-doc_type = 'RAW'.
APPEND wa_objpack TO it_objpack.
CLEAR  wa_objpack.
 
* Creation of the entry for the compressed attachment
DESCRIBE TABLE it_objcont LINES fv_lines.
READ TABLE it_objcont INTO wa_objcont INDEX fv_lines.
wa_objpack-doc_size   = ( fv_lines - 1 ) * 255 + STRLEN( wa_objcont )
.
wa_objpack-transf_bin = 'X'.
wa_objpack-head_start = 1.
wa_objpack-head_num   = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num   = fv_lines.
wa_objpack-doc_type   = 'HTM' .
wa_objpack-obj_name   = 'Notification'.
wa_objpack-obj_descr  = 'Event Notifier Progam'.
APPEND wa_objpack TO it_objpack.
 
 
*& Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
     EXPORTING
          document_data              = wa_doc
          put_in_outbox              = 'X'
     TABLES
          packing_list               = it_objpack
          object_header              = it_objhead
          contents_bin               = it_objcont
          contents_txt               = it_content
          receivers                  = it_reclist
     EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
 
IF sy-subrc  0.
  WRITE:/ 'DOCUMENT NOT SENT'.
ENDIF.

23 REPLIES 23
Read only

Former Member
0 Likes
2,462

Hi Kishore,

Below is the sample code.


=====================================================================
           SEND AN EMAIL                                            *
=====================================================================
PARAMETERS: p_email LIKE pa0105-usrid_long
            DEFAULT 'eswarATxyz.com'.
*----------------------------------------------------------------------
*
*      D A T A   F O R   S E N D I N G   E M A I L
*----------------------------------------------------------------------
*
DATA: wa_objcont   LIKE solisti1,
      wa_reclist   LIKE somlreci1,
      wa_objpack   LIKE sopcklsti1,
      wa_objhead   LIKE solisti1,
      wa_content   LIKE solisti1,
      wa_doc       LIKE sodocchgi1.
 
DATA: it_objcont   TYPE STANDARD TABLE OF solisti1,
      it_reclist   TYPE STANDARD TABLE OF somlreci1,
      it_objpack   TYPE STANDARD TABLE OF sopcklsti1,
      it_objhead   TYPE STANDARD TABLE OF solisti1,
      it_content   TYPE STANDARD TABLE OF solisti1.
DATA: fv_lines TYPE i.
 
 
MOVE '<body>' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE '<p>' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE 'This is a test' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE '</p>' TO  wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE '</body>' TO  wa_objcont.
APPEND wa_objcont TO it_objcont.
 
 
wa_reclist-receiver = p_email.
wa_reclist-rec_type = 'U'.
wa_reclist-copy = ' '.
wa_reclist-blind_copy = ' '.
wa_reclist-no_forward = ' '.
wa_reclist-no_print = ' '.
APPEND wa_reclist TO it_reclist.
 
 
* Creation of the document attachment
wa_objhead = 'TEST.HTM'.
APPEND wa_objhead TO it_objhead.
 
wa_content = 'Please see the report in the attachment'.
APPEND wa_content TO it_content.
 
DESCRIBE TABLE it_content LINES fv_lines.
READ TABLE it_content INTO wa_content INDEX fv_lines.
wa_doc-doc_size = ( fv_lines - 1 ) * 255 + STRLEN( wa_content ).
wa_doc-obj_langu  = 'E'.
wa_doc-obj_name   = 'NOTIFICATION'.
wa_doc-obj_descr  = 'Event Notifier Progam Test'.
wa_doc-sensitivty = 'C'.
 
* Creation of the entry for the compressed document (MAIN)
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = fv_lines.
wa_objpack-doc_type = 'RAW'.
APPEND wa_objpack TO it_objpack.
CLEAR  wa_objpack.
 
* Creation of the entry for the compressed attachment
DESCRIBE TABLE it_objcont LINES fv_lines.
READ TABLE it_objcont INTO wa_objcont INDEX fv_lines.
wa_objpack-doc_size   = ( fv_lines - 1 ) * 255 + STRLEN( wa_objcont )
.
wa_objpack-transf_bin = 'X'.
wa_objpack-head_start = 1.
wa_objpack-head_num   = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num   = fv_lines.
wa_objpack-doc_type   = 'HTM' .
wa_objpack-obj_name   = 'Notification'.
wa_objpack-obj_descr  = 'Event Notifier Progam'.
APPEND wa_objpack TO it_objpack.
 
 
*& Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
     EXPORTING
          document_data              = wa_doc
          put_in_outbox              = 'X'
     TABLES
          packing_list               = it_objpack
          object_header              = it_objhead
          contents_bin               = it_objcont
          contents_txt               = it_content
          receivers                  = it_reclist
     EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
 
IF sy-subrc  0.
  WRITE:/ 'DOCUMENT NOT SENT'.
ENDIF.

Read only

Former Member
0 Likes
2,462

Hi,

We have a function module to attach the files in to the mail.

/IXOS/RSA_API_ALURL_TO_EMAIL

or

SO_DOCUMENT_SEND_API1

Regards,

Naresh

Read only

Former Member
0 Likes
2,462

Hi,

Below sample program might give you idea on sending HTML attachment.

TYPES: BEGIN OF t_sal_ord,
           vbeln TYPE vbeln_va,
           posnr TYPE posnr_va,
           auart TYPE auart,
           vkorg TYPE vkorg,
           matnr TYPE matnr,
         END OF t_sal_ord.

  DATA: i_sal_ord TYPE STANDARD TABLE OF t_sal_ord,
        i_header TYPE STANDARD TABLE OF w3head,
        i_fields TYPE STANDARD TABLE OF w3fields,
        i_html TYPE STANDARD TABLE OF w3html,
        wa_header TYPE w3head.

  DATA: i_fcat TYPE lvc_t_fcat,
        wa_fcat TYPE lvc_s_fcat.

  DATA: g_send_request TYPE REF TO cl_bcs,
        g_document TYPE REF TO cl_document_bcs,
        g_recipient TYPE REF TO cl_cam_address_bcs,
        g_cx_bcs TYPE REF TO cx_bcs,
        g_sent_to_all TYPE os_boolean.

  DATA: g_lines TYPE i,
        g_size TYPE so_obj_len.

  PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY,
              p_mailad TYPE ad_smtpadr OBLIGATORY.

START-OF-SELECTION.

  SELECT a~vbeln b~posnr a~auart a~vkorg b~matnr
    INTO TABLE i_sal_ord
    UP TO 20 ROWS
    FROM vbak AS a
    INNER JOIN vbap AS b
    ON a~vbeln  = b~vbeln
    WHERE a~vkorg = p_vkorg.

  wa_fcat-coltext = 'SalesOrd#'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'Item#'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'OrdType'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'Sales.Org'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'Material'.
  APPEND wa_fcat TO i_fcat.

  LOOP AT i_fcat INTO wa_fcat.
    wa_header-text = wa_fcat-coltext.

    CALL FUNCTION 'WWW_ITAB_TO_HTML_HEADERS'
      EXPORTING
        field_nr = sy-tabix
        text     = wa_header-text
        size     = '2'
        fgcolor  = 'BLACK'
        bgcolor  = 'VIOLET'
        font     = 'CALIBRI'
      TABLES
        header   = i_header.

    CALL FUNCTION 'WWW_ITAB_TO_HTML_LAYOUT'
      EXPORTING
        field_nr = sy-tabix
        size     = '2'
        fgcolor  = 'BLACK'
        bgcolor  = 'WHITE'
        font     = 'CALIBRI'
      TABLES
        fields   = i_fields.

  ENDLOOP.

  wa_header-text = 'Sales Order Details'.
  wa_header-size = '2'.
  wa_header-font = 'CALIBRI'.

  CALL FUNCTION 'WWW_ITAB_TO_HTML'
   EXPORTING
*     TABLE_ATTRIBUTES       = 'BORDER=1'
     table_header           = wa_header
*     ALL_FIELDS             = 'X'
    TABLES
      html                   = i_html
      fields                 = i_fields
      row_header             = i_header
      itable                 = i_sal_ord.

  TRY .

      g_send_request = cl_bcs=>create_persistent( ).

      g_document = cl_document_bcs=>create_document(
                    i_type  = 'RAW'
*                i_text  = i_content[]  " Body for Mail
                    i_subject = 'Sales Order Details' ).

      DESCRIBE TABLE i_html LINES g_lines.
      g_size = g_lines * 2 * 255.

      CALL METHOD g_document->add_attachment
        EXPORTING
          i_attachment_type    = 'HTM'
          i_attachment_subject = 'Sales Order Details'
          i_attachment_size    = g_size
          i_att_content_text   = i_html[].

      g_send_request->set_document( g_document ).

g_recipient = cl_cam_address_bcs=>create_internet_address( p_mailad ).

      g_send_request->add_recipient(
         EXPORTING
           i_recipient = g_recipient
           i_express = 'X' ).

      g_send_request->set_send_immediately( 'X' ).

      g_send_request->send(
          EXPORTING
            i_with_error_screen = 'X'
          RECEIVING
            result = g_sent_to_all ).

      COMMIT WORK.

    CATCH cx_bcs INTO g_cx_bcs.

      WRITE:/ g_cx_bcs->error_type.

  ENDTRY.

Kind Regards

Eswar

Read only

Former Member
0 Likes
2,462

Friends thanks a lot for everyone for replying me that quick.

But i have a problem still

Eswar u have used 'This is test code'

MOVE 'This is a test' TO wa_objcont.

APPEND wa_objcont TO it_objcont.

In this how will i pass my html document which has to be sent as a mail.

I am not able to pass my html document here.

Please suggest me wat i need to do

Thanks a lot for everyone. Do anyone got wat i asked for please let me know

Thanks in advance

kishore

Read only

Former Member
0 Likes
2,462

Hi friends,

Kindly help me on the issue i have asked in the previous thread.

I am not able to populate my internal table values to mail in html format

Please help me

Thanks in advance

kishore

Read only

0 Likes
2,462

Have you tried executing the example i have provided and check the output???

That doesnt return HTML attachment? Is your requirement for HTML attachment or Inline text?

~Eswar

Read only

Former Member
0 Likes
2,462

hi kishore,

U have all the values of the HTML in a Internal table right ?

CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = doc_chg

SENDER_ADDRESS = gv_sender

SENDER_ADDRESS_TYPE = gv_sender_type

COMMIT_WORK = 'X'

TABLES

PACKING_LIST = it_objpack

CONTENTS_TXT = it_objtxt

RECEIVERS = it_rec

in this

1) it_objtxt comtain all ur internal table HTML datas,

wa_objpack-transf_bin = space.

wa_objpack-head_start = 1.

wa_objpack-head_num = 0.

wa_objpack-body_start = 1.

wa_objpack-doc_type = 'HTM'.

describe table it_objtxt lines wa_objpack-body_num.

Append wa_objpack to it_objpack.

2 )it_objpack contain package list of ur data .

3) it_rec contains ur receviver list.

try this FM.

Read only

Former Member
0 Likes
2,462

Thanks for replying Rukmani and Eswar.

Rukmani wat u have given i have tried that before

see my code below

call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'

exporting

document_data = wa_doc_chng

put_in_outbox = 'X'

commit_work = 'X'

tables

packing_list = it_pcklst

object_header = it_objhead

contents_bin = it_xjcnt

receivers = it_reclst

exceptions

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

others = 99.

Here in it_xjcnt u mean to say i have all the values ?

And Eswar ur program is working fine..attachment like the hard coded value is getting displayed in mail

But in that Move i want my internal table to be populated..How will i populate that?

Kindly help me

Thanks

kishore

Read only

Former Member
0 Likes
2,462

Hi Kishore,

Refer to the thread below:

With luck,

Pritam.

Read only

Former Member
0 Likes
2,462

yes kishore,

Exactly Your CONTENTS_TXT should contain all ur values in html format which is in a

inernal table.

Read only

Former Member
0 Likes
2,462

I have done with wat u said rukmani

Still facing problem..

Like if i click on that content_bin its showing specified file not recognized while debugging.

Wat i have done so far is

I have done a BDC recording .. Now i am executing through call transaction only

While executing call transaction material will be created and those datas will be displayed as HTML format

But while sending that as mail its opening the web browser but nothing is inside ..zero bytes are transferred.

If i open that HTML attachment its showing message like 1022 bytes transferred but nothing is displayed

Wat may be the reason

Thanks for help

kishore

Read only

Former Member
0 Likes
2,462

Hi Eswar in your code

MOVE 'This is sample test' TO wa_objcont.

APPEND wa_objcont TO it_objcont.

This text is getting displayed in the html screen.

But i want my HTML datas to be displayed instead of that text what should i give to populate my HTML datas

Kindly help me

Thanks

kishore

Read only

Former Member
0 Likes
2,462

Hi kishore,

make sure your internal table contains some data, then take the example of Eswar Kanakanti and replace the following:


MOVE '<body>' TO wa_objcont.
APPEND wa_objcont TO it_objcont.
 
MOVE 'Line 1 of your internal table' TO wa_objcont.
APPEND wa_objcont TO it_objcont.

MOVE 'Line 2 of your internal table' TO wa_objcont.
APPEND wa_objcont TO it_objcont.

....
 
MOVE '</body>' TO  wa_objcont.
APPEND wa_objcont TO it_objcont.

Then execute and check output in Business Workplace.

Hope that helps,

R.

Read only

Former Member
0 Likes
2,462

Hi Rolf,

Now i got the internal table values in the html page.

I have used like this

loop at t_material_struct into w_material_struct.

MOVE '<body>' TO wa_objcont.

APPEND wa_objcont TO it_objcont.

MOVE '<p>' TO wa_objcont.

APPEND wa_objcont TO it_objcont.

MOVE w_material_struct-matnr TO wa_objcont.

APPEND wa_objcont TO it_objcont.

MOVE w_material_struct-meins TO wa_objcont.

APPEND wa_objcont TO it_objcont.

endloop.

Now values are populating but like text format its getting displayed.

I want in table format with table header fields. how do i do that?

Thanks for the help

kishore

Read only

Former Member
0 Likes
2,462

Hi kishore,

That table format u want in ouput while sending as a email right?

Then u can use some smartforms to display it as a table format...

U r getting the vaule from BDC and then passing it to the Email na,

before sending it to email, pass all the vaules to smart form and design it as table format in SF,

and then send it as emial.

Read only

0 Likes
2,462

Thanks Rukmani for giving this suggession.

But without going to smart forms is there any other alternative in my program itself to display the table format..Because i am not that good in smart forms.

I will try that but if ther is any other alternative please let me know

Read only

0 Likes
2,462

Hi Kishore,

Please check this link will help you.

http://sapprograms.blogspot.com/2008/08/alv-output-as-mail.html

if this link is not supported please delete it.

Read only

0 Likes
2,462

hi kishore,

this is the syntax for table creation ,

it will create heading and also the values inside jsut like a table,

row1,cell1 will create 1 row,,

in the same way u can create as many rows u want in ur display by passing the vaules to it...

<table border="1">

<tr>

<th>Heading</th>

<th>Another Heading</th>

</tr>

<tr>

<td>row 1, cell 1</td>

<td>row 1, cell 2</td>

</tr>

<tr>

<td>row 2, cell 1</td>

<td>row 2, cell 2</td>

</tr>

</table>

Read only

Former Member
0 Likes
2,462

Hi kishore,

please search internet for creating a table in HTML.

Basically you will need to experiment with the tags <TR> and <TD> for creating rows and columns.

Hope that helps,

R.

Read only

Former Member
0 Likes
2,462

Hi Kishore,

Plz check the below link..it will definately help u........

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5931ff64-0a01-0010-2bb7-ff2...

Read only

Former Member
0 Likes
2,462

Hi Friends,

Thanks for everyone who helped me in this issue.

I need ur help for one more thing.

Now i am able to send the mail as attachment.

But i want that mail to be sent as body of mail and not as attachment..

Help me friends.

Thanks in advance

kishore

Read only

0 Likes
2,462

Hi,

In the below example, you can send HTML data as inline text.

**** HTML mail as Inline Text
TYPES: BEGIN OF t_sal_ord,
        vbeln TYPE vbeln_va,
        posnr TYPE posnr_va,
        auart TYPE auart,
        vkorg TYPE vkorg,
        matnr TYPE matnr,
      END OF t_sal_ord.

DATA: i_sal_ord TYPE STANDARD TABLE OF t_sal_ord,
      i_header TYPE STANDARD TABLE OF w3head,
      i_fields TYPE STANDARD TABLE OF w3fields,
      i_html TYPE STANDARD TABLE OF w3html,
      wa_header TYPE w3head.

DATA: i_fcat TYPE lvc_t_fcat,
      wa_fcat TYPE lvc_s_fcat.

DATA: g_send_request TYPE REF TO cl_bcs,
      g_document TYPE REF TO cl_document_bcs,
      g_recipient TYPE REF TO cl_cam_address_bcs,
      g_cx_bcs TYPE REF TO cx_bcs,
      g_sent_to_all TYPE os_boolean.

PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY,
            p_mailad TYPE ad_smtpadr OBLIGATORY.

START-OF-SELECTION.

  SELECT a~vbeln b~posnr a~auart a~vkorg b~matnr
      INTO TABLE i_sal_ord
      UP TO 20 ROWS
      FROM vbak AS a
      INNER JOIN vbap AS b
      ON a~vbeln  = b~vbeln
      WHERE a~vkorg = p_vkorg.

  wa_fcat-coltext = 'SalesOrd#'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'Item#'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'OrdType'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'Sales.Org'.
  APPEND wa_fcat TO i_fcat.

  wa_fcat-coltext = 'Material'.
  APPEND wa_fcat TO i_fcat.

  LOOP AT i_fcat INTO wa_fcat.
    wa_header-text = wa_fcat-coltext.

    CALL FUNCTION 'WWW_ITAB_TO_HTML_HEADERS'
      EXPORTING
        field_nr = sy-tabix
        text     = wa_header-text
        size     = '2'
        fgcolor  = 'BLACK'
        bgcolor  = 'VIOLET'
        font     = 'CALIBRI'
      TABLES
        header   = i_header.

    CALL FUNCTION 'WWW_ITAB_TO_HTML_LAYOUT'
      EXPORTING
        field_nr = sy-tabix
        size     = '2'
        fgcolor  = 'BLACK'
        bgcolor  = 'WHITE'
        font     = 'CALIBRI'
      TABLES
        fields   = i_fields.

  ENDLOOP.

  wa_header-text = 'Sales Order Details'.
  wa_header-size = '2'.
  wa_header-font = 'CALIBRI'.

  CALL FUNCTION 'WWW_ITAB_TO_HTML'
  EXPORTING
*     TABLE_ATTRIBUTES       = 'BORDER=1'
    table_header           = wa_header
*     ALL_FIELDS             = 'X'
  TABLES
    html                   = i_html
    fields                 = i_fields
    row_header             = i_header
    itable                 = i_sal_ord.

  TRY .

      g_send_request = cl_bcs=>create_persistent( ).

  g_document = cl_document_bcs=>create_document(
        i_type          = 'HTM'
        i_subject       = 'Sales Order Details'
        I_TEXT          = i_html ).

      g_send_request->set_document( g_document ).

  g_recipient = cl_cam_address_bcs=>create_internet_address( p_mailad
).

      g_send_request->add_recipient(
      EXPORTING
        i_recipient = g_recipient
        i_express = 'X' ).

      g_send_request->set_send_immediately( 'X' ).

      g_send_request->send(
      EXPORTING
        i_with_error_screen = 'X'
        RECEIVING
        result = g_sent_to_all ).

      COMMIT WORK.

    CATCH cx_bcs INTO g_cx_bcs.

      WRITE:/ g_cx_bcs->error_type.

  ENDTRY.

Rather than worrying about the hard code stuff that i have done, try to take it as reference from where you have data in internal table, convert the data to HTML format and then send mail as inline text.

~Eswar

Read only

Former Member
0 Likes
2,462

thanks