Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Translate to upper case in unicode

Former Member
0 Kudos

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

2 REPLIES 2

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

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.