2013 Feb 26 12:42 PM
hi experts,
problme with hexadecial value.
FIELD-symbols : <fs_x> TYPE X.
ASSIGN 'A' TO <fs_x> casting.
in 2 different system im geting 2 diferent values in
<fs_X> = 0041 correct
<fs_X> = 4100 in correct
Please advice.
Rgs,
Jayant.
2013 Feb 26 1:36 PM
FIELD-symbols : <fs_x> TYPE X.
ASSIGN 'A' TO <fs_x> casting.
in 2 different system im geting 2 diferent values in
<fs_X> = 0041 correct
<fs_X> = 4100 in correct
Either is it 0041/4100, The value of A will be the same.
For example,Try this.
FIELD-SYMBOLS : <fs_x> TYPE any.
DATA a TYPE string." VALUE '0100'.
ASSIGN 'A' TO <fs_x>." CASTING.
WRITE <fs_x>.
Here for me
1) In one server,The hexa decimal value of A is 4100
2)In other,The hexa decimal value of A is 41.
Here in both the cases,The value of <FS_X> = A irrespective of hexadecimal values
Thanks
Katrice
2013 Feb 27 4:13 AM
hi Katrice,
thank you for your comments. because that value is futher procesed in below code and it is not in ascii value range it is raplaced by '?'.
when i test with A is s being replaced by '?', which is wrong since ascii value is coming as 16440 not in 1- 127 range.
lv_acsii type i.
ASSIGN 'A' TO <fs_x> casting.
if <fs_x> is assigned.
clear lv_ascii.
MOVE <fs_x> TO lv_ascii.
"Check if character lies in ASCII range
if lv_ascii > 0 and lv_ascii < 127.
else.
o_text+lv_index(1) = '?'.
endif.
endif.
4100 / 16640(lv-ascii) - in correct asci value
0041 / 65 (lv-ascii) - correct ascii value
Rgs,
Jay.
2013 Feb 26 1:43 PM
Hi
Debug in both systems step by step then where is the problem or difference we can find right
(in mys sytem i getting 4100 ).
Regards
Mahesh