cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver File Adapter error

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

@ 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

Former Member
0 Kudos

So it is seeing all 4 levels in your data layout and only expecting 3 when you define for "records"

What happens if you try

1. MT_Name.fieldSeparator = ,

2. singleRecordType = MT_Name

Former Member
0 Kudos

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

Former Member
0 Kudos

I normally use the "AF_Modules/MessageTransformBean" module, though mine are with XML to/from fixed layout yours should be very similar.

Here are some examples:

[http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm]

Former Member
0 Kudos

Hi Abhi,

Could you provide a sample target xml msg from your MM?

Pooja

Former Member
0 Kudos

--

Former Member
0 Kudos

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

Former Member
0 Kudos

Hey Abhi,

You can check this blog by Shabarish....it will be helpful to you:

/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

Cheers

Dhwani

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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