on 10-30-2009 8:44 PM
Hi all,
I am trying to convert the XML to Plain file in receiver file adapter. I am using module - StrictXml2PlainBean
My target structure is -
<MT_Name>
<records>
<Header>
</Header>
<Item>
</Item>
</records>
</MT_Name>
<Header> and <Item> are at same level.
When I use --
1. Header.fieldSeparator = ,
2. Item.fieldSeparator = ,
3. recordTypes = Header,Item
Then I get this error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: records at XML element MT_Name,records
When I use --
1. records.fieldSeparator = ,
2. singleRecordType = records
Then I get this error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: The element nesting level for the structure MT_Name is too deep (reference: 3 levels, found: 4 levels) at XML element MT_Name,records,Header,Item
To add more details to the scenario, multiple records can be generated but one record will have only one Header, with multiple Items.
Any help in this regard will be highly appreciated.
Thanks,
Abhi
Hi,
I am not able to get why are you using a Module for XML to Plain file conversion in the receiver file adapter?
File Receiver adapter is able to convert XML to a text file by default without use of module.
For further details on this, have a look at this:
http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/682bcd7f2a6d12e10000000a1553f6/frameset.htm
Cheers
Dhwani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ Dhwani,
I am not able to get why are you using a Module for XML to Plain file conversion in the receiver file adapter?
Sorry, I should mention that I want to create a CSV file. I believe for that, I need to use that module, am I correct?
@Gautam
Thanks for the blog. I had checked it out earlier.
Thanks,
Abhi
Hi Aaron,
If I use MT_Name, it is still throwing the same error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: The element nesting level for the structure MT_Name is too deep (reference: 3 levels, found: 4 levels) at XML element MT_Name,records,Header,Item
Please anyone help!!
How to create a non-XML file at target? If I don't use any conversion methods, then it create an XML file, which is hard to read and if I try creating this CSV file, then I am getting all these errors ...
Please help ...
Thanks,
Abhi
Hi Abhi,
Here you go....
For your target structure as:
<MT_Name>
<records>
<Header>
</Header>
<Item>
</Item>
</records>
</MT_Name>
Where I have assumed that <Header> and <Item> are at same level.
DO NOT use any Module just simply configure the receiver channel as below:
In the file Receiver Channel
Recordset Structure = Header,Item
Name Value
Header.fieldSeparator ,
Item.fieldSeparator ,
I have tried this and it works.
Let me know if you are facing any issues.
Cheers
Dhwani
Hi Dhwani,
DO NOT use any Module just simply configure the receiver channel as below:
In the file Receiver Channel
Recordset Structure = Header,Item
Name Value
Header.fieldSeparator ,
Item.fieldSeparator ,
This solution worked. I added these parameters in FCC. There is no need to use any modules.
Full Points to Dhwani and other contributers also rewarded.
Thanks a lot!
Abhi
Hi Abhi,
There is a good blog by Pooja Pandey on the same module:
[StrictXml2PlainBean|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13292] [original link is broken] [original link is broken] [original link is broken];
Refer to this and check if you have followed all the steps.
Regards,
Gautam Purohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.