cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Receiver Determination

former_member192105
Participant
0 Kudos

Hello,

I have a JMS to IDOC scenario in SAP PI 7.11. I have to check for the fields in the XML message and header fields

(DCJMSMessageProperty0, DCJMSMessageProperty1 and DCJMSType) in the JMS message and accordingly route it to Receiver1 (IDOC) or Receiver2 (JMS)

DCJMSMessageProperty0 = Sender (as represented by source JMS system)

DCJMSMessageProperty1 = Target (as represented by source JMS system)

If all the values (XML message fields and header) are present then send the message to Receiver1

If any of the XML message fields or header is missing or wrong value then send message to Receiver2

The problem is, even when all the XML message fields and the headers are present the message goes to both the receivers (this

is wrong).

When any of the XML message Fields or headers is missing then only the Receiver2 is called (this is correct)

If I check in Trace (in SXMB_MONI), I see that all the conditions for both the Receivers are satisfied.

Source Message:

<?xml version="1.0" encoding="UTF-8" ?> 
<CostumerDetails>
<UserId>1122334455:12345</TransactionId> 
<AccountNumber>9006532124</AccountNumber> 
<CostumerName>XYZ Corp</CostumerName> 
<Zipcode>310050</Zipcode> 
<SupplierId>90000231564</SupplierId> 
<Date>20031231000001</Date> 
<BOption>ACB</BOption> 
<TId>Shree</TId> 
<Type>AC</Type> 
</CostumerDetails>

Conditions for Receiver2:

(//UserId = ) OR
(//AccountNumber = ) OR
(//CostumerName = ) OR
(//Zipcode = ) OR
(//SupplierId = ) OR
(//Date = ) OR
(//BOption = ) OR
(//TId = ) OR
(//Type = ) OR
(DCJMSMessageProperty0 u2260 1122334455) OR
(DCJMSMessageProperty1 u2260 ABC1234567) OR
(DCJMSType u2260 Costumer Details) OR
(/CostumerDetails[not(UserId)] EX ) OR
(/CostumerDetails[not(AccountNumber)] EX ) OR
(/CostumerDetails[not(CostumerName)] EX ) OR
(/CostumerDetails[not(ZipCode)] EX ) OR 
/CostumerDetails[not(SupplierId)] EX ) OR
(/CostumerDetails[not(ActionDate)] EX ) OR
(/CostumerDetails[not(BOption)] EX ) OR
(/ConsumerTransfer[not(TId)] EX ) OR
(/ConsumerTransfer[not(Type)] EX ) OR
(/CostumerDetails[not(starts-with(UserId,'1122334455:'))] EX ) OR
(/CostumerDetails[not((string-length(Date)) = "14")] EX ) OR
(/CostumerDetails[not((BOption = "ACB") or (BOption = "KSB"))] EX ) OR
(/CostumerDetails[not((Type = "AC") or (Type = "KS"))] EX )

Can you please let me know where is the error?

Blog referred: /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination

~Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In your condition based on header fields you cannot evalvaute receiver as the header fields cannot be accessible using either constants or some other format...

you can access them in the mapping only..

condtion mentioned by you for the second receiver and data matches that the result its sending to receiver2..

check the condition mentioned for receiver 1 also..and check is that als matching with the data...

(i dont think you can access header values in determining receiver...)

HTH

Rajesh

former_member192105
Participant
0 Kudos

Hello,

In your condition based on header fields you cannot evalvaute receiver as the header fields cannot be accessible using 
either constants or some other format...

Cant we use the Context Objects available in Condition Editor of Receiver Determination? All the Headers (JMS, File, SOAP etc) are present there; in what case would we use these?

~Thanks.

former_member192105
Participant
0 Kudos

Hello,

I am now trying to determine receivers using Extended Receiver Determination; will update the thread with results.

I am still hopeful that the puzzle gets solved using the Standard way; suggestions are always welcomed.

~Thanks

Former Member
0 Kudos

Hi,

Sorry!! you can use those using context objects...you are right

why cannot you simplify condition and try out the same..

i.e instead of entire condition at one shot provide the few values and try it out..to get to know the condition status..

another option can be to use extended receiver determination too...(of course you are trying it...)

Regards

Rajesh

former_member192105
Participant
0 Kudos

Hello,

I got some information from the Trace in SXMB_MONI:

<Trace level="2" type="T">......attachment XI_Context not found</Trace> 
  <Trace level="2" type="T">......extracting values found: 1</Trace> 
  <Trace level="2" type="T">......attachment XI_Context not found</Trace> 
  <Trace level="2" type="T">......extracting values found: 1</Trace> 
  <Trace level="2" type="T">......attachment XI_Context not found</Trace> 
  <Trace level="2" type="T">......extracting values found: 1</Trace>

The above message attachment XI_Content not found is coming only for the conditions for Headers.

All other conditions are evaluated properly.

What could be the reason? Please help.

~Thanks.

former_member192105
Participant
0 Kudos

Hello,

Can anyone please review the conditions which I have maintained in the Receiver Determination? Are the conditions at least correct?

Below is the DynamicConfiguration log from SXI_MONITOR:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
<!--  Inbound Message 
  --> 
<SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty0">1122334455</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty1">ABC1234567</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSType">Costumer Details</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/Message/30/general" name="senderAgreementGUID">e14a8d07c7d53390b058152177c89682</SAP:Record> 
  </SAP:DynamicConfiguration>

Any help on this?

~Thanks

stefan_grube
Active Contributor
0 Kudos

I don't think you can use function not() on a node. Not() requires a boolen value as argument.

You should use a receiver detemination mapping. The XPATH that you want to use is too error prone.

former_member192105
Participant
0 Kudos

Hello,

Thank you for the reply.

I referred this wiki: http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination to check if the node exists or not. Actually if I remove the Header details from conditions, then scenario works good (used Test Configuration). Only when the Headers are used the scenario does not work as expected (end to end).

I am trying to implement Extended Receiver Determination; just wanted to avoid it as I will have to change a lot many receiver determinations.

~Thanks.

RKothari
Contributor
0 Kudos

Hello,

Can you please check if you are configuring the additional attributes ( DCJMSMessageProperty0, DCJMSMessageProperty1, etc.) under ASMA in JMS channel.

Sender JMS Adapter link:

http://help.sap.com/saphelp_nwpi711/helpdata/en/43/81af2acfa86fcde10000000a1553f6/frameset.htm

Also, can you please provide the Modules you are using in the JMS channel along with sequence.

-Rahul

former_member192105
Participant
0 Kudos

Hello,

Yes, ASMA was checked in the sender channel; had it not been checked then Receiver1 would have not been called also I gave details of DynamicConfiguration tag in SXMB_MONI which indicates that ASMA is working properly:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
<!--  Inbound Message  --> 
<SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty0">1122334455</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty1">ABC1234567</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSType">Costumer Details</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/Message/30/general" name="senderAgreementGUID">e14a8d07c7d53390b058152177c89682</SAP:Record> 
  </SAP:DynamicConfiguration>

The issue is now resolved. I made dummy change to the Receiver Determination and activated it. Now it is working fine.

I have another issue; will create a new thread for the same.

~Thanks.

Answers (0)