2017 Jan 12 5:39 AM
Hi Experts,
I have a requirement where I need to Display my ABAP Report Selection Screen parameters text in English language only. Even if the user logins using login Language: GE or FR and executes the report, all the selection text in the selection screen should show in English. Now if I login using different language sayin 'DE' the selection screen is showing as below
The client uses at-least 6 different languages to login and execute the report, irrespective of the Logon Language the report should show the Selection Screen Input Text field in English.
How can I achieve this? I googled and found the "SET LANGUAGE" but it is not working. Can anyone kindly suggest how to solve this issue
Regards
GopaKumar
2017 Jan 12 12:55 PM
Hi Gopa,
In event LOAD-OF-PROGRAM just call SET LOCALE LANGUAGE with necessary language. It's works.
LOAD-OF-PROGRAM.
SET LOCALE LANGUAGE langu.
Best regards,
Kateryna
2017 Jan 12 10:17 AM
2017 Jan 12 11:45 AM
Hi,
As Horst said, you cannot use SET LANGUAGE for the selection text.
But you can make a program that call the transaction and use SET LOCALE LANGUAGE first.
Something like that:
SET LOCALE LANGUAGE p_langu.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
EXPORTING
tcode = p_tcode.
2017 Jan 12 11:53 AM
Are you sure?
SET LOCALE LANGUAGE changes the text environment only for the current internal session and calling a program leaves this session. For the new internal session the logon language is relevant again and that cannot be changed.
2017 Jan 12 2:03 PM
Yes sure, you don't leave the session with "new task".
A new window is opened in the selected language but it doesn't change the current session language.
2017 Jan 12 3:13 PM
2017 Jan 12 4:17 PM
Amazing, your'e explanation is not really correct, since with STARTING NEW Task we open an RFC session (which in fact is an own user session), nevertheless you're right regarding the behavior, ugh. Seems that the RFC session runs under a logon language that is inherited from the caller's text environment (sy-langu).
Clearly a gap in the documentation!
I'll have to contact my RFC buddies about that and then enhance the docu.
Nice finding!
2017 Jan 13 11:24 AM
2017 Jan 12 12:55 PM
Hi Gopa,
In event LOAD-OF-PROGRAM just call SET LOCALE LANGUAGE with necessary language. It's works.
LOAD-OF-PROGRAM.
SET LOCALE LANGUAGE langu.
Best regards,
Kateryna
2017 Jan 16 6:46 AM
This should be the best solution to this specific question (if it is your own program and you can change the code).
Interesting enough it works for selections screens (also in front of CALL SELECTION-SCREEN) but not for normal dynpros (in front of CALL SCREEN), sigh ...
2017 Jan 12 2:33 PM
Hi Gopa,
You can maintain translation using text elements.
Maintain same english langugae text for DE or any other language then this problem wont come.
Thanks,
Gaurav Phadnis
2017 Jan 12 2:37 PM
2017 Jan 12 9:18 PM
Maybe you can use the secondary language (profile parameter 'zcsa/second_language') ? (which is also the first hint of documentation of SET LANGUAGE)
The original language of the program should be defined as this secondary language. It works well for selection texts as long as the text pool does not exist in the user's logon language (to make sure, look at table REPOTEXT). More info in note 1303261 - ABAP text pool and selection texts.