‎2008 Jul 14 3:19 PM
TRANSLATE w_extr_string FROM CODE PAGE '1103' TO CODE PAGE '1100'.
This syntax is now obsolete in UNICODE environment.
I've tried to correct it using :
DATA:conv type ref to cl_abap_conv_x2x_ce.
DATA: w_extr_string TYPE XSTRING.
conv = cl_abap_conv_x2x_ce=>create( in_encoding = '1103'
in_endian = 'L'
out_encoding = '1100'
out_endian = 'B'
input = w_extr_string).
But datatype XSTRING is now obsolete in ECC6.0
can anyone plz suggest me a way out...???
‎2008 Jul 14 3:39 PM
> But datatype XSTRING is now obsolete in ECC6.0
>
XSTRING is not obsolate in ECC 6.
a®
‎2008 Jul 15 1:01 PM
w_extr_string is of char type.
so first i ve converted w_extr_string into conv_string (XSTRING) type so that it can be passed as parameter in cl_abap_conv_x2x_ce=>create()
conv_out->convert( exporting data = w_extr_string
importing buffer = conv_string ).
conv = cl_abap_conv_x2x_ce=>create( in_encoding = '1103'
in_endian = 'L'
out_encoding = '1100'
out_endian = 'B'
input = conv_string ).Now i want the translated value into w_extr_string.
I'm able to fetch the converted value.
I've tried
conv->CONVERT_X( n = 1044 ).bUt it didn't worked....
what can be done to fetch the translated value?????
‎2008 Jul 15 1:47 PM
Hi,
Please check this link:
DATA :
in_buffer TYPE xstring,
out_buffer TYPE xstring,
conv TYPE REF TO cl_abap_conv_x2x_ce.
in_buffer = '414220C3B602010000'.
conv = cl_abap_conv_x2x_ce=>create( in_encoding = 'UTF-8'
in_endian = 'L'
out_encoding = '1100'
out_endian = 'B'
input = in_buffer ).
CALL METHOD conv->convert_c( n = 5 ).
out_buffer = conv->get_out_buffer( ).
WRITE out_buffer.Regards
Adil
‎2008 Jul 16 4:22 AM
Hey Adil,
Thanks a lotttt.....its working bt I/m left with one pblm...now i want this out_buffer in char datatype....
hw to convert Xstring to Chr/string???????
‎2008 Jul 16 4:52 AM
‎2008 Jul 16 4:53 AM
‎2008 Sep 25 10:32 AM
Hi can u explain how u r the class with those parameters...
i need to convert some junk data(which actually need to be in korean) into korean