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

Urgent

Former Member
0 Likes
805

hi everyone ,

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 to be changed ...

please reply

point will be rewarded for correct answer.

regards ,

sandeep patel

Edited by: Sandeep patel on Apr 15, 2008 4:28 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
786

Hi

This variable is declared as hexadecimal value.

so you can use class

begin of struct,

x1(1) CL_ABAP_CHAR_UTILITIE ->HORIZONTAL_TAB

type c,

end of struct.

data:

c1 type c value 'C'.

struct1 = c1.

hi everyone ,

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 to be changed ...

please reply

point will be rewarded for correct answer.

regards ,

sandeep patel

Edited by: Sandeep patel on Apr 15, 2008 4:28 PM

5 REPLIES 5
Read only

Former Member
0 Likes
787

Hi

This variable is declared as hexadecimal value.

so you can use class

begin of struct,

x1(1) CL_ABAP_CHAR_UTILITIE ->HORIZONTAL_TAB

type c,

end of struct.

data:

c1 type c value 'C'.

struct1 = c1.

Read only

0 Likes
786

hi ,

this declaration is not allowed

begin of struct,

x1(1) CL_ABAP_CHAR_UTILITIE ->HORIZONTAL_TAB

type c,

end of struct.

it showing error.

Edited by: Sandeep patel on Apr 15, 2008 6:36 PM

Read only

0 Likes
786

begin of struct,
x1(1) value CL_ABAP_CHAR_UTILITIE ->HORIZONTAL_TAB
type c,

end of struct.
Read only

Former Member
0 Likes
786

hi everyone ,

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 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 to be changed ...

please reply

points will be rewarded for correct answer.

regards,

sandeep patel

Edited by: Sandeep patel on Apr 16, 2008 11:38 AM

Read only

0 Likes
786

Hi,

change the type of X1 like following..in your structure,

begin of struct,

x1(2) type c,

end of struct.

I hope ur unicode problem will be solved,

Reward if useful.

--Thendral.