Application Development and Automation 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: 
Read only

change table encoding

Former Member
0 Likes
562

Hallow

I have internal table and itab and I wont to change the encoding

Of the data their to utf-8 which function do that?

i done this becose i have to export the data in my table to xml

now i have encoding iso8.....

regards

4 REPLIES 4
Read only

Peter_Inotai
Active Contributor
0 Likes
495

Hi Antonio,

You might convert the fields using CL_ABAP_CHAR_UTILITIES.

Best regards,

Peter

Read only

0 Likes
495

hi Peter

u can give me example please how to use it

regards

Read only

0 Likes
495

Hi,

Sorry, I didn't program myself the same senario, however you can check unicode demo programs TECHED_UNICODE_SOLUTION*, and presentation 'How to Make Your ABAP Code Unicode-Enabled' from Dr. Christian Hansen.

You can also use the following classes:

CL_ABAP_CONV_OUT_CE system code page > any code page

CL_ABAP_CONV_X2X_CE any code page > any code page

CL_ABAP_CONV_IN_CE any code page > system code page

Hope it helps.

best regards,

Peter

Read only

0 Likes
495

Hello,

You can use the class:

CL_ABAP_CONV_IN_CE

first :

conv = cl_abap_conv_in_ce=>create(

encoding = 'UTF-8' ).

and then the convert method:

conv->convert(

EXPORTING input = lxs_content

IMPORTING data = l_contline ).

Regards,

Walter