cancel
Showing results for 
Search instead for 
Did you mean: 

Create IDoc from flat file - How to do the message mapping

Former Member
0 Kudos

Hi everybody,

I want to create an IDoc from a flat file.

The file structure looks like this:


MT_XYZ
- Node001       0...1
  - Leaf001
  - [...]
- Node002       0...unbounded
   - Node003    0...1
      - Leaf002
      - Leaf003
      - [...]
   - Node004    0...1
      - Leaf004
      - [...]
   - Node005    0...1
      - Leaf005
      - [...]

I have created a mapping and all the other stuff to set up the IDoc adapter.

Now when I try to test the interface the IDoc is created properly but obviously no information from the nodes "Node003" to "Node005" is inserted in the IDoc. Only the information kept in the elements (leafs) of "Node001" are inserted.

All IDoc segments and their "Segment" elements are linked to the root node of the file structure "MT_XYZ". I tried to link some IDoc segments only to "Node002" but then this segment is not created.

So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?

Thanks in advance for all answers!

Regards,

Torben

Edited by: Torben Hönemann on Dec 14, 2009 4:26 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Your structure is deep nested and will not be supported by content conversion.

Suggest you to use row record format, as described here

/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter

Mapping can be bit complicated here, java mapping will help you

former_member187339
Active Contributor
0 Kudos

Hi Torben,

>>I want to create an IDoc from a flat file.

So you are using File content Conversion on the sender side. Right?

>>no information from the nodes "Node003" to "Node005" is inserted in the IDoc.

Are these information available in the source XML (you can check in transaction SXMB_MONI-> Input Payload).. There is a limitation in File Content Conversion of File adapter and it is that I can make an XML structure of 3 level.. Since these nodes details are in level 4 and 5 they should be missing in Source XML structure itself (after content conversion of File adapter). check that

>>So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?

So you need to take an alternate approach where you do File Content Conversion and make 3 level structure.. then using a mapping convert this three level structure to your 5 level one and then try to map with the idoc.

Check this blog for an idea

http://www.riyaz.net/blog/xipi-file-content-conversion-for-complex-structures/

http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphica...

Regards

Suraj

Former Member
0 Kudos

Hi ,

I think you have Header and Item details in the file structure . If you have done a 1:1 mapping then only the fields in the header will be reflected in the Idoc .

SO try to use the nodal functions , UseOneasMany , RemoveContext , SplitbyValue .....etc .So that you can achive your target structure.

Regards,

Jude