Skip to Content
Former Member
Sep 06, 2013 at 10:05 AM

Save File in ANSI after the file is generated.



I have requirement to save a file that is generated as an UTF-8 encoded file (via File Adapter) in ANSI format.

Here is the background:

End to End Scenario: Idoc to File (ECC--> PI --> NFS folder path --> Database system (Oracle based Database) )

Now the Database system in a non-unicode system. The file I am generating in PI is a UTF-8 encoded file. It contains special characters (Lithuanian Characters) in it. Now since the Database system in a non-unicode system, the file generated in PI is unable to be loaded into their system.

The code page accepted in the database cp-1252. and they need us to send the file in ANSI format.

Here is the problem: when I use a Code Page 1252 in my adapter, the Lithuanian Special Characters get replaces with "?" or "#". To retain the special characters, i need to use UTF-8 encoding in my adapter. Now when I save this file generated with UTF-8 on my local desktop and save it in ANSI Mode, then the database system is able to load the file.

In the screenshot below, highlighted in Maroon is the file saved as ANSI on my local desktop, which the database system is able to load.

Is there any way to automatically generated this ANSI File. I have seen the "Run Operating Command Before/After processing" option in Adapter, but I don't know if we can use this for my case. If we can, how do I use it.

Please Note: I have used all the encoding formats SAP suggests in my adapter, but it did not help.


screenshot1.png (30.6 kB)