Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Applies to:

SAP Netweaver, ABAP, Email, standard text

Summary

This tutorial will take you step by step process to develop ABAP program which will send E mail in HTML format. The email body content is maintained separately in Std. text object; so that it can be maintained independent of Program.

With this; email is generated in HTM format which is more asthetic than a RAW format. Email body can be formatted with all rich text properties like bold, italic fonts, text sizes, tables, etc.

Additionally email body content can be changed without changing the ABAP program; since it is maintained separately in standard text. Program modularization & ease of maintenance can be achieved.

Author:        Amit Talekar

Company:   Capgemini India

Created on: 23rd July 2012

Create Standard text object

Create standard text object from /SO10

     Maintain text with HTML tags

     In this example HTML tags for table structure are maintained.

    For dynamic contents; program global variables are used

    Read std. text in ABAP Program

     Call FM READ_TEXT


     Using Standard Function module READ_TEXT read Std. text in the program.

     READ_TEXT FM returns LS_HEAD & LT_LINES.

     LS_HEAD contains Header data and LT_LINES contains text maintained in the object.

     Call FM TEXT_SYMBOL_REPLACE

     Call FM to replace variables in std. text with actual values.

    

     FM TEXT_SYMBOL_REPLACE returns LT_LINES with values (passed as program global variables).

    Send E-mail

     Prepare E-mail subject & E-mail body

     Call Std. FM to send E-mail in HTML format

   Check the output in MS-Outlook

10 Comments