07-11-2007 2:07 PM
Hi,
In ECC the Unicode does not allow a write statement between Different data type, namely between a Hexa and a Char type. The Hexa has to be converted into char! Could anyone please tell me if any function Module exists for the same,
Or, is there any other solution to go around it!
FM's "<b>STPU1_HEX_TO_CHAR</b>" & "<b>/AIN/EPC_HEX_TO_CHAR</b>" do not work.
Points will surely be awarded!
Thanks in Advance.
Regards,
Divaker
07-11-2007 2:57 PM
07-11-2007 2:57 PM
07-11-2007 3:11 PM
You can use attributes of class <b>cl_abap_char_utilities</b>
e.g
data: v_horz_tab(1) type c,
v_cr(1) type c.
for Horizontal tab : use v_horz_tab = cl_abap_char_utilities->horizontal_tab.
for Carriage Return : use v_cr = cl_abap_char_utilities->cr_lf..
u can use many more...
BYTE_ORDER_MARK_LITTLE
BYTE_ORDER_MARK_BIG
BYTE_ORDER_MARK_UTF8
CHARSIZE
ENDIAN
MINCHAR
MAXCHAR
HORIZONTAL_TAB
VERTICAL_TAB
NEWLINE
CR_LF
FORM_FEED
BACKSPACE
SPACE_STR
SPACE_STR_LANGU
Reward if useful..
Regards
Prax
07-11-2007 3:15 PM
07-11-2007 3:23 PM
Hi Timothy,
to conver to hexa to char
AIN_EPC_HEX_TO_CHAR
HR_RU_CONVERT_HEX_TO_CP
HR_RU_CONVERT_HEX_TO_STRING
To convert to hexa to dec
FITP_UTIL_CONVERT_HEX2DEC
other wise
First transfer this hex values into fieldsymbol (Casting Type X) than transfer the value from that fieldsymbol to another fieldsymbol( Casting type Char.). than transfer this fieldsymbol to a character type.
<b>Reward pts if found usefull :)</b>
regards
Sathish
07-11-2007 3:31 PM
In CL_ABAB_CHAR_UTILITES which method do i use?
As i said before
<b>AIN_EPC_HEX_TO_CHAR</b> does not work...
And these FM's do not exist in our Domain!
<b>
HR_RU_CONVERT_HEX_TO_CP
HR_RU_CONVERT_HEX_TO_STRING
</b>
Is there any other way guys!
Tnx..
Divaker
07-13-2007 5:23 PM
Well I found out the solution for this and it is as such...
You can use the class method " <b>CL_ABAP_CONV_IN_CE=>UCCP</b>" and convert the hexa to a char and then use it.
Thanks to all who have replied.
Regards,
Divaker
06-22-2010 11:03 AM
hi timoothy,
can you please tell me how did you use the above mentionesd class method .I am un able to convert 'FF06010102028000343130320000000063010000121F9D021D331F030303230F90606065C00642187C183C19FC185CD74254AE028BB28029468E7510C17D5033' this hexa decimal value to text.
Please help