cancel
Showing results for 
Search instead for 
Did you mean: 

How to split the messages in the mapping

Former Member
0 Kudos

Hi Gurus,

I need to split the message into two XML message based on the value in the plant and sent it to two receivers.

How to do using Graphical mapping.

Im working in PI7.0. I dont know how to use the enhanced receiver determination. PL guide me.

This is my input message format

<ns0:Namespace>

<row>

<PlantCode>10<PlantCode>

<element1>

<element2>

<element3>

<row>

<row>

<PlantCode>40<PlantCode>

<element1>

<element2>

<element3>

<row>

<row>

<PlantCode>20<PlantCode>

<element1>

<element2>

<element3>

<row>

<row>

<PlantCode>50<PlantCode>

<element1>

<element2>

<element3>

<row>

<ns0:Namespace>

My output message should be

Message1

<row>

<PlantCode>10<PlantCode>

<element1>

<element2>

<element3>

<row>

<row>

<PlantCode>20<PlantCode>

<element1>

<element2>

<element3>

<row>

Message2

<row>

<PlantCode>40<PlantCode>

<element1>

<element2>

<element3>

<row>

<row>

<PlantCode>50<PlantCode>

<element1>

<element2>

<element3>

<row>

Based on the plant i have to split the message

1. If plant is 10 or 20 it has to go to message 1

2. If plant is 40 or 50 it has to go to message 2.

How to do...

Regards,

Rama

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

1.Create a message mapping.

2.In the mapping editor, switch to the Messages tab page

3.Specify the same target message type 2 time by choosing +

4.Switch to the Design tab page


PlantCode---removeContext---equalS
          constant[10]/                     \
                                               OR------ifWithoutElse-------Message1
                                              /              plantcode   /
PlantCode---removeContext---equalS
          constant[20]/


PlantCode---removeContext---equalS
          constant[40]/                     \
                                               OR------ifWithoutElse-------Message1
                                              /              plantcode   /
PlantCode---removeContext---equalS
          constant[50]/

Do 1 to 1 mapping between row,plantcode,element1,element2,element3 from source to target structure

create 2 target message Interface for the same target message type

Finally Create an interface mapping and reference the both target interfaces in target interfaces. Enter your message mapping in the interface mapping.(1--source Interface and 2 target Interfaces)

In ID, Interface determination choose Enhanced radio button and under inbound interfaces add both the target Interfaces

Former Member
0 Kudos

Hi,

Use enhanced receiver determination .Check blog...

[/people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16]

Regards,

Prakasu.M

Former Member
0 Kudos

Hi Prakasu,

I have gone through this blog already. The problem is we are using PI 7.0. There is no option of Receiver Determination interface in the SAP BASIS. So i could not able to implement that.

Please can anyone explain this mapping

The mapping delivering the desired result is:

1) for first row

Error node -> removeContext ->lenght -> equalsA -> if

constant[0] -> equalsA

Input_message_Row -> then

output -> Output_message1_Row

1) for second row

Error node -> removeContext ->lenght -> greater -> if

constant[0] -> greater

Input_message_Row -> then

output -> Output_message2_Row

This is posted in the thread

Regards,

Rama

Former Member
0 Kudos

Hi,

Enhanced Receiver Determination is applied support package 6 onwards in PI7.0.Multimapping mapping concepts applied support package 5 onwards in PI7.0. Which support package you are using. If you are using less then support package level 5 then you can not use multimapping concept also.

Regards,

Prakasu.M

Former Member
0 Kudos

We are in Support pack 6 only. But i didnt find the ReceiverDertermination Message Interface under the software component SAP BASIS.

Former Member
0 Kudos

Hi,

Sorry..It should be support package level 7. as per your previous reply you mentioned plant is unbounded.How ever in target you require 2 message?

Regards,

Prakasu.M

former_member183908
Active Contributor
0 Kudos

Hi Rama Lakshmi,

--> You can use Multimapping in your message mapping and use Enhanced interface determination in ID

Thanks

former_member200962
Active Contributor
0 Kudos
PlantCode
                   --->equalS ------->ifWithoutElse ---> PlantCode (of Message1)
Constant(10)                            Then(PlantCode)

Apply similar logic for 20, 40, 50 Plant Codes......check and confirm......also you need to duplicate the occurence of the row node in both Message1 and Message2.....right-click ---> choose duplicate subtree.....and then do the mapping...may be you have to raise the Context of the Source PlantCode node

Regards,

Abhishek.

Edited by: abhishek salvi on Jun 29, 2009 2:17 PM

Former Member
0 Kudos

Hi Abhishek,

Thanks for ur reply.

See I have to group the the incoming XML into only two messages. Like message1 and Message 2.

I tried with ur logic. Its not working. Can u explain in detail.

Whether i need to replicate the row based on the output messages or based on plant

For example the occurance of message for each plant may vary. I need to map it accordingly. Kindly help.

Regards,

Rama

former_member200962
Active Contributor
0 Kudos

you need to duplicate the row node....your row node will have a condition attached to it...only when satisfied...the orw node and then the PlantCode under it will get executed......now this condition is the PlantCode condition which i gave in the previous reply.....instead of applying it to the PlantCode you can apply it to the row node......raise the Context of the PlantCode to the Namespace tag.....

Is it that you will have only 4 occurences of source PlantCode node??

Regards,

Abhishek.

Former Member
0 Kudos

There are N number of occurances in the input message for each plant.