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

Change logon language in runtime

Former Member
0 Likes
3,218

Hi All,

I would like to know if there is any statement to change the logon language in runtime. I have a program that execute standard programs, i am log in in english and before execute the standard program i want to change the logon language to italian to see the vat code text in italian.

Many thanks.

Hi All,

I would like to know if there is any statement to change the logon language in runtime. I have a program that execute standard programs, i am log in in english and before execute the standard program i want to change the logon language to italian to see the vat code text in italian.

Many thanks.

5 REPLIES 5
Read only

amit_khare
Active Contributor
0 Likes
1,766

You can always set the value for SY-LANGU field during runtime and also take a look to SET COUNTRY statement.

Read only

Former Member
0 Likes
1,766

Hi,

You can use this code:

DATA: v_lang TYPE tcp0c-langu,

v_cntry TYPE tcp0c-country,

v_mod TYPE tcp0c-modifier.

GET LOCALE LANGUAGE v_lang COUNTRY v_cntry MODIFIER v_mod.

SET LOCALE LANGUAGE 'IT' COUNTRY V_cntry.

YOUR CODE

SET LOCALE LANGUAGE v_lang COUNTRY V_cntry.

regards

Sandeep Reddy

Read only

Former Member
0 Likes
1,766

Hi,

Many thanks for your quick response, it's partially working...have a look of my code.

SET LOCALE LANGUAGE 'I' COUNTRY 'IT'.

********************************************************+
    submit (g_program_name)
    via selection-screen
    and return.

After the statetmetn SET sy-langu is changed however after the submit the program g_program_name has the original logon language. Any idea?.

Many thanks again.

Edited by: Miguel Torres on Jun 2, 2008 1:31 PM

Read only

0 Likes
1,766

This is because the SET LOCALE command sets the text environment (i.e. SY-LANGU) for the current internal session only. The SUBMIT .. AND RETURN command executes the called program in a new internal session resetting sy-langu back to login language.

Read only

Former Member
0 Likes
1,766

Many thanks for your help.