SAPConnect: Email with Formatting

By | September 15, 2008 | Formatting | 10,717 | 1

Sometimes, it is necessary to send emails with the Formatting when we are sending the email using SAPConnect.

Formatting is necessary to display proper information. For example, Information is formatted repesentation of the Data. If no formatting, no information. Same way, if we send the unformatted contents, than it will make wrong impression.

In ABAP also, using the SAPConnect function modules we can send the highly formatted contents in the Message body. For this purpose, we need to use HTML. HTML will represent our data in the formatted way on receipient side.

While filling up the Body of the message (CONTENTS_TXT), we fill it up with the HTML code. After filling up the content, we need to tell the system that we are sending the HTML data instead of the pure text. Generally, we specify the DOC_TYPE in PACKING_LIST as the TEXT. But for this purpose, we will pass HTML since our data is in HTML. Than we will pass all the information to the Function Module SO_NEW_DOCUMENT_ATT_SEND_API1.

Code Snippet to send the Email with Formatting: Email with Formatting code snippet
( I am not able to post the code in this blog because it contains the HTML tags and Blogger engine doesnot allow me to add it here).

This code snippet will generate the output:

For HTML tags you can visit: HTML Tag List

Like It? Share!!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{273 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 273 articles.

Load comments

1 Comment

  • Anonymous

    Very helpful thank you.

Comments on this Post are now closed. If you have something important to share, you can always contact me.

You seem to be new here. Subscribe to stay connected.