08-31-2009 11:24 AM
Hi all,
I need replace the following statement using unicode classes CL_ABAP_CONV_OUT_CE / CL_ABAP_CONV_IN_CE
TRANSLATE TO Upper case.
Can anyone paste the code for me?
Thanks,
Amit Jain
09-01-2009 8:14 AM
Hi Amit,
you do not need to replace TRANSLATE ... TO UPPER/LOWER CASE in Unicode systems.
You just need to take care that the arguments fit:
The arguments of these instructions must be single fields of type C, N, D, T or STRING or structures of character-type only.
Please have a look at:
http://help.sap.com/saphelp_erp60_sp/helpdata/EN/79/c55479b3dc11d5993800508b6b8b11/content.htm
Best regards,
Nils Buerckel
SAP AG
11-23-2009 4:36 AM
Example for class cl_abap_conv_in_ce.
DATA conv TYPE REF TO cl_abap_conv_in_ce.
DATA buffer(4) TYPE x.
DATA text(100) TYPE c.
buffer = '41424344'.
conv = cl_abap_conv_in_ce=>create(
encoding = 'UTF-8' ).
conv->convert(
EXPORTING input = buffer
IMPORTING data = text ).
write: / text.
Example for class cl_abap_conv_out_ce.
data: text(100) type c value 'ABCD',
conv type ref to cl_abap_conv_out_ce,
buffer type xstring.
conv = cl_abap_conv_out_ce=>create(
encoding = 'UTF-8'
endian = 'L'
).
call method conv->write( data = text n = 4 ).
buffer = conv->get_buffer( ).
write:/ buffer.