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 default language

Former Member
0 Likes
3,844

HI all,

There is method or FM that can retrieve the system default language ?

i found Fm for timezone and i need fordefault system also.

Thanks,

Joy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,521

Hello


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.

7 REPLIES 7
Read only

former_member209217
Active Contributor
1,521

Hi Joy,

Check this FM RSRA_GET_DEFAULT_LANGUAGE

If u want to get current logon language use SY-LANGU.

Regards,

Lakshman.

Read only

Former Member
0 Likes
1,521

Hi,

Please go through the following link

[]

You can also use the FM as suggested by Lakshman.

Read only

abapdeveloper20
Contributor
0 Likes
1,521

System field sy-lang will give logon language.

Read only

Former Member
0 Likes
1,522

Hello


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
1,521

HI Dzed Maroz ,

Thanks this is what i want ,

Can u please explain what is this commend ?

Regards

Joy

Read only

0 Likes
1,521

Hello


par_name         = 'zcsa/system_language'.

It is parameter name. It stored value of system language.

All parameters with values you can find by RZ11.


CALL 'C_SAPGPARAM' ID 'NAME'  FIELD par_name
                   ID 'VALUE' FIELD par_user_wert.

There we are call system function which return value for this parameter.

Read only

Former Member
0 Likes
1,521

Hi,

If you require log on language then use SY-LANGU.

OR, otherwise use RSRA_GET_DEFAULT_LANGUAGE.

Regards,

Tutun