on 06-26-2012 1:54 PM
Hi,
back to mapping...
A message provides such content:
<Message>
<main>
<sub>1234</sub>
<low>ABC</low>
</main>
<main>
<sub>1234</sub>
<low>ABC</low>
</main>
<main>
<sub>3456</sub>
<low>BCD</low>
</main>
<main>
<sub>3456</sub>
<low>BCD</low>
</main>
<main>
<sub>3456</sub>
<low>BCM</low>
</main>
</Message>
For each <sub>/<low> combination I need to create one target node....
<Message2>
<target>
<value>1234</value>
<low>ABC</low>
</target>
<target>
<value>3456</value>
<low>BCD</low>
</target>
<target>
<value>3456</value>
<low>BCM</low>
</target>
</Message2>
Maybe this is too simple but I am stuck......
Your help is welcome....
Regards
Dirk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thank you!
It works with this:
concat -> remove Context -> splitByValue(Value Change) -> collapseContexts -> target
It was the added <sort> that killed me.
Regards
Dirk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Dirk,
For the subnodes and fields, you could try using somehow similar logic, together with sortByKey function. I mean, your fields could be sorted by the results of:
X = value (context: Message), low (context: Message) -> concat (separator ":") -> sort -> splitByValue(Value Change)
So use this sort of mapping:
field1 -> sortByKey (X) -> target1
Regards,
Greg
Hi Dirk,
The concat function could be a solution for you:
value (context: Message), low (context: Message) -> concat (separator ":") -> sort -> splitByValue(Value Change) -> removeContexts -> target
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dirk,
So Sub and low field is your key field so first concate them then use the following logic which is describe in following thread
http://scn.sap.com/thread/3190674
Regards
Gagandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.