2013 Apr 04 7:49 AM
Hello Colleague,
I am looking to manupulate the logon language at runtime.
The requirement is such that irrespective of logon language, I want to use the text elements in English Language for just a particular action. In other actions the texts should be translated based on the Logon Language.
I tried using SET LOCALE LANGUAGE 'E' and access the text element, but the texts are still translation in logon language. And when i check SY-LANGU in the debugger, it shows 'E' which means that the command changed the language correctly.
Am i doing something wrong, or cna anybody suggest which is the text element not following sy-langu.
Thanks in advance.
Regards,
Piyush Deora
2013 Apr 04 8:25 AM
I am not sure if you can change the language of text element at runtime ... as a work-around you can declare another text-element in 'EN' and use this for the specific task.
2013 Apr 04 8:51 AM
Hello,
Text element can't be translated at runtime. You can't edit text element at runtime. So, translation is not possible at runtime.
Thanks,
Abhijit
2013 Apr 04 8:58 AM
Hi,
Thanks for your reply.
The idea here is not to translate the text at runtime, but manupulate the language and expect the text element to be retrieved in the changed language.
Is this also not possible?
Thanks and Regards,
Piyush
2013 Apr 04 9:43 AM
Hi Piyush,
What ever the text that you want to manipulate at runtime, you can do it in the below mentioned method.
1. Make the text element you want to manipulate as a Text Symbol in the Program
2. Use the below read statement. Change the language for which you want instead of Sy-Langu.
READ TEXTPOOL sy-repid INTO tl_textpool LANGUAGE sy-langu.
Please find the type reference of TL_TEXTPOOL below.
Data : tl_textpool TYPE TABLE OF textpool.
Check the technical/F1 help available on the above mentioned statement.
Hope this helps you...
2024 May 24 3:58 AM - edited 2024 May 24 4:00 AM