Get OTR Text into string
The Online Text Repository (OTR) is a central storage location for texts and is used widely for labels and texts that need to be translatable.
Transaction SOTR_EDIT can be used in order to Create, Update or Display OTR texts and assign them an Alias which will be the key to finding the text in any language. The text value of the alias can be retrieved in ABAP by using the method below
data(lv_demo_text) = cl_wd_utilities=>get_otr_text_by_alias( 'ZMB/DEMO_TEXT' ).
The get_otr_text_by_alias() method also takes an optional parameter “language” in case the developer needs to retrieve the text in language different than the logon one.