Creating ABAP Programs for Maintaining Language-Dependent Texts
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
- In the Program field enter the name of the program, for example ZHTML_TEXTS and in the subobject screen, select Source Code.
- Choose
(Create). You reach the ABAP: Program Properties <Name of Program> Change screen. - Enter the title of the program, for example Web Application Texts.
- Under Type in the Attributes field, choose Executable Program and then Save. The Create Object Catalog Entry dialog box appears.
- 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
- In the menu bar choose Goto → Text Elements → Text Symbols. You reach the ABAP Text Elements: Display Text Symbols Language English screen. Choose
(Create <-> Change).
Enter your texts in the empty table.
- In the Sym field enter the numerical key of the new text element (0-999), for example, 001.
- 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.
- In the mLen field, enter the maximum length of the text field.
- When you have entered all your texts, choose
(Activate). You reach the ABAP Text Elements: Change Text Symbols Language English screen.
- 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.
- Select the target language, into which you want to translate the texts, for example, DE and choose
(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.
- Choose Save.
- Select the target language, into which you want to translate the texts, for example, DE and choose
Result
In the Web template you can select this program text using the fourth option of the text input dialog.