2008 Apr 15 10:19 AM
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
2008 Apr 15 12:41 PM
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.
2008 Apr 15 12:41 PM
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.
2008 Apr 15 1:33 PM
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
2008 Apr 15 2:10 PM
begin of struct,
x1(1) value CL_ABAP_CHAR_UTILITIE ->HORIZONTAL_TAB
type c,
end of struct.
2008 Apr 15 2:50 PM
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
2008 Apr 16 7:17 AM
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.