Skip to Content
0

receiver determination in sap pi

Nov 23, 2016 at 12:35 PM

135

avatar image
Former Member

Hello All,

In my interface, i want to add condition in receiver determination to identify the configured receiver. My receiver should get identified when incoming field USRID (path=IDOC/E1PLOGI/E1PITYP/USRID) should not start with value WAP.

How i can achieve this, please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member Nov 23, 2016 at 11:15 PM
0

try with this

/IDOC/E1PLOGI/E1PITYP/USRID ≠ WAP*

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Nov 24, 2016 at 01:48 AM
0

Hi Shiv!

//IDOC/E1PLOGI/E1PITYP/USRID[not(starts-with(., 'WAP'))] EX

or

//IDOC/E1PLOGI/E1PITYP[not(starts-with(USRID, 'WAP'))] EX

Regards, Evgeniy.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Evgeniy,

Thanks for your reply, above expression works when only segment /E1PITYP comes only once. But when segment E1PITYP is coming multiple time (in first occurance it's USRID is not starting with WAP but in second occurance its USRID is starting with WAP even then receiver is getting identified.

And that is causing issue for me . Please help, how to check this condition in all occurances of E1PITYP and avoiding from identifying receiver even when any segment /E1PITYP comes with USRID starting with WAP.

0

Hi Shiv!

Do you mean that all of your E1PITYP segments shouldn't contain USERID starting with "WAP"?

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

yes, No single E1PITYP segments should contain USERID starting with "WAP".. If any one segment contains this then receiver should be identified.

Thanks for quick reply.

0
Evgeniy Kolmakov Nov 29, 2016 at 07:01 AM
0

Hi Shiv!

I'm not quite sure in case of PI, but this is XPath expression that should work:

//IDOC/EPILOGI[count(E1PITYP[starts-with(USERID,'WAP')])=0] EX

Regards, Evgeniy.

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Evgeniy,

with above condition, my receiver is getting identified even when one segment E1PITYP coming with USERID = WAP, should we add KEYWORD not in above statement?

0

Hi Shiv!

As you can see, it works.

Please provide your XML structure fragment with E1PITYP elements.

Regards, Evgeniy.

xpath-wap.png (28.5 kB)
xpath-wap-02.png (32.6 kB)
1
Former Member
Evgeniy Kolmakov

source path is /YIDV_ZA01/IDOC/E1PLOGI/E1PITYP/E1P0105/USRID and now i want to check all E1P0105 segments for USRID values starting with WAP, if any one segment starts with WAP, then receiver should not be identified.

0

Try this:

//YIDV_ZA01/IDOC/E1PLOGI[count(E1PITYP[starts-with(E1P0105/USERID, 'WAP')])=0] EX

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

Thank you so much Evgeniy!!

Its is working for me. it was really great help for me.

Regards,

Shiv

0

Hi Shiv!

Glad to hear :-)

Wouldn't you mind to close the thread since the question has been answered?

Regards, Evgeniy.

0