cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Multiple receiver in Reciever Determination

former_member190358
Participant
0 Kudos

Hello Everyone,

I am working on the scenario in which i have to send data to different system depending upon the sending payload..

My condition editor is as follows :

If

/ShipmentData/SalesCompanyCode  = A or /ShipmentData/SalesCompanyCode = B \

then , Receiver 1

else /ShipmentData/SalesCompanyCode  = empty

then , Receiver 2.

But, the data is not getting branched and instead, the idoc gets created in both the receiver .

Pls find the screen shot.

Kindly help me out in solving this issue....

Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If in case u have only one occ of company code and depending upon that u have to decide the receivers then chk below condition:

/p1:Mt/ShipmentData[SalesCompanyCode ='A' or SalesCompanyCode='B']---> Receiver 1

/p1:Mt/ShipmentData[string-length(SalesCompanyCode)=0] ---> Receiver2

Thanks

Amit Srivastava

former_member190358
Participant
0 Kudos

Hello Amit,

is this ok now :

Former Member
0 Kudos

Hi,

Use String-length function and 0 wil be inside the closing square bracket and try to replicate the second condition in the same way as i have stated above and then chk.

Thanks

Amit Srivastava

Message was edited by: Amit Srivastava

Former Member
0 Kudos

Chk this:

former_member190358
Participant
0 Kudos

Hi Amit,

Should the values be in quotes like '00029606' or just 00029606 ?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

if the declared type is string then give quote else leave as number

Former Member
0 Kudos

Hi,

Use single quotes (i guess u have taken this as a string filed)

Thanks

Amit Srivastava

former_member190358
Participant
0 Kudos

Hello amit and baskar,

This is how it looks like

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Looks correct now. Test and let us know the results now.

former_member190358
Participant
0 Kudos

Hello Baskar and Amit,

The testing in ID failed with "  No receiver found "  ..

The payload is as follows

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

<ShipmentData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <Carrier>NPO1</Carrier>

  <BolNumber>11731032315</BolNumber>

  <CarrierReferenceNumber />

<SalesCompanyCode>00029606</SalesCompanyCode>

  <SalesCompanyName>Panasonic Industries Europe</SalesCompanyName>

  <Container>

    <ContainerNumber>NEC99691513</ContainerNumber>

     <ShipmentEvents>

      <EventDetails>

        <EventCode>30E</EventCode>

        <Location>AMS</Location>

      </EventDetails>

    </ShipmentEvents>

  </Container>

</ShipmentData>

Former Member
0 Kudos

Hi Ravi,

>>This is how it looks like

U have entered worng XPATH...Remove "/" after shipment data.

Cross check ur condition and correct the same... it wil work

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Ravi ,

Please confirm if you have defined your Communication Component With / Without party.

If it is originally defined as with party (or party as ' * ') you may need to update your receiver determination accordingly.

Thanks,

Jyoti

Former Member
0 Kudos

Have your  solved the problem ?

If not then share your screen shot of condition editor for both the condition.

if yes them make this thread as answerd.

thanks and reagrds,

Anup Banerjee

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Ravi,

You have configured reciever determination is correct in operation specific mode.

why are you doing End to End test first do test in Test configuration tool in ID part.

Please share piece of your payload which u applied the condition.

And wht do u mean by empty value

The Tag must be present on the payload as

<SalesCompanyCode><SalesCompanyCode> for satisfying the second condition.

thanks and regards,

Anup Banerjee

zameerf
Contributor
0 Kudos

Hi Ravi,

I believe the input message you were using has SalesCompanyCode=A, SalesCompanyCode=B and SalesCompanyCode = blank together; and as said by Greg, this message will be evaluated for 1st Receiver and 2nd Receiver separately. Now since both the conditions are satisfied, it would be sent to both receivers.

It would be better to use Extended Receiver Determination and determine the receiver via message mapping at runtime in your case.

former_member184681
Active Contributor
0 Kudos

Hi Ravi,

The conditions you define are not exclusive (they are not evaluated on the if-else rule). Instead, every single receiver, for which the condition is met, receives the whole message. So in your case, it means that if your message contains a shipment that has SalesCompanyCode = A or B, and another shipment that has an empty SalesCompanyCode, the message gets split and sent to both receivers.

Regards,

Greg

former_member190358
Participant
0 Kudos

Hi Greg,

If i go by your inputs,

then why it happened that when we tested with the payload which had data as

" /ShipmentData/SalesCompanyCode  = A "

then the idoc were created in both the receiver.

However,  the idoc should have created only in PT2CLNT490.

Regards,

Ravi

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Just want to make sure.. Do you have one and only occurence of companycode in that message and still it goes to both the receivers? 

former_member190358
Participant
0 Kudos

Hello Bsskar,

Yes, its only one occurrence and either it will have value or it will be empty.

Regards,

Ravi