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

Generate Unicode text file

Former Member
0 Likes
855

Hi All,

I am trying to create a unicode text file using OPEN DATASET which is to be fed to MDM for further process. I tried using the follow statement but no use,

OPEN DATASET p_afile FOR OUTPUT IN LEGACY TEXT MODE
CODE PAGE '1100' IGNORING CONVERSION ERRORS.


After generating a file I try to save it manually using excel and it gets converted without any issues. But the requirement is to generate a unicode txt file as like below in excel,


Any leads?

2 REPLIES 2
Read only

Former Member
0 Likes
596

I even tried the usual way as below but not able to get the file,

OPEN DATASET p_afile FOR APPENDING IN TEXT MODE
ENCODING UTF-8.

Read only

Former Member
0 Likes
596

That option is most likely UCS-2 LE.

So try open dataset for output in legacy text mode little endian code page '4103' ignoring conversion errors.

In SAP, 4103 is utf16-le.