on 09-22-2010 2:26 PM
Hi All.
I tried to create one very simple mapping.
I have 3 nodes in source message. Target has one node, which is taking some fields from node1, some from N2, some from N3.
If occurence is 1:1, it works fine.
If occurence is 1:unbounded, then I get error Split mapping created no messages.
I did not give any split.
To elaborate:
my incoming msg like this:
<ns1:Y_RFC_TEST xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
<IT_TAB1>
<item>
<some fields/>
</item>
</IT_TAB1>
<IT_TAB2>
<item>
<some fields/>
</item>
</IT_TAB2>
<IT_TAB3>
<item>
<some fields/>
</item>
<?IT_TAB3>
Outgoing msg is of simple type: <ITAB> < fields > </ITAB>
Both incoming and outgoing of 0..Unbounded.
What's going wrong here?
Thanks in adv.
You should insert a context change while mapping to 1..unbound nodes. Use the SplitByValue node function.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There will be one record in each of the corresponding tables IT_TAb1-tab3.
Then the outgoing msg will take some fields from tab1, some from tab2, some from tab3 for each record since all tables (tab1 to tab3) will have same number of records always.
Vijay: Could you elaborate more on what you are saying, i could not understand it. Sorry
Okay, this is my incoming msg:
?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Y_RFM_TEST xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IT_TAB1>
- <item>
<PERNR>00001001</PERNR>
<ENDDA>9999-12-31</ENDDA>
<BEGDA>1994-01-01</BEGDA>
<BUKRS>1000</BUKRS>
<WERKS>1300</WERKS>
<PERSG>1</PERSG>
<PERSK>DU</PERSK>
<ORGEH>50000073</ORGEH>
<PLANS>50000076</PLANS>
<STELL>50011880</STELL>
</item>
- <item>
<PERNR>00001002</PERNR>
<ENDDA>9999-12-31</ENDDA>
<BEGDA>1994-01-01</BEGDA>
<BUKRS>1000</BUKRS>
<WERKS>1300</WERKS>
<PERSG>1</PERSG>
<PERSK>DT</PERSK>
<ORGEH>50000563</ORGEH>
<PLANS>50000083</PLANS>
<STELL>50011879</STELL>
</item>
</IT_TAB1>
- <IT_TAB2>
- <item>
<PERNR>00001001</PERNR>
<NACHN>Testing01</NACHN>
<TITEL>Mr</TITEL>
<GBDAT>1998-12-06</GBDAT>
</item>
- <item>
<PERNR>00001002</PERNR>
<NACHN>Testing02</NACHN>
<TITEL>Mr</TITEL>
<GBDAT>1984-11-16</GBDAT>
</item>
</IT_TAB2>
- <IT_TAB3>
- <item>
<PERNR>00001001</PERNR>
<ANSSA>1</ANSSA>
<STRAS>Stuttgarter Str.67</STRAS>
<ORT01>Frankfurt/M.</ORT01>
<PSTLZ>60119</PSTLZ>
<LAND1>DE</LAND1>
</item>
- <item>
<PERNR>00001002</PERNR>
<ANSSA>1</ANSSA>
<STRAS>Bannwaldallee 889</STRAS>
<ORT01>Karlsruhe</ORT01>
<PSTLZ>76311</PSTLZ>
<LAND1>DE</LAND1>
</item>
</IT_TAB3>
</rfc:Y_RFM_TEST>
Outgoing is:
- <IT_TAB1>
- <item>
<PERNR>00001001</PERNR>
<BUKRS>1000</BUKRS>
<ORGEH>50000073</ORGEH>
<PLANS>50000076</PLANS>
<NACHN>Testing01</NACHN>
<TITEL>Mr</TITEL>
<GBDAT>1998-12-06</GBDAT>
<STRAS>Stuttgarter Str.67</STRAS>
</item>
- <item>
<PERNR>00001002</PERNR>
<BUKRS>1000</BUKRS>
<ORGEH>50000563</ORGEH>
<PLANS>50000083</PLANS>
<NACHN>Testing02</NACHN>
<TITEL>Mr</TITEL>
<GBDAT>1984-11-16</GBDAT>
<STRAS>Bannwaldallee 889</STRAS>
</item>
So each item of outgoing will take some fields from IT_TAB1, some from IT_TAB2 and some from IT_TAB3.
I was able to do by doing following:
Item -> change context to root level -> then split by value (on value change) -> map to item of target.
This works okay, but it will fail if my source IT_TAB1-3 have different no of items.
I want to take the maximum count. Lets say IT_TAB1 has 2 entries, IT_TAB2 has 3 and IT_TAB3 has 1. So my target structure should have 3 items. (max of 2,3,1).
How can I achieve it?
I have 3 nodes in source message. Target has one node, which is taking some fields from node1, some from N2, some
from N3.
If occurence is 1:unbounded, then I get error Split mapping created no messages.
Both incoming and outgoing of 0..Unbounded.
This shold not be a treated as a Split Mapping (n:1) .....did you try changing the occurence of the message in Message Mapping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi.
how do you populated your fields?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.