Skip to Content
author's profile photo Former Member
Former Member

Save File in ANSI after the file is generated.

Hi,

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)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 06, 2013 at 01:17 PM

    Hi Lakshmi,

    Interesting question. Not exactly something I've seen, but I have had to inter face with some PI feeds in the past. I'd say the easiest thing to do eke the data in a Unicode system for as long as possible. Can you have the PI job put the data in a "Z" table in the IDM database? Otherwise you might need to do some scripting when creating or reading the file to translate those characters from the ANSI format to the UTF format.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.