cancel
Showing results for 
Search instead for 
Did you mean: 

CSV to XML Conversion File Content Conversion

Former Member
0 Kudos

Hello All,

I'm doing CSV to XML Content conversion in File Sender channel. In the following sample data, I expect data in 3 lines but it is split in 6 lines. Meaning each line is split into 2 line. Need a way to ignore the line feed in the first line so that I can get only 3 XML nodes. With my current configuration I'm still getting 3 XML nodes but the second line data alue3, textvalue4 is being truncated always for all nodes

. Your help is highly appreciated.

My Key Field Name is SET.

Sample Data:

SET,GMESS01,2600001,1288S00,01TEI20262,text1,textv
alue3,textvalue41
SET,GMESS02,2600002,2288S00,01TEI20262,text1,textv
alue3,textvalue4
SET,GMESS03,2600003,3288S00,01TEI20262,text1,textv
alue3,textvalue4

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member190293
Active Contributor
0 Kudos

Hi Sudha!

You always have a possibility to develop custom adapter module to convert your file in needed format before processing it with FCC or even transform it to XML with java code. But I consider it to be a sender side problem.

Regards, Evgeniy.

Former Member
0 Kudos

@Evgeniy,

Yes. PI capabilities are very limited for such cases. From the source, the sender party is actually entering multiple lines within Excel row. Remember Alt+Enter. and sending this file as csv. Hence the actual single line data is being split with a line feed. The endField 'nl' separator recognizes this as newLine and hence its skipping the other part.

Hope SAP comes up with a solution this. To handle newLine in data field of a CSV file.

former_member190293
Active Contributor
0 Kudos

Hi Sudha!

I doubt PI's ability to process such file correctly using FCC. Actually you should ask the sender party to remove the line breaks within one line when generating the source file.

Regards, Evgeniy.

nikhil_bose
Active Contributor
0 Kudos

use Plain2XML.endSeparator

Former Member
0 Kudos

Plain2XML. fieldSeparator ,

Plain2XML.keyFieldName SET

As I mentioned the XML is well formed but with truncated 2nd lines

former_member186851
Active Contributor
0 Kudos

Hello Sudha,

Please post the FCC parameters used and XML formed.