Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Display Selection Text in English Language Only if my Logon Language is not English?

former_member311223
Participant
6,117

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

1 ACCEPTED SOLUTION

katvovk
Explorer
1,825

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

12 REPLIES 12

retired_member
Product and Topic Expert
Product and Topic Expert
1,825

See the second hint in the documentation of

SET LANGUAGE

Former Member
1,825

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.

retired_member
Product and Topic Expert
Product and Topic Expert
1,825

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.

1,825

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.

retired_member
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,825

Hmm, but the CALL TRANSACTION/SUBMIT? Have to check it ...

retired_member
Product and Topic Expert
Product and Topic Expert
1,825

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!

retired_member
Product and Topic Expert
Product and Topic Expert
1,825

I put it into a blog ...

katvovk
Explorer
1,826

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

retired_member
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,825

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 ...

Former Member
0 Kudos
1,825

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

Former Member
0 Kudos
1,825

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.te1.pngte2.png

Please find attached document for same.

Thanks,

Gaurav Phadnis

Sandra_Rossi
Active Contributor
0 Kudos
1,825

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.