on 09-13-2007 10:32 AM
I have the following Source structure
<root> (1...Unbounded)
<field1>
<field2>
<field3>
</root>
and need to map this in
<target>
<fields1>
<struct1>
<field2>
</struct1>
<struct1>
<field3>
</struct1>
</target>
i.e i need to create twice the struct1 one for each field (field2, field3) no matter how many rows I have...
Example:
<row>
<f1>1.1
<f2>1.2
<f3>1.3
</row>
<row>
<f1>2.1
<f2>2.2
<f3>2.3>
</row>
should result:
<target>
<f1>1.1
<struct1>
<f>1.2
</struct1>
<struct1>
<f>1.3</f>
</struct1>
</target>
Please advide
Hi,
You don't need UDF for this...
Create your target Message type as
<target>(1)
<fields1>(0---1)
<struct1>(0---unbounded)
<field2>(0---1)
<field3>(0---1)
</struct1>
</target>
here in your mapping right click on struct1 node and choose Duplicate Subtree
Now map like this
<field1>------<fields1>
<field2>-------<field2>(In the 1st struct1 node)
<field3>-------<field3>(In the 2nd struct1 node)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer. But the problem is that the target structure is a standard IDOC and can not be change to be more exact:
The target message has two fields
<row>
GIDate
DocDate
</row>
and need to create two segments of the idoc SHP_IBDLV_CONFIRM_DECENTRAL.SHP_IBDLV_CONFIRM_DECENTRAL02
for segment E1BPDLVDEADLN where TIMETYPE and TIMESTAMP_UTC changes based on the two flat fields of the row structure:
e.g.
if I have
<row>
...
<deliveryNo>1111111111
<GIdate>20070909</gidate>
<DocDate>20071010</DocDate>
...
</row>
...
in the Idoc I neew to have
<E1BPDLVDEADLN>
<DELIV_NUM>1111111111
<TIMETYPE>WSHDRWADTI
<TIMESTAMP_UTC>20070909
</E1BPDLVDEADLN>
<E1BPDLVDEADLN>
<DELIV_NUM>1111111111
<TIMETYPE>WSHDRLFDAT
<TIMESTAMP_UTC>20071010
</E1BPDLVDEADLN>
I hope this is more clear...
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.