cancel
Showing results for 
Search instead for 
Did you mean: 

X-path conditions in SAP PI receiver determination

Former Member
0 Kudos
257

Hi,

I have recently joined in a new company as a PI cunsoltant, the problem is all the implementation is already done, and now iam just dealing with UPDATES. recently my manager asked me to block some users by using x-path conditions in receiver determination(RD) i just want to know the logic of it since i never had chance to work on it in my previous company. Below are the three different type of logics which have already been set up there in RD for respective purposes.

(/ADRMAS02/IDOC/E1ADRMAS[(OBJ_TYPE!="LFA1") or (OBJ_ID!="0000100088") and (OBJ_ID!="0000100552") and (OBJ_ID!="0000115499") and (OBJ_ID!="0000128391") and (OBJ_ID!="0000129766") and (OBJ_ID!="0000158140")] EX )

(/DEBMAS05/IDOC/E1KNA1M/KTOKD = 0001) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = 0003) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = KUNA) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = Z002) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = Z004) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = ZMPA) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = ZREF) OR (/DEBMAS05/IDOC/E1KNA1M/KTOKD = ZSTA)

(/ORDERS05/IDOC/EDI_DC40/MESCOD u2260 010)

I just want to know the purpose of these filters and how to write its logic i mean want to know when to use variables like =, != EX

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Maybe this guide from w3c can help you understand xPaths

http://www.w3schools.com/xpath/default.asp

Now as for their usage in PI

= is equals a certain value e.g (/DEBMAS05/IDOC/E1KNA1M/KTOKD = 0001) means that KTOKD should be equal to 0001 to satisfy that condition.

!= is not equals a certain value e.g (/ORDERS05/IDOC/EDI_DC40/MESCOD u2260 010) means that MESCOD should not be equal to 010

EX is for expression e.g (/ADRMAS02/IDOC/E1ADRMAS(OBJ_TYPE!="LFA1") or (OBJ_ID!="0000100088") and (OBJ_ID!="0000100552") and (OBJ_ID!="0000115499") and (OBJ_ID!="0000128391") and (OBJ_ID!="0000129766") and (OBJ_ID!="0000158140") is generally used to group statements rather than individually. Also you can use certain functions while in this mode. For more information, refer to this blog

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for your support, i understood what you are trying to explain.

But i just want to know how =, !=, AND, OR, and EX are going to block the idoc from being sent to receiver i mean how they are used.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

It really depends on how your xPath condition is formulated e.g

(/ORDERS05/IDOC/EDI_DC40/MESCOD u2260 010) and your receiver is BUS_A . Now for every ORDERS IDOC, the xPath will look for MESCODs that are not equal to 010 and will assign BUS_A as its receiver. Otherwise, it would trigger a receiver determination error or it will stop processing or send to a default receiver (depends on how you configured the error handling for RD).

Hope this helps,

Mark

Former Member
0 Kudos

Thank's Mark

That was helpful.