cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Mapping N:1 Mapping

Former Member
0 Kudos

Hi ,

I want to test N:1 mapping at design time

Source MsgType 0 to unbound in Msg Mapping

Interface mapping Source MI 0 to Unbound

Target MsgType and MI are 1

To add more I am using pattren : Collect & Merge in BPM

in the Test tab of MsgMapping when i give the i/p xml

as :

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:Filesender_MT xmlns:ns1="http://BPM.kraft.com">

<ID>1</ID>

</ns1:Filesender_MT>

</ns0:Message1>

<ns0:Message2>

<ns1:Filesender_MT xmlns:ns1="http://BPM.kraft.com">

<ID>2</ID>

</ns1:Filesender_MT>

</ns0:Message2>

</ns0:Messages>

Intended O/p :

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:Filesender_MT xmlns:ns1="http://BPM.kraft.com">

<ID>1</ID>

<ID>2</ID>

</ns1:Filesender_MT>

</ns0:Message1>

How to achieve the above scenario using Graphical Message Mapping ?

Regards,

klk

Message was edited by: K.L.K

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member206604
Active Contributor
0 Kudos

Hi,

You can achieve this using Graphical mapping ..

I think your mapping would be like this

Source <ID> -- <ID> Target

You need to change the Context of the ID of the source noode to <b>Messages</b> to the root node.

Thanks,

Prakash

Former Member
0 Kudos

prakash,

No luck prakash. second ID element is not getting created

Regards

klk

henrique_pinto
Active Contributor
0 Kudos

Make sure you have defined the ID field as unbounded in your Message Type.

You could make it easily using XSLT mapping.

Just do something like this:

...

<Filesender_MT xmlns="http://BPM.kraft.com">

<xsl:for-each select="//ID">

<xsl:copy-of select="."/>

</xsl:for-each>

</Filesender_MT>

...

Regards,

Henrique.

former_member206604
Active Contributor
0 Kudos

Hi,

You can test only in the interface mapping by uploading the XML file that you have posted. Or you can try the same in Integration Directory with the option Test Scenario.

Thanks,

Prakash

Former Member
0 Kudos

Hi Prakash,

I tried in the Interface mapping as well but

I get only the first ID (ID in the first message)

I am not getting second ID

Can I achieve this using Graphical mapping ? or do I need to do Java / XSLT mapping

Regards,

KLK