cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI: Translating csv-file to xml

Former Member
0 Kudos

Hi all,

I'm using SAP PI to translate a csv-file to xml.

The file looks like this:N,"34","034928",1,"",30/01/07,21/04/07,26/04/07,"YIX01","YIXING SAINTY GARMENTS CO LTD","228 LUYUAN ROAD HUANKEYUAN"

When I use the file adapter conversion, separating on the comma, I end up with a file still containing quotes or it separates strings that contain commas:("red,blue,green").

Is there any way to translate this kind of file in SAP PI?

Thanks in advance!

Regards,

Ivo van Ee

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ivo,

using NameA.enclosureSign = " will solve your problem (while NameA is your field name).

From SAP help:

NameA.enclosureSign

Specify a string that acts as a text delimiter. Text enclosed by such delimiters is transferred to the target structure unchanged, although the default setting is to remove all text delimiters. Separators within such texts are ignored.

This parameter is optional. The default setting is an empty value (no text delimiter).

Jayson

Former Member
0 Kudos

Hey Jayson,

Glad to know about this parameter. Thanks for your response.

Thanks,

Pooja Pandey

Former Member
0 Kudos

Hi Jayson,

Thanks for your solution! I just tried it and it works.

Regards,

Ivo

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Ivo,

Using a simple UDFin your mapping, you can remove the leading and trailing quotes from your data fields.

Thanks,

Pooja Pandey