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: 

Unicode - ANSI Interface question

Former Member
0 Kudos

An R3 4.7 interface in a non-unicode system outputs a file in ANSI for a 3rd party system.

The R3 4.7 system is then upgraded to Unicode (Oracle UTF-8 database). The 3rd party system still expects the data in ANSI format.

Will this Interface still work? It can be assumed that the data will be LATIN1 characters only.

6 REPLIES 6

sridhar_k1
Active Contributor
0 Kudos

Is the interface program using OPEN DATASET to output the file?

If ENCODING NON-UNICODE option used in open dataset statement, it works

if ENCODEING DEFAULT used, it outputs unicode(UTF-8) file.

If GUI_DOENLOAD used to output file, the interface still works.

Regards

Sridhar

Former Member
0 Kudos

You can used OPEN Dataset with Encoding option if you want the transfer the output file on the application server or else you can use GUI_DOWNLOAD function module for file on the presentation server.

I think ther should not be any issue,the interface would work.

Former Member
0 Kudos

I have a number of abaps exporting data via open dataset encoding default (i.e. UTF-8). Also some using CL_FRONTEND_SERVICES GUI UPLOAD. And also IDOCS too.

I have done some searching and it appears as though as long as the characters are all LATIN1 (which all the existing interfaces are) then the UTF-8 output will be the same as ASCI or ANSI because code points 0 - 127 are single byte in UTF-8 and stored the same.

Has anyone else had any experience of this?

Thanks

0 Kudos

That's right, UTF-8 uses one byte between 0 - 255. The files will be same as ANSI as long as sap don't add byte order mark EFBBBF (standard for UTF-8 files) at the begining of the file.

To verify, open a sap created file in a hex viewer, if first three bytes are EFBBBF, then they should be removed.

Regards

Sridhar

Message was edited by: Sridhar K

0 Kudos

Thanks Sridhar, I will open a selection of files and investigate further.

Do you know what format the IDOCS will be in from a Unicode system? Will there be any change?

Thanks

0 Kudos

You can select the file encoding in file port definition(Tx: WE21).

If you check unicode, idocs written to file port are UTF-8 else non unicode.

I've opened SAP UTF-8 file created from non UC system in hex viewer, there's no byte order mark.

Regards

Sridhar