cancel
Showing results for 
Search instead for 
Did you mean: 

XPath Error in Receiver Determination

former_member189418
Participant
0 Kudos

Hi All,

I hav an outbound message coming out of ERP (Non IDoc). I have to route the message based on the field DESTINATION in the message. The payload in the SXMB_MONI is as follows.

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

<nr1:OLabelling_OB xmlns:nr1="http://cpe.com/cpe_ftp_wms/Labelling/OL">

<Label>

<b><DESTINATION>XXXX</DESTINATION></b>

<PRPRORD>0001005683</PRPRORD>

</Label>

</nr1:OLabelling_OB>

In the receiver determination, I hav chosen the XPath button and given the following value

<b>/nr1:OLabelling_OB/Label/DESTINATION</b>.

This doesn't work. i had also tried giving the namespace and the prefix as

<b>nr1</b> <b>http://cpe.com/cpe_ftp_wms/Labelling/OL</b>. but that dint help either.

If i remove the condition, then it is working fine.

Any help in this regard?

Thnx in Advance.

Anil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

why dont you try creating a context object and then assign this context object to your element in the outbound message interface.Now, you can use the context object instead of Xpath in your condition.

Cheer's

former_member189418
Participant
0 Kudos

Hi Dreamcatcher,

I had already tried creating a context object and assigned it to the interface in the repository. but the problem here is that i cant c my context object in the list of the available context objects in the condition editor. all the context objects that are displayed are the satndard ones given by SAP.

Anil

Former Member
0 Kudos

Also whats the condidtion your are using? are you getting any error or the rounting is not happig according to the logic.

Cheer's

former_member189418
Participant
0 Kudos

The logic is simple. no functions involved. if the field DESTINATION is equal to xxxx , the receiver shud by MYRCV1.

Former Member
0 Kudos

have you activated the changes in the IR after assigning the context object.you should be able to see it in the list.

just refresh you cache once.

Message was edited by:

Dreamcatcher

former_member189418
Participant
0 Kudos

I had activated and checked......it was not getting displayed.......

But i checked the xpath rules and used a work around solution for this. as per the xpath rules if i enter xpath as //DESTINATION, it picks up the DESTINATION field from anywhere in the document. and that worked.

Thnx for ur help so far...

anil

Former Member
0 Kudos

Can you try this?

/p1:OLabelling_OB/Label/DESTINATION

former_member189418
Participant
0 Kudos

Tried as well.......but of no use.....

Anil