cancel
Showing results for 
Search instead for 
Did you mean: 

Split one message into may and to dsifferent systems.

Former Member
0 Kudos

Hi.

Wonder if anybody out there has a paper on how to split a message into many messages and after that send the messages to different targetsystems.

For example:

<Node>

<Segment/>

</Node>

<Node>

<Segment/>

</Node>

<Node>

<Segment/>

</Node>

<Node>

<Segment/>

</Node>

Result would be that the target system gets a part of the message.

Target 1

<Node>

<Segment/>

</Node>

Target 2

<Node>

<Segment/>

</Node>

Target 3

<Node>

<Segment/>

</Node>

Target 4

<Node>

<Segment/>

</Node>

BR

Kalle

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

use multimapping;

BPM involved:

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi

Without BPM:

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Former Member
0 Kudos

The examples you gave me had a limit.

I know exactly how the incoming message looked and how many target messages there was to come out. This is not the case for me. I might was a little unclear on that point.

<Node>

<Segment/>

</Node>

<Node>

<Segment/>

</Node>

<Node>

<Segment/>

</Node>

<Node>

<Segment/>

</Node>

Each node here would create a one message.

See it as an multiple message inside one message. There can be 1 node inside the message and there can be infinity numbers of nodes inside the message. The solution should create as manny output messages as there are nodes inside the message.

The output from the file above should be:

Message1:

<Node>

<Segment/>

</Node>

This should be routed to one system depending on the data inside it.

Message2:

<Node>

<Segment/>

</Node>

This message can be routed to an other system depending on the data inside it.

Message3:

<Node>

<Segment/>

</Node>

This message can be routed to an other system depending on the data inside it.

Message4:

<Node>

<Segment/>

</Node>

This message can be routed to an other system depending on the data inside it.

I hope it's clearer now or do i missunderstand the bloggs you posted?

BR

Kalle

Former Member
0 Kudos

HI Kalle,

In your message mapping, change the occurance of your target from 1 to 0..unbounded.

In the mapping design, you have to play around the standard node functions to achieve your requirement.

I had created a simple mapping as per your given structure.

Check out the mapping and the way output generated : ( 3 slides with the today's date stamp)

http://picasaweb.google.com/pooja13pandey/SDNSAPComForum#5291899535327300018

Let us know, if you still have some doubt.

Thanks,

Pooja

Former Member
0 Kudos

Will check that link when I get home from work. The link get blocked in our network.

BR

Kalle

Former Member
0 Kudos

The soultion you posted will create the messages like this?

<Message>
   <Node>
      <Segment/>
   </Node>
   <Node>
      <Segment/>
   </Node>
   <Node>
      <Segment/>
   </Node>
   <Node>
      <Segment/>
   </Node>
</Message>

I'm looking for a solution to get the following result:

<Message1>
   <Node>
      <Segment/>
   </Node>
</Message1>

<Message2>
   <Node>
      <Segment/>
   </Node>
</Message2>

<Message3>
   <Node>
      <Segment/>
   </Node>
</Message3>

<Message4>
   <Node>
      <Segment/>
   </Node>
</Message4>

Former Member
0 Kudos

You can Write a User defined Function .....

If the requirement is

For example i am getting a value"INDIA WON MATCH" from source side string value.

I need to split it into three values say

variable one towards the target side needs "INDIA"

Variable 2 need"WON"

Variable 3 needs"MATCH"

You create An UDF:

//write your code here

String res = "";

for(int i = 0;i<xmlString.length();i++)

{

if(xmlString.charAt !='')

{

res = res + xmlString.charAt (i);

}

else

{

Add values to your String Array;

reset value of string res; //to take next values

}

}

return result[];

or the Other UDF is :

You should opt Advanced UDF

function myudf(String a, ResultList result, Container container)

{

String [[]] temp = null;

temp = a.split(" ");

for (int i = 0 ; i < temp.length ; i++) {

result.addValues(temp<i>);

}

make targe node as o..unbounded.

source msg> myudf>splitbyByValue(each Value)>CollapseContext>Target node