Skip to Content
Technical Articles
Author's profile photo Andrey Amelin

SAP Logon online language switcher

Problem

When you working at international multi-language SAP project – you may need to perform testing a lot of functionality at SAP Logon in different languages. Standard SAP approach – to change SAP GUI (SAPLogon) language you need to log-off and log-on again with other language.

IMO, it takes a lot of time to perform a simple action to change language, so, let’s try to make a simple functionality to save our time.

Solution

Concept – create a custom tcodes for online switching language. So, these tcodes should call ABAP program with functionality:

  • Set locale language:
SET LOCALE LANGUAGE 'E'.
  • Call a new session with new language via:
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'LANGUAGE'
  • Close the current session.

 

Implementation example:

  • Create a new program, for example ZBC_LANG
REPORT ZBC_LANG.
CASE sy-tcode.
  WHEN 'ZEN'. SET LOCALE LANGUAGE 'E'.
  WHEN 'ZRU'. SET LOCALE LANGUAGE 'R'.
  WHEN 'ZPT'. SET LOCALE LANGUAGE 'P'.
* WHEN 'Zxx'. SET LOCALE LANGUAGE 'x'.
  WHEN OTHERS.
    exit.
ENDCASE.

CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'LANGUAGE'
  EXPORTING
    tcode = 'SESSION_MANAGER'.
  • Create a list of transactions with names like Z<language> at SE93, for example ZENZPTZRU etc.

se93%20zEN

How it works

Just put in tcode field “/nz<language>” (i.e. /nzEN, /nzPT etc).

System changes current language without logging-off.

Lang%20switcher

Lang switcher

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Hi Andrey, I'm a little confused why this is necessary? Can you explain further?

      There is a standard feature in the SAP Fiori launchpad of SAP S/4HANA to immediately change the logon language of any user using the Settings > Language and Region.

      This is a huge timesaver for projects I'm involved in  - some of which have up to 8 languages running currently all of which have to be tested.

      And of course it's yet another good reason for shifting to the Fiori launchpad.

      Immediate%20change%20of%20logon%20language%20via%20Fiori%20settings

      Immediate change of logon language via Fiori settings

       

       

      Author's profile photo Andrey Amelin
      Andrey Amelin
      Blog Post Author

      Hi Jocelyn Dart

      Yes, you're right, at FIORI you may change language by standard feature, but at SAP Logon for win and java, as I know, you can't do it in simple way.
      So, this small tool may be helpful for those who have not yet switched to FIORI.
      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Ok hmmm.. I feel that would be helpful to state in your introduction?

      So essentially this is a SAP Business Suite work around that still works in SAP S/4HANA, for those who want to work in their SAP S/4HANA system as if it was still SAP Business Suite.

      I find it fascinating ...  as this sort of development is kind of a tax for avoiding innovation.

       

      Author's profile photo Matthew Billingham
      Matthew Billingham

      At the time of writing, all my employer's customers use SAPGui - even if it's only at the backend.

      We develop in English and translate into German. This little tool may be quite helpful to us.

      I think the ABAPGit client also uses the same technique when it needs to switch language.

      Author's profile photo Andrea Borgia
      Andrea Borgia

      I got the email notification and I understood immediately that it was about the SAP GUI... and, just like Matthew, I thought of abapGit 🙂

      Author's profile photo Diego Valdivia
      Diego Valdivia

      Thanks Andrey for such a great post!

      I've worked as an abap developer many years, but didn't know this was possible in SAP GUI.

      It's very annoying to work on some developement that needs translation and then log in again in a different language. If by mistake you close the session, then you need to log in again.

      SAP should have added this as a standard behavior many years ago, just as they did in Fiori.

       

      Author's profile photo Renan Correa
      Renan Correa

      I find it fascinating to see people that ignore that the vast majority of the SAP ERP customers are still running SAP ECC with SAP GUI and treat it like a jurassic thing that you see in museums only.

      This is a kind of feature that could have been done by SAP ages ago and helps in a certain context to reduce the pain of the users of the system.

      Everybody gets that there are new things in SAP world, but there are many companies still using and rolling out ECC for smaller subsidiaries and they plan to do that before migrating to S/4HANA.

      I've seen a Z transaction once to do something similar to that where you could choose the language. I like the post, thank you!

      Author's profile photo Saikat chakraborty
      Saikat chakraborty

      Couldn't agree more!

      Author's profile photo Saikat chakraborty
      Saikat chakraborty

      Hello Andre,

      Amazing tool!

      Regards,

      Saikat.

      Author's profile photo Florian Wolf
      Florian Wolf

      Andrey Amelin - wow, thanks for sharing. This is really useful.

      Anyway, we found one issue. If you're using one of these transaction codes to switch the language a new mode opens. If you're then calling any transaction and going back ("F3") to the SESSION_MANAGER / main menu the following message appears for the user:

      Is this an issue you already have a solution for or does this only happen in our systems?

      Thanks,
      Florian

      Author's profile photo Andrey Amelin
      Andrey Amelin
      Blog Post Author

      Hi Florian Wolf!

      Thanks!

      I think a reason of this message describe here - https://me.sap.com/notes/2470128/E :

      You could find some special logical handling as below in the function module "NAVIGATION_EXECUTE_OBJECT_HELP".

      IF CALL_SY_TCODE = 'SESSION_MANAGER' OR CALL_SY_TCODE = SPACE
      
                        OR CALL_SY_TCODE = 'SESS'
                        OR CALL_SY_TCODE = 'SMEN'
                        OR CALL_SY_TCODE = 'SES0'.
      
                        IF CALL_SY_TCODE <> SPACE.
                                 MESSAGE I375(S#) WITH CALL_SY_TCODE.
                        ENDIF.
                   EXIT.
      ENDIF.

      So, maybe, you can try to change tcode at FM CALL FUNCTION 'ABAP4_CALL_TRANSACTION' to smthng else...