Professional Documents
Culture Documents
Creating Email Content Using SO10 Objects and Text Symbols: Applies To
Creating Email Content Using SO10 Objects and Text Symbols: Applies To
Applies to:
SAP ECC 6.0. For more information, visit the ABAP homepage.
Summary
The article describes the benefits of SO10 objects in comparison to text symbols. Author: Bijal Parmar
Company: Larsen & Toubro Infotech Limited Created on: 9 September 2009
Author Bio
Bijal Parmar is a Software Consultant in Larsen & Toubro Infotech Limited. She has three years of SAP experience. She has worked extensively in ABAP, APO, Workflow and Visual Composer.
Table of Contents
Overview....................................................................................................................................................... 3 Text Symbols ................................................................................................................................................ 3 SO10 ............................................................................................................................................................ 4 Create the SO10 Object............................................................................................................................. 5 Reading the SO10 Object .......................................................................................................................... 7 Advantages of SO10 objects ......................................................................................................................... 9 Transport Requests of SO10 objects ........................................................................................................... 10 Summary ................................................................................................................................................. 12 Related Content .......................................................................................................................................... 13 Copyright .................................................................................................................................................... 13
Overview
The article describes the benefits of using the SO10 objects. Mostly, we tend to use text symbols for the following Business Scenarios: 1. Display Messages to user 2. Send Emails from the program. The text of message or email content is stored in text symbols. The body of the email is coded using the text symbols or SO10 objects. Advantage is: It prevents hard coding of text in the code. Maintain text at a central location Programs can be made language independent Translations can be maintained for the target languages
Text Symbols
Text Symbols can be created in all programs. A text symbol is a named data object that is generated when you start the program from the texts in the text pool of the ABAP program. It always has the data type C. Its field length is that of the text in the text pool. Text symbols, along with the program title, list headings, and selection texts, belong to the text elements of a program. Text elements allow you to create language-independent programs. Any text that the program sends to the screen can be stored as a text element in a text pool. Different text pools can be created for different languages. When a text element is changed or translated, there is no need to change the actual program code. Text elements in an ABAP program are stored in the ABAP Editor
Note: The maximum length can be set to 132 characters only. For creating the email content, we concatenate the text symbols and fill the internal table to email sending function module.
SO10
Using transaction SO10, we can create objects to maintain texts. Unlike text symbols, SO10 objects do not have a maximum length defined. Hence it is possible to maintain text in form of paragraphs too. When sending emails programmatically, there is a need to create the email content. The email content must be language independent. Hence it is recommended to avoid using hard coding in the code. Based on the login language the email must be sent in the same language.
Create the SO10 Object Go to transaction SO10. Enter text name and language. Maintain Text in English.
Go to transaction SO10. Enter text name and language. Maintain Text in German
Thus we have created the SO10 objects. Thus the entire email content can be maintained here. Note: When you save it, no transport request is created. We have to create a Transport request for it separately. This method is covered in later sections.
Reading the SO10 Object Once you have created the SO10 object, we can call it in the program using the function module READ_TEXT. Input is: ID: ST -> Standard text LANGUAGE: User login language NAME: SO10 object name OBJECT: TEXT
Output: The lines table is populated with text. Pass this text to the internal table of Email sending function module.
A Transport request number is generated- Main Request and it contains a sub task.
Select Development/Correction
Now, double click on Main Request, Add the entry as given below.
Summary Thus, we have understood the SO10 transaction. The benefits of using the SO10 objects and also the process of creating transport requests for it.
Related Content
https://wiki.sdn.sap.com/wiki/display/ABAP/Long+Texts http://help.sap.com/saphelp_nw04/helpdata/en/e3/9609f6eb0711d194d100a0c94260a5/frameset.htm For more information, visit the ABAP homepage.