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

unicode file formats ( open dataset)

Former Member
0 Likes
729

Hi,

We are sending Unicode file with encoding as UTF-8( open dataset) containing Greek character to Legacy system. Legacy system( Sql server) is not able to understand this file format. As a workaround legacy side team coverts the file to Unicode UCS-2 using notepad ( by selecting encoding option as Unicode) and then uploading it to SQL server..

Is there anyway to convert the UTF-8 file to other Unicode file format ( say UCS-2 )within SAP or generate the desired file format.

1 ACCEPTED SOLUTION
Read only

mvoros
Active Contributor
0 Likes
535

Hi,

have a look at class CL_ABAP_CONV_OUT_CE. It converts from SAP format to different output format. You will have to handle output as binary data.

Cheers

Hi,

We are sending Unicode file with encoding as UTF-8( open dataset) containing Greek character to Legacy system. Legacy system( Sql server) is not able to understand this file format. As a workaround legacy side team coverts the file to Unicode UCS-2 using notepad ( by selecting encoding option as Unicode) and then uploading it to SQL server..

Is there anyway to convert the UTF-8 file to other Unicode file format ( say UCS-2 )within SAP or generate the desired file format.

2 REPLIES 2
Read only

mvoros
Active Contributor
0 Likes
536

Hi,

have a look at class CL_ABAP_CONV_OUT_CE. It converts from SAP format to different output format. You will have to handle output as binary data.

Cheers

Read only

Former Member
0 Likes
535

Hi Martin,

Thanks for the help!!!

I tried to convert the file format from UTF-8 to UCS-2 using the methods of the class mentioned but it didn't fulfill my requirement. I have Greek character in UTF-8 format and when I convert it to any other other format then Greek character are displayed as #.

Problem is legacy SQL server don't support UTF-8 format. I tried open data set with binary mode & also legacy text mode with all available code pages but result were not fruitful.

( Program RSCP_CONVERT_FILE to convert code page - I used target code page as all possible UTF* , UCD* & Greek code page but no luck ).

I am just wondering whether SAP can convert UTF-8 to UCS-2 or not. Other option I am thinking is to have the file converted by Unix script that is application server external command which can be executed via FTP.