Thursday, March 30, 2017

Steps to Translate OTR Texts in Webdynpro ABAP

By Bala Baskaran.S, Kaar Technologies
Scenario:
The Online Text Repository (OTR) is a central storage area for texts. Different kinds of texts can be defined in the OTR: OTR Long Texts, OTR Short Texts. In WebDynpro context only OTR Short Texts should be used.
In this tutorial we will see how to create OTR Short Texts, bind them to WebDynpro view UI elements and how to make them translatable.
Steps to Create OTR Text:
Ø  Create OTR Text from WebDynpro ABAP View Layout following the menu path Gotoà Online Text Repository Browser.
Ø  W e can also create OTR Texts using the Transaction Code SOTR_EDIT.
Steps to use OTR Short Text as the value of a UI element Property:
Ø  Bind the text property of Label UI element with the corresponding OTR text created for Name and Age.
Ø  To bind the OTR Text to the label UI element, press the value help button in the properties value field. The OTR browser will appear showing all texts of your package and of the SOTR_VOCABULARY_BASIC package.
Ø  Select the text from the list and choose enter.
Ø  The OTR directive for using this text will be automatically entered in the Properties value field.
OTR Directive: $OTR:<package>/<alias>.
Steps to translate the OTR Texts:
Ø  Transaction Code: SOTR_EDIT
Ø  Select the Language in which the OTR text was created.
Ø  Enter the Alias Name and click “Display” button

Ø  Choose the menu Edit -> Context -> Change
Ø  Click the “Close” button in the pop up window without inputting Country or Industry.
Ø  Select the Language in which you need to translate in the Language dropdown.
Ø  In the Text input field overwrite the text in your target language.
Ø  Click “Save” button.
Ø  Now Text in both the languages English and German will be maintained with the same Alias Name.
Output:
If SAP-language in URL is EN then text in English will be displayed, if sap-language is DE then text in German will be displayed.
English
German

No comments:

Post a Comment

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...