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: 

sample program to send email in Internal table format using HTML

0 Kudos

i Have internal table

Employee Employee Name City state

123 Test123 CAL CA

124 Test124 SHL SH

135 Test135 PLAIN NJ

Like this I want in table format Believe it works in HTML format, any sample code for the same is appreciated.

9 REPLIES 9

abo
Active Contributor

Haven't tried it but this looks like it could be helpful to your case... yes, basically you need to format the contents yourself, either directly or with the assistance from such a library

0 Kudos

Thanks @andrea, looks like a Raw one, will see if I dont find anything

Sandra_Rossi
Active Contributor

Simple HTML:

<table border=1 cellspacing=0>
<tr><th>Employee number</th><th>Name</th></tr>
<tr><td>123</td><td>Test123</td></tr>
</table>

shivamshukla12
Contributor
0 Kudos

check this link for answer- Answer

0 Kudos

Awesome Rossi, thank you.

raymond_giuseppi
Active Contributor

matt
Active Contributor

Wow.

  1. OCCURS 0.
  2. Using function modules for string handling that are now built into ABAP.
  3. FORMS.
  4. FM SO_NEW_DOCUMENT_ATT_SEND_API1 instead of the CL_BCS classes
  5. FM GUI_UPLOAD - obsolete for years


This is not modern ABAP. Some of it is more than 20 years out of date. I'm guessing you got this wonderful snippet from either google or 1994.

shivamshukla12
Contributor
0 Kudos

hey don’t worry ,


here comes the new flavour —


cl_document_bcs=>create_document(
 i_type ='HTM'
i_hex = lt_body_hex
i_subject = lv_mail_subject )

IF NOT lv_sender_email IS INITIAL.
          lo_sender = cl_cam_address_bcs=>create_internet_address( 
                    i_address_string = lv_sender_email ). 

ENDIF.



Further you can use send mail method from cl_bcs Abap.

That’s not my code in the end I gave reference — Just gave the idea in many SAP system in standard this so_document_send_api in use still

Thanks ,

Shivam

sandra.rossi used cell collapse, Screen looks much better