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

Char to Hex

Former Member
0 Likes
454

Hi Experts,

I have a question related to assignment of char to hex in

uni-code system.

Here is piece of code:

In non-uncode system:

data:

begin of struct,

x1(1) type x,

end of struct.

data:

c1 type c value 'C'.

struct1 = c1.

In unicode system

*struct1 = c1 is not allowed.

If i assign struct1-x1 = c1, intenally the values value are getting changed that can be seen in debug mode .

for example: internal value for 'C' is 43,similarlly for 'L' it is 4C.

so how can i assign this in unicode system with out the values get changed ...

please reply

it's urgent....

Thanks in advance...

Regards

Syed

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
410

There are function modules in the system to convert hex values to char values.

These function modules are:

NLS_STRING_CONVERT_TO_SYS (hex to char)

NLS_SRING_CONVERT_FROM_SYS (char to hex)

If it's the tab character then it can be done with (example):

data: x1 type char1 value c1_abap_char_utilities=>horizontal_tab.

1 REPLY 1
Read only

Former Member
0 Likes
411

There are function modules in the system to convert hex values to char values.

These function modules are:

NLS_STRING_CONVERT_TO_SYS (hex to char)

NLS_SRING_CONVERT_FROM_SYS (char to hex)

If it's the tab character then it can be done with (example):

data: x1 type char1 value c1_abap_char_utilities=>horizontal_tab.