2007 Jul 11 5:26 PM
Hi,
How can I convert HEX value to CHAR value.
The Code in <b>non Unicode</b> system is:
DATA: t_text LIKE tline OCCURS 0 WITH HEADER LINE.
constants: c_hex_20a5(2) TYPE x VALUE '20A5'.
t_text-tdline = 'seller of the item so listed. A legend of the Seller Code(s) is as'.
TRANSLATE t_text-tdline USING c_hex_20a5.
The same code give error in <b>Uni-Code</b> system:
<b>error is "c_hex_20a5 must be an character type object (C, N, D, T or String type)."</b>
If anyone know, what is the solution, please let me know.
Thanks!
Puneet.
2007 Jul 11 5:52 PM
Hi,
Try declaring the Hex chars using the ABAP char utilities. This is just a sample piece of code on how to declare and use:
CLASS cl_abap_char_utilities DEFINITION LOAD.
DATA: ws_lf TYPE c VALUE cl_abap_char_utilities=>cr_lf.
data: c_newline TYPE x VALUE '0D'. [ it is zero D, for carriage return ]
ws_lf = c_newline.
CONCATENATE it_tab-maktx
ws_lf
ws_template
INTO it_notificatn-template.
Hope this helps...
Regards
Subramanian