XPATH and Receiver Determination

In Reference to forum thread : Conditions in  Xpath (Receiver determination)
Suppose I have MT as
MT_Pickfile
   |_Header
   |_Body
   |_Trailer
And i need to check;
(field3 = "100" or field3 = "200" or field3 = "300" ) and(field5 = "AA" or field5 = "BB" or field5 = "CC")
field3 is in Header and field5 is in Body
I tried giving
/p1:MT_Pickfile/Header[(field3 = "100" or field3 = "200" or field3 = "300" )] and /p1:MT_Pickfile/Body[(field5 = "AA" or field5 = "BB" or field5 = "CC")] EX
It doesnt work. But then if both field3 and field5 are in Header then it works (as had been the case in the above mentioned thread which Stefan Grube replied to) i.e. to say
/p1:MT_Pickfile/Header[(field3 = "100" or field3 = "200" or field3 = "300" )] and [(field5 = "AA" or field5 = "BB" or field5 = "CC")] EX
Can anybody put in their suggestions ?
Thanx in Advance,
ShaBZ

Hi Shabarish,
It is not possible to have <i>and</i> or <i>or</i> outside the brackets <i>[]</i>.
Try following:
/p1:MT_Pickfile[(Header/field3 = "100" or Header/field3 = "200" or Header/field3 = "300" ) and Body/field5 = "AA" or Body/field5 = "BB" or Body/field5 = "CC")]
Another idea:
Write two lines in receiver determination (use insert expression):
1. line:
/p1:MT_Pickfile/Header[(field3 = "100" or field3 = "200" or field3 = "300" )]
2. line
/p1:MT_Pickfile/Body[(field5 = "AA" or field5 = "BB" or field5 = "CC")]
Hope that helps
Stefan

Similar Messages

  • Interface determination and Receiver Determination

    Any one can give the clear idea about Interface determination and Receiver Determination????????

    HI Gabriel
    <b>Interface Determination</b>
    An InterfaceDetermination specifies which interface is to be used for the inbound process of a message.
    Interface Determination is to specify which inbound interface of a receiver a message is to be forwarded to. We also specify which interface mapping from the Integration Repository is to be used for processing the message. Here it will know which kind of mapping you are using etc.
    <b> ReceiverDeterminatioin.</b>
    A ReceiverDetermintaion defines on or more receivers for a sender and an outbound interface.
    Receiver Determination is to specify which receivers a message is to be sent to.
    Cheers...
    Vasu
    <b>** REward Points if found useful **</b>

  • Reg:Xpath in receiver determination

    Hello,
    My message strcture looks like below.
    Record
    Level1
    item
    field1
    Level2
    item
    field2
    Level3
    item
    field3
    There can be multiple items for each level.
    Here goes my condition.
    I have to send the message to the receiver system "A" only when filed2 value is same across all items under level2 i.e. if there are three items under level2, then field2 should have the same value  across the items.
    Can you please let me know how do we impliment this in the reciver determination step using xpath?
    Regards,
    Rahul

    Rahul,
    Your scenario can be achieved using Enhanced Receiver Determination. Using Xpath in Receiver Determination might become complex for your condition.
    Refer below links for Enhanced Receiver Determination.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3343
    Regards,
    Geetha

  • Using Xpath in Receiver Determination for greater than 500

    Hi,
    I am trying to use Xpath in the receiver Determination step and I want to check a field which is at item level and comes multiple times(0-unbounded) greater than 500.I tried with different options per SDN blogs,Xpath functions,but still I couldn't able to get what i am trying.I want to process the message when "quantity" is greater than 500,else I want to ignore the message with no errors.
    I gave like this    /p1: /LIST/item[quantity>499]     EX
    item loop is 0-unbounded and I need to check for every quantity.I selected the check box multi line as well.
    I played around different options,but still did not get what I am looking for.
    please suggest in this regard ,how I need to give the expression.
    Thank you,
    Sri

    Hi,
    For validating that the item field is occuring more than 500 times you need to choose the
    2.The exact XPath would be in your case *(/p1: /LIST/itemquantity[499]EX)*
    This means if the 500 th occurance of the item exists then the condition satisfies that is always true for 500 and above occurance of the item.
    Please revert if the suggestion proves to be helpful.
    cheers,
    Abhishek.
    Edited by: Abhishek  Paul on May 6, 2010 10:55 PM
    Edited by: Abhishek  Paul on May 6, 2010 11:02 PM
    Edited by: Abhishek  Paul on May 6, 2010 11:08 PM

  • Idoc structure not displying in XPATH at Receiver Determination..!!! Urgent

    Hi All,
    Doing Idoc to File Scenerio,
    In the receiver determination, I need to select the XPATH from the Idoc structure and by based on the GLN number which is coming in one of the segment, I need to pass to different receivers.
    Problem here is Iam not able to see the Idoc structure in the  XPATH to provide the condition.
    But when doing File to Idoc scenarios, Iam able to see the File structure.
    Any idea why IDoc structure is not displaying over here??
    Its a bit urgent for me..
    Waiting for your replys.
    Thanks&Regards
    Seema.

    Hi,
    This will help you now
    Hi,
    If you get the following msg while selecting the BS in Receiver Determination and if you are unable to view the Structure of the Source
    "Message interface does not exist in any software components installed on this business system"
    1) Open ID-----Double click on Business system that which u are using in the scenario
    2) Check whether you are able to see the SWC in the Othere attributes TAB
    3) If it is not there means goto SLD----Open the Technical System of R/3 by choosing Web as ABAp type
    4) Click on Installed Products TAB
    5) Click on Add New product and add your Product of the SWC whcih you are using for developement and Save it
    6) Then goto Business systems TAB in the same Technical systems window and click on the Business System appears in the window.
    7) Click on Installed products and Check the check box of your Product and then finally save that.
    Now you should be able to see the SWC in the Othere attributes TAB in ID
    Regards
    Seshagiri

  • Customizing XPATH in Receiver Determination

    Hello,
    I am using this blog to write conditions /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination and accordingly call the receiver (either Receiver_1 or Receiver_2), never to call both the receivers simultaneously
    I have a sample source message like:
    <?xml version="1.0" encoding="UTF-8"?>
    <ConsumerDetails>
       <UserId>91200024:123456</UserId> To check if UserId starts with 91200024: or not
       <Date>20111301161459</Date> To check if length of Date is 14 or not
       <Billing>RC</Billing> To check if Billing has value RC/ SB or not
       <Type>SE</Type> To check if Type has value SE/ CWE or not
    </ConsumerDetails>
    Accordingly wrote the below conditions:
    Receiver_1 (Conditions working fine):
    UserId (MiddleOperator --> ContainsPattern) --> 91200024:*
    /ConsumerDetails[(string-length(Date)) = "14"] --> EX
    /ConsumerDetails[(Billing = "RC") or (Billing = "SB")] --> EX
    /ConsumerDetails[(Type = "SE") or (Type = "CWE")] --> EX
    Receiver_2 (Conditions not working; except 1st condition):
    /ConsumerDetails[not(starts-with(UserId,'91200024:'))] --> EX
    /ConsumerDetails[(string-length(Date)) != "14"] --> EX
    /ConsumerDetails[(Billing != "RC") or (Billing != "SB")] --> EX
    /ConsumerDetails[(Type != "SE") or (Type != "CWE")] --> EX
    Only Conditions for Receiver_1 are working fine; those for Receiver_2 are not. Can anybody please provide correct conditions to be written in the Condition Editor?
    ~Thanks.

    Hello,
    Have you tried using the condition as mentioned below:
    /ConsumerDetails[not((string-length(Date)) = "14")] --> EX
    /ConsumerDetails[not((Billing = "RC")) or not( (Billing = "SB"))] --> EX
    /ConsumerDetails[not((Type = "SE")) or not((Type = "CWE"))] --> EX
    i.e. use not() instead of '!' ??
    -Rahul

  • XPath in receiver determination: Check content of elements that exist 0..n

    Hi all,
    I have a simple requirement in a receiver determination. In the structure of the XML message, there is a node "STATUS" with an element STATUS_CODE. This STATUS node can appear 0 or  9999 times.
    I want to check if there is ANY STATUS with STATUS_CODE = "0", and if so, the message should be sent to a certain receiver. How to to that?
    Will that be the solution: (//STATUS/STATUS_CODE = 0)?
    Thanks,
    CHRIS

    > So it seems to me that the operator != can't be used to check a 1...n element? What might be the reason for this?
    I am not sure how != works, it is not documented well.
    I suppose NE means: does not exist.
    So if any node STATUS_CODE with value 1 exists, then the result is false.
    If you want an existence check if this, you should apply this:
    //STATUS [STATUS_CODE != "1"]  EX
    See also:
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    (scroll to the bottom)
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

  • XPATH in receiver determination

    Hi,
    We need to dynamically determine the receiver service based on the payload.
    In the extended service editor we have succesfully used a simple XPATH expression to point out a specific field of the payload (just like using af context object) containing the service name.
    However, in most cases the service name is a substring of a field of the payload and furthermore a constant is to be added to give the full service name. We have tried to solve this problem using the XPATH functions 'concat', 'string' and 'substring'. But as soon as we add just the simplest function to the XPATH expression, the receiver determination fails (unable to process the XPATH).
    We have tested the XPATH with the actual message using XML Spy, and it works well.
    The XPATH expression is: "concat('SAPR3_', substring(string(/p1:receipt/p1:identity), 2, 5))"
    Any hints?
    Regards
    Lars

    Hi Lars,
    I just noticed, that you are talking about extended Service Editor - not a Condition - so my answer above is obviously rubbish.
    What remains true is that the XPath you use has to result in a node, than the nodes string is taken as a service.
    So I am afraid there is no easy solution for your problem...
    If you do not have too many receivers and this list is rather static, you could of course use conditions in the receiver determination - something like:
    receiver service = SAPR3_b if /.../ = abc
    but this is of course not really applicable if the list of possible receivers gets too long.
    Another possibility would be to use the substring as a receiver within the configuration. So take it from the payload in the receiver determination and use this 'service' for interface determination and receiver agreement.
    Than, within the receiver agreement you can exchange this name by the 'real' name in the header mapping (which is performed as the very last step in the pipeline). Since you have a receiver agreement per receiver anyway, you would not have to create additional configuration objects. The downfall is of course, that to 'read' the configuration (or the message monitoring) one has to know about this mapping trick...

  • Use of range in case of XPATH for receiver determination.

    Hi Experts,
    I need to achieve the following using standard receiver determination.
    The material number in the source message structure has to lie within a perticular range and that should decide the receiver of the message.
    For example:
    MT_SRC
    |---- Ele1
    |----
    MaterialNo.
    If MaterialNo is between 100000100 and 100001000 then it should be sent to BS_TGT1 else it should be sent to BS_TGT2.
    Is it possible to achieve this using the standard conditional receiver determination using XPATH and if yes, how exactly?
    Regards,
    Amol

    Hi Amol,
    I think its possible. Never tried though for a range.
    Go through this link and check out what is described under the section "Notes Regarding the Use of XPath Expressions"
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a513f2632c332ce10000000a11466f/frameset.htm
    I am not sure whether it will work for two conditions though, i.e. for a range( Greater than 100000100, less than 100001000).
    Just try and let us know.
    Regards,
    Sanjeev.

  • Conditions using xpath in Receiver determination

    How to write conditions using xpath in receiver determaination. Please provide few examples.
    Regards,
    Suresh.

    hi
    Defining Conditions
    You also have the option of specifying the conditions to be applied when forwarding a message to the receiver(s) in a receiver determination.
    Generally, a condition relates to the contents of a message; if a specified condition is fulfilled for a particular payload element (the corresponding element has a certain value, for example), then the message is forwarded to the specified receiver(s).
    &#9679;     If you want to specify a new condition for forwarding the message to a receiver, in the table in the Display/Edit Receiver Determination editor in the Configured Receivers frame, choose Insert New Condition () and call the condition editor by using the input help ().
    &#9679;     If you want to specify a new condition for forwarding the message to multiple receivers, in the table in the Display/Edit Receiver Determination editor in the Configured Receivers frame, choose Insert Line After Selection ( ) and call the condition editor  by using the input help (). 
    In the condition editor, you can select an element from the message payload and specify a value with which the value of this element is to be compared at runtime.
    check the link below
    http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Some PI questions regarding RFC and  receiver determination

    If we import the design objects in one customer system from another customer system , and in the original system there is an imported RFC ,
    This RFC has been created in the new SAP customer system.
    My question is do we have to import the RFC again , as it is already in the imported design objecs.
    My second question is , di we need to create a receiver determination for the answe in a synchronous send step of the BPM ,
    Thanks

    My question is do we have to import the RFC again , as it is already in the imported design objecs
    Yes....the RFC/ IDOC should be imported from the system to/ from which you will send/ receive the data.
    If the RFC was in system1 earlier and now in system2.....then you have to delete the RFC imported from system1 (if it is not used) and then import it from system2
    My second question is , di we need to create a receiver determination for the answe in a synchronous send step of the
    BPM ,
    Irrespective of sync/ async send step.....you should create Receiver Determination....which will have BPM as sender and the TO_SYSTEM as receiver.....not separately for response....just once
    Regards,
    Abhishek.

  • Interface and Receiver determination steps

    Dear Experts,
    I have list of queries which I am facing issue in ID. I am working on SOAP<->SAP-PI<->PROXY scenario.
    1. Created 2 Service Interface i.e. SI_SOAP_OB and SI_PROXY_IB in ESR.
    My question is that in the sender and receiver tab what should be the entries in Business System of SOAP and PROXY systems ( i.e. BS system created under the  node Communication Component without party). I created this Business System ABAP from the entries of SLD.
    2. What is the sequence of steps in the ID i.e. Cc,ID,RD,SA,RA.
    3. In the Receiver Determination, I can see in the "Configuration Overview" tab
    that the PROXY business system has red entries. I think that this system should show SI_PROXY_IB
    but it shows SI_SOAP_OB.
    4. When trying to create Interface Determination, I receive "JAVA.lang stack overflow error"
    and INTERNAL ERROR.I made sure that there is no inactivated objects under my user.
    5. I am sure that the step till creating SI in ESR and sender agreement in ID is correct. Can I create proxy as well as WSDL with end point at this stage.
    I need urgent suggestions from experts , kindly help.
    Regards
    Alice Rebecca

    1. Created 2 Service Interface i.e. SI_SOAP_OB and SI_PROXY_IB in ESR.
    My question is that in the sender and receiver tab what should be the entries in Business System of SOAP and PROXY systems ( i.e. BS system created under the node Communication Component without party). I created this Business System ABAP from the entries of SLD.
    ANS -
    For SOAP, anything like Legacy_filer can be created & used.
    For PROXY, use the business system of R/3 system maintained in SLD.
    2. What is the sequence of steps in the ID i.e. Cc,ID,RD,SA,RA.
    ANS-
    Sender CC
    Sender Agreement
    Rec Determination
    Int Determination
    Rec CC
    Rec Agreement.
    Create the steps in COnfiguration Scenario directly.
    3. In the Receiver Determination, I can see in the "Configuration Overview" tab
    that the PROXY business system has red entries. I think that this system should show SI_PROXY_IB
    but it shows SI_SOAP_OB.
    4. When trying to create Interface Determination, I receive "JAVA.lang stack overflow error"
    and INTERNAL ERROR.I made sure that there is no inactivated objects under my user.
    ANS
    its cache error. Go for full cache refresh in IB>AdministrationData cahce--cache refresh.
    5. I am sure that the step till creating SI in ESR and sender agreement in ID is correct. Can I create proxy as well as WSDL with end point at this stage.
    ANS
    Nope. create the structure in ESR & generate proxy for the same in ECC system. that's it. No need of WSDL here.
    -santosh.

  • INTERFACE DETERMINATION AND RECEIVER DETERMINATION DOUBTS???

    Hi Team
    I am having doubts regarding the Interafce Determination and the receiver determination. In pur landscape in our objects, some times i am seeing a Condition is being defined in the Interafce Determination  and sometimes  am seeing a Condition is being defined in the receiver determination . could you please let me know the differences between the above two.
    thanx in advance.

    Hi Nabhinav,
    Condtions in receiver determination - These conditions are evaluated and executed to determine the receivers for this incoming message.
    Condtions in Interface determination - These conditions are evaluated and ececuted to determine the Interface mapping to be called in order to map the source message to the target message.
    Please take a loot at these links for more details:
    http://help.sap.com/saphelp_srm50/helpdata/en/26/5ccd3bb4560f01e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce2a8e3a8e5430e10000000a42189b/content.htm
    Also, search the SDN before posting you query.
    Regards, Gaurav.

  • Flat Idoc and receiver determination

    Hi Folks,
    I have a scenario in which the Idoc is sent to XI in a flat format (Flat Idoc) using tunneling mechanism. The receiver determination configured is conditional based (Verifies the values in the specified fields of the Idoc).
    Now my question is as we know flat Idoc doesn't contain any fields like XML in the input payload, how the receiver can be identified?
    Reminder: (Receiver determination is conditional based and verifies some field values in the Idoc structure)
    Thanks,
    SPMD

    Hi Shabbirmdpasha,
    You can use file adapter channel to get idoc flatfile and convert to xml idoc in the module of the file adapter (available in PI 7.1). You only need to make a relation with the type of idoc with the name of the file: for example, DESADV_xxxxxx.txt for all files with DESADV flatfile idoc's.
    With this method, you know the interface of the outbound interface, and in the receiver determination you can check in the header of the idoc (dc40) to determine the target system.
    PD: Sorry for me english...
    Edited by: Oscar Navas on Dec 1, 2010 4:11 PM

  • ENHANCED INTERFACE AND RECEIVER DETERMINATION

    1)what is the use of enhanced interface determination and enhanced receiver determination and in scenarios we will use them and in what conditions ,and what differentiates it from standard interface/reciever determination?

    1. <b>Standard receiver determination</b> to specify the receivers of the message (and optionally routing conditions) manually.You can specify receiver parties and receiver services. To specify the receiver in more detail, you have the following options:
    &#9679;     Select the receiver from the Integration Directory
    &#9679;     Specify a constant value for the receiver
    1.2You also have the option of specifying the conditions to be applied when forwarding a message to the receiver(s) in a receiver determination.
    Generally, a condition relates to the contents of a message; if a specified condition is fulfilled for a particular payload element (the corresponding element has a certain value, for example), then the message is forwarded to the specified receiver(s).
    <b>Enhanced receiver determination</b> to have a mapping program determine the receivers of the message dynamically at runtimeInstead of creating the receivers in the receiver determination manually, you assign a mapping to the receiver determination and this returns a list of receivers at runtime.
    A typical usage case is if you do not yet know the names of the receivers at configuration time. In this case, you can define a mapping program, for example, which reads a list of receivers from a table or from the payload of the message at runtime.
    2.<b>Standard Interface Determination</b> :You can specify to which inbound interface at the receiver the message is to be sent at runtime. You also have the option of specifying a mapping and (when multiple inbound interfaces are defined) a condition for each inbound interface.
    2.1 n an enhanced interface determination, you do not enter the inbound interfaces manually, but first select a multi-mapping. You get the inbound interfaces from the target interfaces of the multi-mapping. The inbound interfaces are determined at runtime during the mapping step.
    You typically use an enhanced interface determination if the source message has an element with occurrence 0 ... unbounded (for multiple items of a data record) and you want multiple messages (for the individual items) to be generated at runtime.
    for receiver determination try this link also
    http://help.sap.com/saphelp_nw70/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm
    Regards,
    Mandeep Virk
    *Reward if Helpful*

Maybe you are looking for

  • Mid-2010 Macbook Pro 13" Sleep Problems

    Recently, whenever my Macbook goes to sleep, it is unresponsive when I try to wake it up. I have to hold down the power button for a few seconds and force quit it with no indication that it is off, however, when I press the power button again, it tur

  • Opening PDF from website only opens in browser, want it to open in Acrobat Client

    So after this most recent update 11.0.03 we have this is issue where the PDF will not open in the Acrobat client.  I found the adobe article where it tells you to disable the IE plugins and that should force it to open in the client but that is not w

  • Key date issue

    hello,      I am having a scenario where I am having two Info objects 0VALIDFROM and 0VALIDTO date info objetcs. requirement is that if i give a key date. It should check both the dates in record and if it lies in between of 0VALIDFROM and 0VALIDTO d

  • Problem with BAPI_TRANSACTION_COMMIT function module

    I am updating the two fields of a custom table through a custom BAPI function module. After this I am using "BAPI_TRANSACTION_COMMIT" function module to commit the LUW. but after calling this FM one field is updated in the table and another field is

  • Lost Mails after format and Import

    I formatted and reinstalled my machine but when opening Mail and using the import function to restore my mailboxes and e-mails from the back-up all the software did was import the mailboxes, no mails. How do I restore my e-mails from my mailboxes and