on 07-18-2014 10:22 AM
Hi All,
I have an issue while converting CSV to XML file.
A single source .csv file is sent from SFTP folder which contains common field.
The source structure comes as
Message
Message1
MT_Data
Status
Field1
Field2
Field3
Field4
The target structure contains 2 Message Types and is added in the mapping using Signature Tab. Hence in mapping the target looks something like
Message
Message1
MT_Header
Record1
Field1
Field2
Message2
MT_Details
Record2
Field3
Field4
I am using the below configuration in FCC.
Document Name: MT_Data
Recordset Structure: Status,*
Status.fieldSeparator ;
Status.endSeparator 'nl'
Status.fieldNames Field1,Field2,Field3,Field4
ignoreRecordsetName true
After conversion the structure that I am getting in XML is
<?xml version="1.0" encoding="UTF-8"?>
<ns:MT_Data xmlns:ns="urn:namepepsico:ariba:InvoiceStatusOut">
<Status>
<Field1>Field1, Field2, Field3, Field4</Field1>
</Status>
<Status>
<Field1>"Foreign","Indian","Domestic","Internal"</Field1>
</Status>
</ns:MT_Data>
Which is completely wrong.
I need the structure to be.
<?xml version="1.0" encoding="UTF-8"?>
<ns:MT_Data xmlns:ns="urn:namepepsico:ariba:InvoiceStatusOut">
<Status>
<Field1>Foreign</Field1>
<Field2>Indian</Field2>
<Field3>Domestic</Field3>
<Field4>Internal</Field4>
</Status>
</ns:MT_Data>
Please help me identify my mistake.
Regards,
Shaibayan
check below thread to skip the header.
looking at your output you have to user , as fieldSeparator.
to take care of double quotes check this.
http://scn.sap.com/thread/1825734
Converting File Content in a Sender Adapter (SAP Library - Partner Connectivity Kit)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muniyappan,
With the Document Offset option set to 1 the Header Line is gone however the structure remains the same.
It has now become
<?xml version="1.0" encoding="UTF-8"?>
<ns:MT_Data xmlns:ns="urn:namepepsico:ariba:InvoiceStatusOut">
<Status>
<Field1>"Foreign","Indian","Domestic","Internal"</Field1>
</Status>
</ns:MT_Data>
This is a part of it but the structure still is erroneous. It should be
<?xml version="1.0" encoding="UTF-8"?>
<ns:MT_Data xmlns:ns="urn:namepepsico:ariba:InvoiceStatusOut">
<Status>
<Field1>Foreign</Field1>
<Field2>Indian</Field2>
<Field3>Domestic</Field3>
<Field4>Internal</Field4>
</Status>
</ns:MT_Data>
This is the Advantco SFTP adapter and not SAP SFTP so we have the Content Conversion tab
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.