Skip to Content
avatar image
Former Member

XPath Expression to Check if certain condition

Hi Experts,

    I need to control some kind of messages need to ignore at SAP PI side. So, I am trying to ignore by config at Receiver configuration at ICO.

Here I need to ignore transaction types like - T*, W* ( starts with T /Starts with W).

In this case, what type of operator can we use ? How to ignore messages which start with something ?

Deva

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 09, 2015 at 06:56 AM


    Hi,

    Write T* or W* in condition and keep operator aproximately .

    EG :

    Regards,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 09, 2015 at 06:38 AM

    Hi Deva,

    could you please send the message structure for a better picture.

    In the meanwhile this blog might help.

    Xpath Condition in Receiver Determination - Process Integration - SCN Wiki

    Hope this helps.

    thanks and regards,

    Praveen T

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi Deva,

      Did you tried.

      MR_InvetoryMovement/Header/TransactionType != T01

      MR_InvetoryMovement/Header/TransactionType != T02



      thanks and regards,

      Praveen T

  • avatar image
    Former Member
    Feb 09, 2015 at 07:07 AM

    Hello Deva,

    You can try below condition in condition editor by selecting TransactionType field:

    (/p1:MT_InventoryMovement/MessageHeader/country=MY)

    AND

    (/p1:MT_InventoryMovement/HEADER/TransactionType ≠ T*)

    AND

    (/p1:MT_InventoryMovement/HEADER/TransactionType ≠ W*)

    Regards,

    Soumyadip

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Deva,

      If you want to ignore the messages which are having country as 'MY' and TransactionType as 'T*' or 'W*' then you can try below code.

      (/p1:MT_InventoryMovement/MessageHeader/country≠MY)

      AND

      (/p1:MT_InventoryMovement/HEADER/TransactionType ≠ T*)

      AND

      (/p1:MT_InventoryMovement/HEADER/TransactionType ≠ W*)

      As your root node occurance is 1..1 you can uncheck multiline option I guess.

      Regards,

      Soumyadip

      Message was edited by: soumyadip basu roy

  • avatar image
    Former Member
    Feb 09, 2015 at 10:56 AM

    Hi Deva,

    When you want to have no receiver for messages where country = MY AND TransactionType starts with T you need a receiver determination for

    //p1:MT_InventoryMovement/MessageHeader/country NE MY

    OR //p1:MT_InventoryMovement/HEADER[substring(TransactionType,1,1)] NE T

    Kind regards,

    Bert

    Add comment
    10|10000 characters needed characters exceeded