Text Elements So10

Share Embed Donate


Short Description

Download Text Elements So10...

Description

Creating Email Content Using SO10 Objects and Text Symbols

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.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

Creating Email Content Using SO10 Objects and Text Symbols

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

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

Creating Email Content Using SO10 Objects and Text Symbols

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

The text symbol can be created as below.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

Creating Email Content Using SO10 Objects and Text Symbols

 

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.

For example: Dear Supplier – English Sehr geehrter Lieferant – German

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 4

Creating Email Content Using SO10 Objects and Text Symbols

Create the SO10 Object 

Go to transaction SO10. Enter text name and language. Maintain Text in English.

Enter Email Text and Save it



Go to transaction SO10. Enter text name and language. Maintain Text in German

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 5

Creating Email Content Using SO10 Objects and Text Symbols

. Enter Email Text and Save it

 

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.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 6

Creating Email Content Using SO10 Objects and Text Symbols

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.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 7

Creating Email Content Using SO10 Objects and Text Symbols

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 8

Creating Email Content Using SO10 Objects and Text Symbols

Advantages of SO10 objects SO10 is a preferred option as compared to text symbols    

Large amount of text can be stored in SO10 objects. The SO10 objects can be maintained in required languages easily. SO10 objects are easy to maintain. Since they can be separately modified using the SO10 transactions. Text elements may disturb the formatting of email text when language changes. When Language is Chinese the spacing between words must be maintained properly. Incase we use text symbols and try to concatenate two words separating single space. The same when converted to Chinese is difficult to read. For example,  When the language is English Dear Sir, The Purchase Order is created in the system. Please take necessary action Thanks and Regards, Supplier Portal  When the language is Chinese

亲爱的主席先生, 采购订单是在系统中创建。请采取必要行动 谢意和慰问, 供应商门户

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 9

Creating Email Content Using SO10 Objects and Text Symbols

Transport Requests of SO10 objects  

When you save the SO10 objects, no transport request is created. We have to create a Transport request for it separately. This method is is described below Go to SE10, Click on create

Create Workbench request

Give Short description

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 10

Creating Email Content Using SO10 Objects and Text Symbols

A Transport request number is generated- Main Request and it contains a sub task.

Click on sub task, and then go to Request/Task in Menu-> Change type

Select Development/Correction

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 11

Creating Email Content Using SO10 Objects and Text Symbols

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.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 12

Creating Email Content Using SO10 Objects and Text Symbols

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.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 13

Creating Email Content Using SO10 Objects and Text Symbols

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 14

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF