Skip to Content
author's profile photo Former Member
Former Member

Change logon language in runtime

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 02, 2008 at 05:30 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Posted on Jun 02, 2008 at 04:48 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 02, 2008 at 04:49 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2008 at 06:50 PM

    Many thanks for your help.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.