Start of Content Area

Procedure documentation Creating ABAP Programs for Maintaining Language-Dependent Texts  Locate the document in its SAP Library structure

Use

To make Web applications independent from static texts, you can maintain and translate the text in an ABAP table. The Web application is then filled with the corresponding texts according to the logon language.

Prerequisites

You are in the ABAP Editor (transaction SE38)

Procedure

...

       1.      In the Program field enter the name of the program, for example ZHTML_TEXTS and in the subobject screen, select Source Code.

       2.      Choose This graphic is explained in the accompanying text (Create). You reach the ABAP: Program Properties <Name of Program> Change screen.   

       3.      Enter the title of the program, for example Web Application Texts.

       4.      Under Type in the Attributes field, choose Executable Program and then Save. The Create Object Catalog Entry dialog box appears.  

       5.      In the Attributes field under Package enter $TMP and save the program as a Local Object.

You have created an ABAP report called ZHTML_TEXTS

       6.      In the menu bar choose Goto Text Elements Text Symbols. You reach the ABAP Text Elements: Display Text Symbols Language English screen. Choose This graphic is explained in the accompanying text (Create <-> Change).

Enter your texts in the empty table.

...

                            a.      In the Sym field enter the numerical key of the new text element (0-999), for example, 001.

                            b.      In the Text field, enter the name of the text element, for example, Credit Memos.

The dLen field is filled automatically with the actual length of the text you entered, for example, 12 in the case of Credit Memos.

                            c.      In the mLen field, enter the maximum length of the text field.

Note

If the maximum length of the text field (nLen) is smaller than the actual length of the text field (dLen), the system asks you whether you want the text to be shortened to the maximum length.

                            d.      When you have entered all your texts, choose This graphic is explained in the accompanying text (Activate). You reach the ABAP Text Elements: Change Text Symbols Language English screen.

       7.      In the menu bar of the ABAP Text Elements: Change Text Symbols Language English, choose Goto Translation.  You reach the Target Language for Translation screen.

...

                            a.      Select the target language, into which you want to translate the texts, for example, DE and choose This graphic is explained in the accompanying text (Continue). You reach the Translation: ABAP Text Pool: <Name of Program> ($) from Language <X> to <Y>, on which your texts and translation proposals from the ABAP text pool are displayed. For example, “Credit Memos” is translated as “Gutschriften”. You can transfer the proposals or edit them as you wish.

Background documentation

The program generated the text translations from the ABAP text pool if corresponding entries are available there. For texts without proposals you have to enter the translation yourself.

                            b.      Choose Save.

Result

In the Web template you can select this program text using the fourth option of the text input dialog. 

 

 

 

 

End of Content Area