cancel
Showing results for 
Search instead for 
Did you mean: 

Help!! - File to Idoc Mapping with Nested structure

Former Member
0 Kudos

Scenario:

I have an inbound file that has three nested records.

eg. A00, B00 and C00. C00 is nested structure of B00 and B00 nested structure of A00. All these structure can repeat N number of times in a file.

How do I map this to IDoc structure that have one segment each for the three structures in the file and nested in the same way.

Question: How is the parent child relationship established?

Suppose I have a file

A00 1234 Sam 29

B00 london LE3 XYZ

B00 US 123456

C00 2 XYZ

A00 5678 Joe 22

B00 US 23456

If I make a nested structure and then say in the file conversion properties that A00 go to segA and then B00 go to segB, but then when I come back to A00, how do I move the data to the A00?

Thanks in Advance

Rgds

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kartik,

With the SAP XI graphical mapper this is very complex and you will userdefined java functions for this. Standard you can't make relationships between structures. It is easier to map this in XSLT.

Cheers,

Frank

Former Member
0 Kudos

Hi Frank,

Thanks for the reply.

I think I have not explained my Query pretty well!!.

I wanted to know, what should be the data structure for transferring the data from file to the Data structure and then to be given to XSLT to be maipulated.

My destination data structure would be the standard nested segments in the IDoc but for the File Adapter I need to create a message type to move the data from file Adapter to message type before transferring it to IDoc structure with the help of maaping technique.

Since the data in the file is in nested structure, how does the parent child relationship is established for moving the data into the message type that I have created.

Hope this explains it better??

Regards

Former Member
0 Kudos

From what you have layed out, you can create a data type with 3 children, all 1..unbounded cardinality, each containing their own elements. You say they are nested, but the example you gave isn't nested... it's just A's followed by B's followed by C's. If that is the case, you can then use a data type w/ 3 subelements (A, B & C) and each of those is actually a container with the real attributes of that line in your file. (I can email you a schema quickly if you need it)

If you are saying they can occur like this:

A00 1234 Sam 29

B00 london LE3 XYZ

B00 US 123456

C00 2 XYZ

B00 US 23456

C00 2 XYZ

THEN they are nested - ie B's & C's repeat under any A. Then you must create segment B as a subelement of segment A instead of on the same level, then bury C under B. (I find this easiest w/ a text tool rather than inside XI, as I can cut/paste segments where I want them to belong...)

Good luck with setting up content conversion on that file adapter... We have done this a few times, and it can be quite interesting.

If you have trouble with the schema, you can post your email & I can give you a quick example.

Message was edited by: Amanda Derringer

Former Member
0 Kudos

Hi Amanda,

Thanks for the Reply.

My e-mail id is vijaya.kumari@wipro.com. Please can u mail me the schema on this id and I can explain in more detail as to what the requirement is.

Thanks once again

Regards