on 04-26-2012 10:55 PM
Hello Everyone,
My requirement is where customer is sending an XML message and this gets converted into IDOC.
This XML message has one node which if it has value as X and Y , then it should go to one ERP system.
And if this tag is empty or other than X and Y, then it should go to another ERP system.
So, i have set the rule in receiver determination, but it is not working.
The rule is if
/shipment/SalesCodeCompany = "X" OR /shipment/SalesCodeCompany = "Y"
then ERP1
else if
/shipment/SalesCodeCompany = space OR /shipment/SalesCodeCompany Not equal to "X" OR /shipment/SalesCodeCompany not equal to " Y "
then ERP2.
But this is not working .
Everytime, the idoc is getting created in both the ERP systems, irrespective of the value in the node.
I dont know whats wrong. PLs comment.
Ravi
Hi Ravi,
The issue is with your "else" condition. It says: code not equal "X" OR code not equal "Y". And this is always true, because if code = "X", then the second part is true (code <> "Y"), and if code = 'Y", then the first condition is met (code <> "X").
Instead of defining the else as you have it now, leave your condition for Receiver A as you have it, and choose Receiver B as the default receiver if the condition for system A is not met (the real "else"), as follows:
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi
you can make ur else condition like that:
/shipment/SalesCodeCompany = space OR (/shipment/SalesCodeCompany Not equal to "X" AND /shipment/SalesCodeCompany not equal to " Y ")
Regards
Gagandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ravi,
Apart from what Greg suggested, there is one more way. In the receiver determination steps, define 2 receivers but just define condition (/shipment/SalesCodeCompany = "X" OR /shipment/SalesCodeCompany = "Y") for first receiver (ERP1). For the second receiver, leave the condition field blank. This means that the message will go to first receiver (ERP1) only when the condition is true. Else in all other cases, it will go to second receiver ERP2.
Regards,
Amar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amar,
Actually what you're saying isn't true, if you asked me. If you provide two lines in receiver determination, one with condition and one without, here is how it will work:
- if the condition is met, message will be sent to both receivers (which is incorrect, as Ravi has already stated)
- if the condition is not met, message will only be sent to the second (unconditional) receiver.
In other words, the second receiver is not considered as an "else" receiver.
Regards,
Greg
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.