cancel
Showing results for 
Search instead for 
Did you mean: 

Reg:'XPATH' Expressions in Receiver Determination

Former Member
0 Kudos

Hi All,

My scenario is an IDoc type.

Structure:

ZABCD

-


IDOC

-


TEST1

-


FIELD1

-


FIELD2

-


TEST2

-


FIELD3

-


FIELD4

Condition:

(field1 = "500" OR field1 = "800" ) AND (field3 = "EZTU" OR field4 = "BLKB")

I am trying to achieve the above condition through own XPATH expression in Receiver determination.

Can anyone help me out in this.

Thanks in Advance,

Lavanya .B

Accepted Solutions (1)

Accepted Solutions (1)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

I have just simulated your structure in XML Spy

<ZABCD>

<IDOC>

<TEST1>

<FIELD1>500</FIELD1>

<FIELD2></FIELD2>

</TEST1>

<TEST2>

<FIELD3>EZTU</FIELD3>

<FIELD4>BLKB</FIELD4>

</TEST2>

</IDOC>

</ZABCD>

and the XPath is /ZABCD/IDOC/TEST1[FIELD1 = '500' or FIELD1= '800' and /ZABCD/IDOC/TEST2[FIELD3 ='EZTU' or /ZABCD/IDOC/TEST2[FIELD4 = 'BLKB'

consider that thread does not show the some character, so, put a ] after 800,'EZTU' and 'BLKB' if i put it the blog consider as a link everithing between [ ]

I mean

'800']

'EZTU']

'BLKB']

refer to this link: /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Edited by: Rodrigo Alejandro Pertierra on Sep 15, 2010 10:46 AM

Edited by: Rodrigo Alejandro Pertierra on Sep 15, 2010 10:49 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all ,

The issue was solved by using the below expressions,

/ZABCD/IDOC/TEST1[(FIELD1 = "500" or FIELD2 = "800") and (TEST2/FIELD3 = "EZTU" or TEST2/FIELD4 = "BLKB")]

Lavanya

Edited by: Lavanya Balanandham on Sep 16, 2010 3:22 PM

Former Member
0 Kudos

Hi Use this XPAth more simple


ZABCD/IDOC/TEST1/FIELD [. ='500' or ='800'] AND ZABCD/IDOC/TEST1/field3 ='EZTU' OR ZABCD/IDOC/TEST1/field4 ='BLKB'

GabrielSagaya
Active Contributor
0 Kudos

Use the below xpath expression in RD

/p1:ZABCDIDOC/[(TEST1/FIELD1 = "100" or TEST1/FIELD1 = "800" ) AND (TEST2/FIELD3 = "EZTU" or TEST2/FIELD4 = "BLKB")]

where p1 is namespace suffix

check this blog

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