cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping question

Former Member
0 Kudos

Hi,

We have a mapping related question. The source side has an XML structure with some elements are repeatable (max occurs > 1). On the target side we have an IDOC with segments being repeatable (max occurs 999 etc.,). If i have want to map one field present under a repeatable element in the source, to, an idoc field present under a repeatable segment on the target, do i need to use a logic(looping etc.,) to map all the occurence of the data OR direct mapping b/w fields will suffice ? The source and target structures are different.

The mapping could be graphical or XSLT.

I appreciate your reply.

Regards

Ganesh

Accepted Solutions (0)

Answers (3)

Answers (3)

prabhu_s2
Active Contributor
0 Kudos

as pointed out it is straight....not req to loop in or use a udf. u need to map the source node to its resp target node and the corresponding subfields

Former Member
0 Kudos

Ganesh,

Direct mapping would suffice in your case. Do the direct mapping (both source and target node have max occurance >1) and go to test mode in the mapping and give some value for the source node and execute the mapping and check the result. You can give multiple values by right clicking the node and selecting the option "Duplicate subtree".

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

You dont need any loop.

If the context of source and targets are on the same level a straight mappping would be sufficient.

Regards

Bhavesh

Former Member
0 Kudos

Thanks the quick response. Let me confirm my understanding.

For Ex :

Source :

<Element1> <--MaxOccrs10

Field1

<b>Field2</b>

Field3

<Element2>

Field1

Field2

Field3

Target:

<Segment1>

Field1

Field2

Field3

<Segment2> <--MaxOccrs 99

<b>Field1</b>

Field2

Field3

Can i map the bolded ones ?

I appreciate your reply

Regards

Ganesh

bhavesh_kantilal
Active Contributor
0 Kudos

You sure can.

There is no concept of loop in XI. You just need to use straight mapping and or Node functions to map the different hiearchical elements to the target side.

You might need to change the context of your source field at times, but in general answering tyour question~ this is a standaard requirement in XI and can be done.

Regards

Bhavesh

Former Member
0 Kudos

Hi,

Yes you can map ,

and also you should map the respective parent node to target parent node.element1 -- segment2

Regards

Chilla

Message was edited by:

Chandra Sekhar Chilla