on 10-01-2007 2:22 PM
Hi guys!
I have following mapping issue:
source:
<a/> (1..1)
+<b/> (1..n)
++<c/> (1..n)
+++<d/> (1..1)
target
<at/> (1..1)
+<bt/> (1..n)
++<ct/> (1..1)
I need to have mapped b->bt, that's for sure, because I need so many target elements. However, in each b is c n-times and always contains the same value in context of b. I need to achieve, that ONLY FIRST D will be in ct.
When I create mapping: constant->ct (creates only 1 ct) I do not get values d from context of b! I get them all in order! Example:
<a>
<b>
<c>
<d>1</d>
</c>
<c>
<d>1</d>
</c>
</b>
<b>
<c>
<d>2</d>
</c>
</b>
</a>
I get
<at>
<bt>
<ct>1</ct>
</bt>
<bt>
<ct>1</ct>
</bt>
</at>
I need to get:
<at>
<bt>
<ct>1</ct>
</bt>
<bt>
<ct>2</ct>
</bt>
</at>
Why it ignores the context and takes all values of a? I need the first one of context b, and b is mapped correctly to bt!
Any help appriciated!
Olian.
try setting context of d to b. bcoz you want to produce ct the same no of times as that of b
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olian,
d(context to b)-->collapseContexts-->bt
d(context to b)-->collapseContexts-->SplitByvale-->ct
And tell me your result.
Thanks
Shubhankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olian,
But you have 1..1 for ct node and then how are you getting multily ct nodes under bt node.
See the below link for collapseContexts
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/4b/d11e3e1c3b120ae10000000a114084/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/4b/d11e3e1c3b120ae10000000a114084/content.htm</a>
Thanks
Shubhankar
Message was edited by:
Shubhankar Mandal
try using collapseContext() while mapping ct in the target. Play around with context
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.