cancel
Showing results for 
Search instead for 
Did you mean: 

Split mapping created no messages

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

VijayKonam
Active Contributor
0 Kudos

You should insert a context change while mapping to 1..unbound nodes. Use the SplitByValue node function.

VJ

Former Member
0 Kudos

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

Former Member
0 Kudos

Can you put your payload-?

Source and target. ie.

Fiel1----


> Target 1

...Fiel2----


> Target 2

..........

Former Member
0 Kudos

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.

Former Member
0 Kudos

How do you populate your item node?

something like this.

item(source tab1)--->item(target)

Edited by: Luis Ortiz on Sep 22, 2010 11:17 PM

Former Member
0 Kudos

The mapping is very simple Luis (at least what I did):

From target ITAB, each field is mapped to a corresponding field of source itab (wherever name is same).

So NACHN of target is mapped to IT_TAB2-NACHN, STRAS of target is mapped to IT_TAB3-STRAS.

No forumula applied. Direct mapping.

Former Member
0 Kudos

Hi.

I know that is very simple Mapping Aishi A.. I said how do you populate your root.

like this

item1->removecontex-->item1

PERNR------>PERNR

BUKRS----->BUKRS

.............

STRAS---->STRAS

Former Member
0 Kudos

No, as I said in my msg - no removecontext, nothing.. just direct one to one of the fields...

What's amiss then?

Former Member
0 Kudos

Any suggestions guys, how can I achieve this? Your help is greatly appreciated.

Former Member
0 Kudos

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?

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
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?

Former Member
0 Kudos

Yes Abhishek. Occurrence of both source and target is 0..unbounded in both Message Mapping as well as Operational Mapping.

I did not use any functions like split / removeContext etc. Direct mapping of field in target to field in source.

Former Member
0 Kudos

hi.

how do you populated your fields?