Application Development and Automation 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: 
Read only

SET LOCALE LANGUAGE

stephan_marx
Explorer
0 Likes
5,371

Hello all,

I have a problem with SET LOCALE LANGUAGE.

I need to change SY-LANGU to get another text with the MESSAGE command, like this:

SY-LANGU is 'D'.

set locale language 'E'.

message id ... type ... number ... into ...

set locale language space.

That doesn't work. In debugger SY-LANGU has changed to english, but the MESSAGE command throws the german text.

Yes, the english text exists in the message class.

Any ideas ???

Thanks a lot for your help,

Stephan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,992

try to maintain the tranlation for the message using se91 transaction.

in the menu choose go to and select the message and click the transalation.

that will serve your purpose...

vijay

try to maintain the tranlation for the message using se91 transaction.

in the menu choose go to and select the message and click the transalation.

that will serve your purpose...

vijay

8 REPLIES 8
Read only

Former Member
0 Likes
2,993

try to maintain the tranlation for the message using se91 transaction.

in the menu choose go to and select the message and click the transalation.

that will serve your purpose...

vijay

Read only

Former Member
0 Likes
2,992

give the message class in se91 and

select message and GOTO ->TRANSALTION.

it will ask you to maintain the translation from which lang to which lang.

Read only

Former Member
0 Likes
2,992

U have set the language to EN.

In the message class as specified the english text exists. While displaying the text in where condition try to use langu = EN.

Also, may be u have logon in GE language. From System --> User Profile --> OWN DATA...check here whether the Language is other than English. ty to specify English in this column.

Read only

stephan_marx
Explorer
0 Likes
2,992

Thanks a lot.

But this doesn't solve my problem. These points are all done before trying to change the language. The text is translated in SE91 and SY-LANGU has changed to ENGLISH.

The only problem is, that the MESSAGE command ignores this and shows furthermore the german text.

Greetings,

Stephan

Read only

Former Member
0 Likes
2,992

See the following help on SET LOCALE LANGUAGE and see of these system parameters are set appropriately.

<i>If the boolean SAP profile parameter abap/set_text_env_at_new_mode is set to 0 (the default is 1), the text environment is not set according to the language of the active user when a new internal session is opened, but according to the language of the application server (which is determined by the SAP profile parameter zcsa/system_language). Resetting the text environment with SET LOCALE LANGUAGE SPACE restores the text environment for the language of the application server.

If the boolean SAP profile parameter install/collate/active is set to 0 (the default is 1), SET LOCALE has no effect at all; furthermore, the text environment remains unchanged, even when a new internal mode is opened, and the locale category LC_COLLATE is not set at all by the SAP kernel. Accordingly, the SORT ... AS TEXT and CONVERT TEXT statements then also have no effect.</i>

Read only

stephan_marx
Explorer
0 Likes
2,992

Hello Srinivas,

I can't find this profile parameters in my installation using transaction RZ10, so I have to ask my admin tomorrow.

Thanks,

Stephan

Read only

stephan_marx
Explorer
0 Likes
2,992

Hi there,

The MESSAGE command seems to handle the login language every time and ignores sy-langu.

I found the functions CULI_GET_MESSAGE and CUTC_GET_MESSAGE, which do exactly what I want.

Thanks a lot,

Stephan

Read only

0 Likes
2,992

Thanks Stephen for sharing this with us. May be you can also look at MESSAGE_PREPARE. I was thinking that you wanted it by using SET LOCALE.

Srinivas

Message was edited by: Srinivas Adavi