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

Get the system language

Former Member
0 Likes
7,439

Hi ,

There is FM which can provide the system language which stored on RZ11 ?

i found this FM RSRA_GET_DEFAULT_LANGUAGE ,

but i need other FM .

Regards

Nina

1 ACCEPTED SOLUTION
Read only

Former Member
3,977

Hi,

I did not understand your question correctly but i think system language can be retrived from system variable sy-langu

Himanshu

Hi ,

There is FM which can provide the system language which stored on RZ11 ?

i found this FM RSRA_GET_DEFAULT_LANGUAGE ,

but i need other FM .

Regards

Nina

9 REPLIES 9
Read only

Former Member
0 Likes
3,977

What release are you on?

Rob

Read only

0 Likes
3,977

HI ,

I working on release 7.0 .

Regards

Nina

Read only

Former Member
3,978

Hi,

I did not understand your question correctly but i think system language can be retrived from system variable sy-langu

Himanshu

Read only

0 Likes
3,977

HI,

Correct but if the system logon from WS call the session is opened with the caller language .

so it not help .

Regards

Nina

Read only

0 Likes
3,977

Hello

Try this snippet:


DATA: par_name(60).
DATA: par_user_wert(60).
DATA: g_default_language type sylangu.

par_name         = 'zcsa/system_language'.
CALL 'C_SAPGPARAM' ID 'NAME'  FIELD par_name
                   ID 'VALUE' FIELD par_user_wert.
IF sy-subrc = 0.
  g_default_language = par_user_wert.
ENDIF.
WRITE: 'Default language is', g_default_language.

Read only

0 Likes
3,977

HI Dzed,

Thanks

but How i can find a FM that do this except RSRA_GET_DEFAULT_LANGUAGE .

Thanks Nina

Edited by: Nina C on Sep 17, 2009 9:10 AM

Read only

0 Likes
3,977

Hello

But why you do not want to use this FM ?

I distrust that exist others FMs, but if they exist it have use below logic:


par_name         = 'zcsa/system_language'.
CALL 'C_SAPGPARAM' ID 'NAME'  FIELD par_name
                   ID 'VALUE' FIELD par_user_wert.

You may create own fm with this logic

Read only

0 Likes
3,977

There is no Where-Used-List for this "logic" and if you do an F1 on the CALL ' ...statement you will see that the documentation is not meant to be encouraging...

I would do a code scan for use of the statement by SAP and try to find a (preferably released) FM or method which encapsulates it.

If there isn't one, then I guess it is either not foreseen (or even illogical) or a functional deficiency.

@ Nina: Is your concern that the user can logon with a language which is different to the system default language? So you actually want to make it a system mandatory language?

Cheers,

Julius

Read only

Noorie
Active Participant
0 Likes
3,977

Hi,

sy-LANGU will give you SAP logon language key