on 05-16-2006 12:55 PM
Hi All,
I am trying to convert XML to CSV(Content conversion in Receiver File adapter).
1. Here is the XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Emp_MT xmlns:ns0="http://sdn.com/XML_TO_CSV_01">
-
<Record>
-
<Name>David</Name>
-
<Sal>100</Sal>
-
</Record>
-
<Record>
-
<Name>Michal</Name>
-
<Sal>200</Sal>
-
</Record>
-
<Trailer>
-
<Flag>END_END</Flag>
-
</Trailer>
</ns0:Emp_MT>
2. My output need to be
David|100|
Michal|200|
END_END|
3.Content conversion
Recordset Structure = Record,*,Trailer,1
Record.endSeparator |
Record.fieldSeparator |
Trailer.endSeparator |
Trailer.fieldSeparator |
Record.addHeaderLine 0
I know I am doing wrong with CC. I went through the blog, but could not able to fix it. Can any one help me in fixing it.
Thank you
Ganges Leaves
Hi,
Try this and let me know.
Record.endSeparator 'nl'
Record.fieldSeparator |
Trailer.endSeparator 'nl'
Trailer.fieldSeparator |
Record.addHeaderLine 0
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganges~
It is restricted in the Receiver File COntent conversion
Just try like this-
Recordset Structure - Record, Trailer
Record.endSeparator- 'nl'
Record.fieldSeparator- |
Record.fieldNames- Name,Sal
Trailer.endSeparator- 'nl'
Trailer.fieldSeparator- |
Trailer.fieldNames -Flag
More-
http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
Hope this helps,
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganges,
you need to pass in content conversion the below parameters
Recordset Structure = Record,*,Trailer,1
Record.fieldNames - Name,Sal
Record.fieldSeparator - |
Trailer.fieldNames - Flag
Trailer.fieldSeparator - |
Record.fromConfiguration - YES
If above solution is not working then your XML Structure need to change as per below
-
The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes.
The expected document structure usually looks like this:
<root>...
<nameA>
<value1>value</value1>
<value2>value</value2>
<value3>value</value3>
</nameA>
<nameB>
<value4>value</value4>
</nameB>
...
</root>...
You can use any element names you like. There can be any number of different substructures under the root element, which can be mapped to different CSV structures.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.