Skip to Content
avatar image
Former Member

CSV to XML Conversion File Content Conversion

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Dec 08, 2016 at 10:17 AM

    Hello Sudha,

    Please post the FCC parameters used and XML formed.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 08, 2016 at 10:21 AM

    Plain2XML. fieldSeparator ,

    Plain2XML.keyFieldName SET

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 08, 2016 at 01:39 PM

    use Plain2XML.endSeparator

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 09, 2016 at 03:38 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 09, 2016 at 06:27 AM

    @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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 09, 2016 at 06:52 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded