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

Getting errors while conversion of ABAP program into Unicode check

Former Member
0 Likes
787

Hi,

I changed the one ABAP program for some requirement and try to save it, it is giving error that the program is not unicode compatible.I set the unicode checks active box under Attributes and again activate it .It is not allowing to concatenate the two variables which is declared as follows :

constants: c_tab type x value '09', "tab character

c_cr type x value '0D'. "carriage return character

I tried to use field symbols but still giving error (code after change)

constants: c_tab type x value '09', "tab character

c_cr type x value '0D'. "carriage return character

field-symbols : <f_c_tab> type any,

<f_c_cr> type any.

Assign c_tab to <f_c_tab> CASTING type c.

Assign c_cr to <f_c_cr> CASTING type c.

error :The length of "C_TAB" in bytes must be a multiple of the size of a Unicode character (regardless of the size of the Unicode character).

pls guide me so that I can cancatenate the c_tab and c_cr variables

1 ACCEPTED SOLUTION
Read only

former_member209217
Active Contributor
0 Likes
599

Hi,


Tab Character ----->Data: tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.

Carraige Return---->Data : cr(2)  type c value cl_abap_char_utilities=>cr_lf..
You will not be able to use the concatenate statement for hexadecimal variables in unciode system. Try using the above equivalent character variables. In unicode system avoid using hexadecimal variables wherever possible Regards, lakshman.

3 REPLIES 3
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
599

Hello,

Search in SDN for CL_ABAP_CHAR_UTILITIES=>NEWLINE & CL_ABAP_CHAR_UTILITIES=>CR_LF.

BR,

Suhas

Read only

former_member209217
Active Contributor
0 Likes
600

Hi,


Tab Character ----->Data: tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.

Carraige Return---->Data : cr(2)  type c value cl_abap_char_utilities=>cr_lf..
You will not be able to use the concatenate statement for hexadecimal variables in unciode system. Try using the above equivalent character variables. In unicode system avoid using hexadecimal variables wherever possible Regards, lakshman.

Read only

Former Member
0 Likes
599

The above thread solved the issue.