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

Unicode error?

Former Member
0 Likes
592

i have code in NUS like this

Data: hex1(1) type x value '0D',

Hex2(2) type x value '20'.

Error : this statement not allowed in unicode system

to rectify this we have to use CL_ABAP_CHAR_UTILITIES

Ex:

hex3(1) type x value '09'.

CL_ABAP_CHAR_UTILITIES=>horizontal_tab

09 means tab

0D means Carriage return

20 means space

For this hexadecimal values which method is suitable in this class CL_ABAP_CHAR_UTILITIES

thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
566

For Carriage Return use as below:

> DATA: l_crlf(1) TYPE c VALUE cl_abap_char_utilities=>cr_lf.

OR

> DATA: l_newline TYPE c VALUE cl_abap_char_utilities=>newline.

For space you dont need to define Hexa Decimal Character, use it as Character Variable.

> DATA: l_space(1) TYPE c VALUE ' '.

Regards

Eswar

Read only

0 Likes
566

HI ,

Thanks a lot for this reply .

But if the value is '1F' , '7F' ,'9F'. Etc .

How shall we work on that .

The Class cl_abap_char_utilities doesn't carry this attributes.

Thank you

Read only

Clemenss
Active Contributor
0 Likes
566

Hi Sitraram,

in SE80, open class CL_ABAP_CHAR_UTILITIES. There is a tab 'attributes' with all available names for tab, cr, lf, and so on.

Regards,

Clemens

Read only

Former Member
0 Likes
566

HI ,

Thanks a lot for this reply .

But if the value is '1F' , '7F' ,'9F'. Etc .

How shall we work on that .

The Class cl_abap_char_utilities doesn't carry this attributes.

Thank you