on 01-26-2011 8:51 AM
Hi All,
I have a issue I couldn't solve in mapping.
My Request Structure is like:
<Record>
<item>
<partnr>000010</partnr>
</item>
<item>
<partnr>000020</partnr>
</item>
<row>
<partnr>000010</partnr>
<field3>abc</field3>
</row>
<row>
<partnr>000010</partnr>
<field3>abc1</field3>
</row>
<row>
<partnr>000020</partnr>
<field3>abcd</field3>
</row>
<row>
<partnr>000020</partnr>
<field3>abcd1</field3>
</row>
</Record>
My request shoud look like this:
<item>
<partnr>000010</partnr>
<fielda>abc</fielda>
<fielda>abc1</fielda>
</item>
<item>
<partnr>000020</partnr>
<fielda>abcd</fielda>
<fielda>abcd1</fielda>
</item>
I have to combine the structure according to their partnr. There can be many rows under one partnr. It is like we have a partnumber and this partnumber contains subparts. These parts can be 1,2 or more. At the end I have to combine them in one structure.
I couldn't solve it with graphical. Can anyone help.
Thanks.
when the partner numbers come sortet, then you can do:
field3 \
partnr * - removeContext - splitbyValue(value changed) - formatByExample - fielda
partnr under row
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I do this it gives me the following output:
<item>
<partnr>000010</partnr>
<fielda>abc</fielda>
<fielda>abc</fielda>
</item>
<item>
<partnr>000020</partnr>
<fielda>abcd</fielda>
<fielda>abcd</fielda>
</item>
But I am searchin for a solution to get the output below:
<item>
<partnr>000010</partnr>
<fielda>abc</fielda>
<fielda>abc1</fielda>
</item>
<item>
<partnr>000020</partnr>
<fielda>abcd</fielda>
<fielda>abcd1</fielda>
</item>
There is the problem.
Hi Stefan,
Thanks for your help. Now the structure is deeper then I thought. See below the example:
Request:
<E1EDL24>
<POSNR>000010</POSNR>
<MATNR>000000000000001001</MATNR>
</E1EDL24>
<E1EDL24>
<POSNR>000020</POSNR>
<MATNR>000000000000001001</MATNR>
</E1EDL24>
<E1EDL24>
<POSNR>000030</POSNR>
<MATNR>000000000000001001</MATNR>
</E1EDL24>
<E1EDL24>
<POSNR>000040</POSNR>
<MATNR>000000000000001055</MATNR>
</E1EDL24>
<E1EDL37>
<EXIDV>00000000000000100000</EXIDV>
<E1EDL44>
<POSNR>000010</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100001</EXIDV>
<E1EDL44>
<POSNR>000010</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100004</EXIDV>
<E1EDL44>
<POSNR>000020</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100005</EXIDV>
<E1EDL44>
<POSNR>000020</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100006</EXIDV>
<E1EDL44>
<POSNR>000030</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100007</EXIDV>
<E1EDL44>
<POSNR>000030</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100012</EXIDV>
<E1EDL44>
<POSNR>000040</POSNR>
</E1EDL44>
</E1EDL37>
<E1EDL37>
<EXIDV>00000000000000100013</EXIDV>
<E1EDL44>
<POSNR>000040</POSNR>
</E1EDL44>
</E1EDL37>
Result:
<item> (for each E1EDL24 one item is created)
<MATNR>000000000000001001</MATNR>
<POSNR>000010</POSNR>
<CASE1>00000000000000100000</CASE1> (first EXIDV for that posnr)
<CASE1>00000000000000100001</CASE1> (second EXIDV for that posnr)
</item>
<item>
<MATNR>000000000000001001</MATNR>
<POSNR>000020</POSNR>
<CASE1>00000000000000100004</CASE1> (first EXIDV for that posnr)
<CASE1>00000000000000100005</CASE1> (second EXIDV for that posnr)
</item>
<item>
<MATNR>000000000000001001</MATNR>
<POSNR>000030</POSNR>
<CASE1>00000000000000100006</CASE1> (first EXIDV for that posnr)
<CASE1>00000000000000100007</CASE1> (second EXIDV for that posnr)
</item>
<item>
<MATNR>000000000000001055</MATNR>
<POSNR>000040</POSNR>
<CASE1>00000000000000100012</CASE1> (first EXIDV for that posnr)
<CASE1>00000000000000100013</CASE1> (second EXIDV for that posnr)
</item>
Is this possible with graphical mapping.
Hi Stefan,
I got it work. It worked when I changed the result field. First I had two Case fields. After I made 1 case field with occurence 1 to unbounded it worked.
Now I have one last question.
In my field I get this
<item>
<Case>0000000001<Case>
<Case>0000000002<Case>
<Case>0000000003<Case>
<Case>0000000004<Case>
<Case>0000000005<Case>
</item>
Now I have to take just the first and the last ones. SAP sents everthing one by one. Byt the 3rd party system wants just the first and the last one.
How can I get this? Maybe in a single field concatenated or two field:
<item>
<Case>0000000001<Case>
<Case>0000000005<Case>
</item>
Or
<item>
<Case>0000000001 0000000005<Case>
</item>
Thanks very much.
When you want to have it in the same field, you have to write a Java function for it.
When you want it in different fields, you can combeine functions like this:
first entry: case - index - equals(1) - ifwithoutelse (case) - target1
last entry case - index - equals ( case - count ) - ifwithoutelse (case) - target2
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.