cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping UseOneAsMany Map multiply subtree

former_member301120
Active Participant
0 Kudos

Hello,

I've got following source structure.


<struct>
   <field>
   </field>
   <field1>
   </field1>
   <field2>
   </field2>
   <field3>
   </field4>
</struct>

Is it possible to multiply the complete struct in one mapping or have I to create serveral mappings with "useoneasmany" for each <field*> Tag

Thanks Christian

Accepted Solutions (0)

Answers (4)

Answers (4)

justin_santhanam
Active Contributor
0 Kudos

Christian,

I would suggest you to go for CopyValue function.

field1->Copyvalue(0)-->field1

field2->Copyvalue(0)-->field2

field3->Copyvalue(0)-->field3

The above will solve your problem. One more thing, what's the occurence of field1....field3, is it 0..1 or 1..1?

raj.

former_member301120
Active Participant
0 Kudos

Yes,

the source structure is following:


<struct>
   <field>
   </field>
   <field1>
   </field1>
   <field2>
   </field2>
   <field3>
   </field4>
</struct>
<table>
     <item>
           <field></field>
           <field></field>
     </item> (occurance 0..unbounded)
</table>

this i want to map to following struc


<line> (0..unbounded)
<struct>
   <field>
   </field>
   <field1>
   </field1>
   <field2>
   </field2>
   <field3>
   </field4>
</struct>
<field></field>
<field></field>
</line>

I hope you understand

Former Member
0 Kudos

Hello,

like said above only map struct to struct and all containing fields in source to fields in target.

How do you know how many 'line'-elements you need?

Regards

Patrick

former_member301120
Active Participant
0 Kudos

Hello,

target structure is


<bla>
<struct>
   <field>
   </field>
   <field1>
   </field1>
   <field2>
   </field2>
   <field3>
   </field4>
</struct>
<field5></field5>
<field6></field6>
<bla>
<bla1>
<struct>
   <field>
   </field>
   <field1>
   </field1>
   <field2>
   </field2>
   <field3>
   </field4>
</struct>
<field7></field7>
<field8></field8>
<bla1>

Regards

justin_santhanam
Active Contributor
0 Kudos

Christian,

So u want all the elements from the Source Struct needs to go to target Struct isn't it?

raj.

Former Member
0 Kudos

Hello,

i would say that you have to map each field in one separate mapping, but that you don't have to use the 'oneAsMany'-function because the source and target structure of <struct> is identical.

Regards

Patrick

Former Member
0 Kudos

Hello,

how does your target structure look like and how exactly you want to map your source to your target?

Regards

Patrick