2011 Mar 04 8:14 PM
Hello
For some reason, i need to find out that executing system is unicode enabled or not? i should know it with in my prog. I need it to put a validation in mu prog. I checked SYST structure at runtime, no use!
Thank you
2011 Mar 05 6:20 PM
Hi,
data:
L_RESULT(5) type C.
call 'C_SAPGPARAM' id 'NAME' field 'abap/unicode_check'
id 'VALUE' field L_RESULT. "#EC CI_CCALL
if L_RESULT cs 'on'.
P_RESULT = 'X'.
return.
endif.
if CL_ABAP_CHAR_UTILITIES=>CHARSIZE > 1.
P_RESULT = 'X'.
return.
endif.Regards,
Clemens
Hello
For some reason, i need to find out that executing system is unicode enabled or not? i should know it with in my prog. I need it to put a validation in mu prog. I checked SYST structure at runtime, no use!
Thank you
2011 Mar 04 9:16 PM
Hi,
I am not understanding what are you trying to say.
If I am correct then you want to check whether your SAP system is UNICODE enabled or not.
If this is your query, then you can find this thing by:
Login to SAP -> GoTo system -> Click on Status.
In the middle, you will see "Unicode System", if value is "Yes", then your system is Unicode enabled.
If you want to put check points in program, to know whether executing system is Unicode enabled or not, then this link will definately help you.[ABAP Development Under Unicode|http://help.sap.com/saphelp_nw04/helpdata/en/79/c55458b3dc11d5993800508b6b8b11/content.htm]
For your referrence:
May it helps you.
Regards,
<DS>
2011 Mar 04 9:42 PM
I am not able to understand your requirement as to why you need to check whether your system is unicode compliant dynamically? Would you be running the program in different systems/instance and need a different behaviour (based on whether it is unicode compliant?)
2011 Mar 05 3:19 AM
Yes Chris, i want to put validations in the custom program, because this program executes in both systems(enabled and not).
Thank you
2011 Mar 05 3:56 AM
There is a system parameter in RZ11 which will say the system is unicode system or not. you can check for that.
there will be function modules to get those parameters. I am not sure of this FM RSAN_SYSTEM_PARAMETER_READ.
try something like this.
2011 Mar 05 6:20 PM
Hi,
data:
L_RESULT(5) type C.
call 'C_SAPGPARAM' id 'NAME' field 'abap/unicode_check'
id 'VALUE' field L_RESULT. "#EC CI_CCALL
if L_RESULT cs 'on'.
P_RESULT = 'X'.
return.
endif.
if CL_ABAP_CHAR_UTILITIES=>CHARSIZE > 1.
P_RESULT = 'X'.
return.
endif.Regards,
Clemens
2015 Nov 05 11:42 AM
Hi
Clemens Li, your code only works if the RZ11 'abap/unicode_check' parameter is set. In our case that parameter is not set, so it returns a non-Unicode system even if it is Unicode. The code below returns the result regardless of the parameter:
DATA G_CURR_CONFIG_TYPE TYPE CPA_SYS_CONFIG_TYPE.
DATA G_CURR_CONFIG_TYPE_TEXT TYPE STRING.
DATA SYS_TYPE TYPE TEXT15. " NUC Non-Unicode sys
*
* System Type Assignment
CALL METHOD CL_I18N_SYSTEM_SETTINGS=>GET_SYS_CONFIG_TYPE
IMPORTING
EX_SYS_CONFIG_TYPE = G_CURR_CONFIG_TYPE
EX_SYS_CONFIG_TYPE_TEXT = G_CURR_CONFIG_TYPE_TEXT.
*
CASE G_CURR_CONFIG_TYPE.
WHEN CL_I18N_SYSTEM_SETTINGS=>C_SYS_CONF_TYPE_UC.
SYS_TYPE = 'Unicode'.
WHEN OTHERS.
SYS_TYPE = 'non-Unicode'.
ENDCASE.
WRITE: / SYS_TYPE.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |