XPath Expression at Condition Editor in Receiver Determination

Hi,
  I have a fixed length flat file coming in into which I have to look at the first line's 4th to 7th positions. Based on that if it is "1234" then I need to route it to the receiver else I will ignore in the receiver determination.
Example input file -
M 0123456789ABCDEFGHIJKL
PR0123456789JIDFJDIFJD0244
PA0123456789JFDJF9384384K
We have module configuration where we are converting this to a line value pair something like this -
<?xml version="1.0" encoding="utf-8"?>
<ns:GMTLog xmlns:ns="http://sap.com/xi/GMStoreConnectivity">
    <Line>
        <Value>M 0123456789ABCDEFGHIJKL
        </Value>
     </Line>
      <Line>
        <Value>PR0123456789JIDFJDIFJD0244
        </Value>
      </Line>
       <Line>
        <Value>PA0123456789JFDJF9384384K
        </Value>
      </Line>
</ns:GMTLog>
When I tried to test my xpath in xpath tester it is working fine with the below xpath expressions -
1. /ns:GMTLog/Line[Value][1] --> This returned the first record completely
2. substring(/ns:GMTLog/Line[Value][1], 4, 4) --> This returned exactly what I am expecting "1234"
But the above 2 are not working in condition editor.
May I know the exact xpath expression to be used in this case to route the message to receiver when 4th to 7th position is "1234".
Thanks a lot in advance.
Regards,
Sarat

Good day. Can I please have some clarity on what I need to correct on my Receiver expression test.
For the number of instances of the Summary segment, I am required to identify and test the Summary amount of SUMME if this is more than 5.00 (a currency amount). SUMME is a string so I thought I should convert this to a "number" value to test it.
Also ensuring that SUMME is checked when the SUMID is equal to 011.
Now I hope part of my solution below is correct, but the test of the field value is not being done.
Please help.

Similar Messages

  • How to compare two fields in condition editor in receiver determination

    Hello,
    Is it possible to compare to fields frrom the source in the condition editor of Receiver Determination?
    Because on the right hand operand we can specify only constants right and not the source field.
    For eg: If field1 != field2 then Reciever =  Receiver1
    Thanks,
    Loveena

    In standard receiver determination while defining the condition, you can only specify an element from the message payload using expression editor to create an expression for the left operand and you must specify a fixed value in the right operand, against which the value of the element will be compared at runtime. You can use only these (=,, ,EX) operators. So the functionalities are limited.
    so you have to use Enhanced Receiver Determination, In this Instead of creating the receivers in the receiver determination manually, you assign an Interface mapping to the receiver determination and this returns a list of receivers at runtime.
    refer this wiki for more details
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=133562771

  • Condition editor in receiver determination does not show payload fields

    Hi !
    We are trying to create some conditions for the receiver determination in a RFC->XI->File scenario, but when we open the condition editor, under the XPATH option we do not set any payload fields to create conditions!!
    Any clues?
    Thanks,
    Matias.

    Hi,
    Check in SLD if your software component is installed on your business system and then clear SLD cache in ID.
    You will see interfaces assigned to your business system and also the payload fields in condition editor
    Thanks,
    Beena

  • Xpath expression in condition editor

    Hi Expert Forum !
    I have an xml structure like this :
    <aaa>
      <bbb>
        <ccc>
        </ccc>
      </bbb>
    </aaa>
    In my condition editor (receiver determination) I want to refer to an element which is a child of node <ccc>. However, node ccc is not defined in my data type.
    I can without any problems type my xpath expression manually but it doesn't seem to work though. As if it doesn't recognize node ccc if it's not in the data type. I know for 100% sure that node ccc will be in my inbound message.
    Is it possible to reference an element in the condition editor - knowing that it will be present in the inbound message - even though it's not defined in the underlying data type ??
    So why not just change the data type if I know <ccc> will be there? Well, data type is an external definition and I don't wanna edit it only to support an xpath expression in my rec. determination. If I can avoid it...
    Message was edited by:
            Hans Hougaard
    Message was edited by:
            Hans Hougaard

    Managed to make xpath expression work. It is possible to reference an element which is not defined in the data type. My problem turned out to be a namespace issue..

  • Condition editor in Receiver Determination

    Hi,
    How to check for the XPATH value for null, My scenario is i have to assign the receiver depending upon the XPATH value and i need to assign a receiver if the node does not exist.
    thankx,
    Shree

    Hi Shree,
    Use EX - Exists function in the Receiver Determination.
    for more-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/67/49767669963545a071a190b77a9a23/frameset.htm
    Hope this helps,
    Regards,
    Moorthy

  • Other ways to maintain conditions in the receiver determination

    Hello Guru's,
    are there other ways to maintain condition in the receiver determination? i'm filtering idocs coming-in from a certain business system going out to a particular receiver system using XPATH (RCVPRN in the IDOC) from the receiver determination..... however, this is well easy to maintain if there are only 5 values to filter, but now i'm already maintaining 100+ values in the condition which made me think not its not already a good solution.
    i've already thought of using ERD's as another approach, but this Receiver determination object is being used also by other SCV's and scenarios as well which i think will make confusion to other solution owners as they will not have visibility in my SCV.
    Any thoughts/suggestions/recommendation/comments will be highly appreciated.
    Thanks so much!

    >
    Allerin wrote:
    > Hello Guru's,
    >
    > are there other ways to maintain condition in the receiver determination? i'm filtering idocs coming-in from a certain business system going out to a particular receiver system using XPATH (RCVPRN in the IDOC) from the receiver determination..... however, this is well easy to maintain if there are only 5 values to filter, but now i'm already maintaining 100+ values in the condition which made me think not its not already a good solution.
    >
    > i've already thought of using ERD's as another approach, but this Receiver determination object is being used also by other SCV's and scenarios as well which i think will make confusion to other solution owners as they will not have visibility in my SCV.
    >
    > Any thoughts/suggestions/recommendation/comments will be highly appreciated.
    >
    > Thanks so much!
    guess you already have tried the only two solutions
    1. xpath evaluation
    2. Enhanced RD
    On a maintenance front xpath eval vs ERD, is a tough call to take unless that your routing logic is complex in which case ERD would be a better option.
    I guess it would be a call for you to take and figure which is much simpler and easy to maintain and most of all readable

  • CcBPM - can't activate workflow when using expression in Condition editor

    Hi,
    My workflow (generated by ccBPM) won't be activated when I try to do an IDOC comparison (on DOCNUM), using an index (count), in the ccBPM Condition Editor.
    The condition looks like this:
    (msgs_receive[count]./HRTRPR01/IDOC/EDI_DC40/DOCNUM = msg_receive./HRTRPR01/IDOC/EDI_DC40/DOCNUM)
    There seem to be no errors when activating the Integration Process in the Integration Repository, however when looking into the SXI_CACHE, XI Directory cache, my integration process gets return code '99', even after reactivation.
    I get this error:
    Syntax error in expression Line1 Ext. IDE63443806B4211DBC393F1DE0ACE61FE
    The exception occurred (program: CL_SAI_SWF_RULE
    Symbol 'CE/KO' expected at position 1 in expression 'count{XSDSIMPLE::xsd:string;}'
    The only interpretation I make out of this is that it doesn't like my index (count) variable.
    Can anything be done to fix this?
    I use XI 3.0 SP14
    Thanks
    Olof Trönnberg

    Hi,
    Return code - 99
    1) Export  parameter might be wrong.
    2) Check Oss Notes 901366 & 708338.
    3) 99 occurs when there is a mismatch in the mapping
    4) 99 occur if all the active correlations are not used.
    5) Try this SXI_CACHE select your business process and
       click on activate. change the  the return code to 02
       and upon activating again.
    This will help you :
    http://help.sap.com/saphelp_bw31/helpdata/en/c6/893bca449311d1893e0000e8323c4f/content.htm
    Regards
    Agasthuri Doss

  • Problem with condition editor in Interface determination

    Hi,
    I have 5 receivers for an interface. There are some conditions based on which the message should be processed.
    one of my condition is:
    If field A = CIT* and (field B != IDP or field C != IDP*) then message should be processed to a particular InterfaceMap(Messaeg Map).
    I am facing problems when giving the condition with != in the condition editor of InterfaceDetermiantion.
    When I send a message that is not satisfying the above condition, even then an output file with 0kb is getiitng created. But in this case, the condition should obstruct the message going to Message mapping.
    I thought this could be the problem with != operator in condition editor.
    Can any one suggest if there is any other way that i can proceed.
    Thanks in advance,
    Minisha.

    Hi Suraj,
    Thanks for the suggestion.
    But it didnt work for me.
    Even when i give empty-message handling to ignore, the empty file is getting generated.
    Not even the condition is working.
    I tried only giving (field A u2248 CIT* AND field B != IDP EX ), which should work in this case. As expected, the message is not processed beyond this as the condition is false. But problem is when i tested with other testfile with which the condition given is true, still the message is not being processed. it is now completely obstructing the message even if the condition is true.
    Thanks,
    Mnisha.
    Edited by: Minisha Uthaman on Sep 10, 2009 4:12 PM

  • Receiver determination wildcard in condition editor

    Hi experts,
    I have a question regarding the condition editor for receiver determinations on PI 7.1. I have an xpath expression on the left side and I need to have a condition on the right side that includes a certain pattern.
    One example:
    p1:myDocument/element = 1A2B*
    There I would want to read the xml element "element" and redirect to a certain communcation component if the value of 'element' starts with 1A2B.. regardless if its 1A2B3 or 1A2BC and so on.
    Is that possible? I tried like in the example to use * as a wildcard, but that didn't work.
    Any help would be appreciated.

    It should not be = operator ....it should be Contains Pattern Operator
    Refer: http://help.sap.com/saphelp_nwpi71/helpdata/EN/67/49767669963545a071a190b77a9a23/content.htm
    Regards,
    Abhishek.

  • ** XPath condition not work well in Receiver Determination.

    Hi,
    My scenario is having 3 receivers. I have 'Student' is the data type. I use the same data type for Source & Target Message Types. Requirement is I have to send
    1) only records which are having SCOURSE = 'BE' to receiver 1
    2) only records which are having SCOURSE = 'MCA' to receiver 2
    3) only records which are having SCOURSE = 'MBA' to receiver 3
    My Input.xml file contains the following records.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:THIRD_MT_OB xmlns:ns0="http://ganesh_third">
       <STUDENT_INFO>
          <ST_ID>10020</ST_ID>
          <SNAME>Raja</SNAME>
          <SCOURSE>BE</SCOURSE>
          <SFEES>3000</SFEES>
          <SMARKS>1200</SMARKS>
       </STUDENT_INFO>
       <STUDENT_INFO>
          <ST_ID>10021</ST_ID>
          <SNAME>Ram</SNAME>
          <SCOURSE>MCA</SCOURSE>
          <SFEES>3000</SFEES>
          <SMARKS>1200</SMARKS>
       </STUDENT_INFO>
       <STUDENT_INFO>
          <ST_ID>10022</ST_ID>
          <SNAME>Ram</SNAME>
          <SCOURSE>MBA</SCOURSE>
          <SFEES>3000</SFEES>
          <SMARKS>1200</SMARKS>
       </STUDENT_INFO>
    </ns0:THIRD_MT_OB>
    I set the Xpath condition in the Receiver Determination Step and add the 3 receivers for against the conditions.
    Our problem is, If we send the single record in the input file, the corresponding receiver is selected correctly and we get the output file for that receiver. But, if we send the all combination of records (MCA,BE,MBA) 3 receivers are selected and the 3 output files we get. But, the three files are having the all records (MCA,BE,MBA). Instead, we want the first file should only have MCA record,  the 2nd file should only have BE record and finally the 3rd file should only have MBA record. That means each receiver should receive only one record for the above input.
    Friends, I though it will work for the 'XPath Expression' against receivers in the Receiver Determination Step. But, it didn't work. (Records are not split up)
    How do achieve this, friends?
    Could you kindly help me to solve this problem.
    Kind Regards,
    Jeg P.

    If you are trying to split you input msg and send it  to 3 different receivers using conditional receiver determination then it will not work. Once a condition is meet in the receiver determination then the entire msg is forwarded to the corresponding receiver, that is why when you have a single row in your input file which results in a single msg in XI the conditional receiver works. Now when you have multiple rows in your input file still only one msg is being created in XI for all the rows currently so all the conditions are being meet and the msg is forwarded to all the receivers.
    If you are using FCC in the sender side then use the "recordset per msg" parameter to consider each row of your input file as a separate msg in XI and the rest will automatically fall in place.
    Cheer's

  • Receiver determination based on target msg???

    Hi All,
    Is it possible to do a receiver determination based on some field present in target msg. I know I can do the same if the field is present in source msg with the condition editor in receiver determination. But this will not help my scenario. I need to find the receiver based on a field in target msg. Is it possible?? If so, can u pls explain it???
    Thanks & Regards,
    Jai Shankar.

    Jai,
    Am on Sp14 and have not had the chance to try it out.
    but, <b>I dont think you will need a extra Receiver Determination for the Enhanced Receiver Determination.</b>
    What I understood out of that blog was that the  Interface mapping between Source Interface and Receiver Interface  will determine the receiver. So, you fill in the reciver service field with the actual receiver and this value will be taken as the receiver.
    The Receiver Interface will be taken from the SAP basis SWCV.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm
    Regards,
    Bhavesh
    Regards,
    Bhavesh

  • Receiver Determination: Contextobject to choose when BPM sendcontext

    Hi everybody,
    I set the send context in BPM on a send step. I want to use the condition editor in receiver determination.
    Which contextObject is to choose in the condition?
    There are so many. I searched the help and found nothing suitable.
    Thanks
    Regards
    Mario

    Try Out Path In receiver Determination Expand the Source structure ...And Select the Appropriate Field on which You want to place the condition..
    If you want to use Context Object You need to create It In Integration Repository based out of message Interface and then Use it over here.
    Hope This Helps
    BR
    Sainath
    Edited by: Sainath Chutke on Jan 23, 2009 1:44 PM

  • Regd. Receiver determination when we have 1Bsystem&1Bservice

    Hi All,
    I am trying to do reciever determination based on one element in the input Message.
    Its works fine if i set a condition and based on that send it to one of the business Services
    But i have one business system and one business service and i have to route the message based on some feild in input as i said above.
    In reciver determination condition .. i found we can assign only Bservices as target.Cant we give Business service there ?
    If not ,does it mean Receiver determination condition works only for business services.
    What are the possible solution to my problem as i have to route to either the business sys or the service which i have.
    your inputs will be valuable
    Srini

    Hi All,
    Thanks for your inputs ,infact after seeing the services titile in the condition editor in receiver determination i thought its only for business services.
    But as you all suggested its possible to select business systems also.
    Services include both Business service and systems.
    Thanks once again
    Regards,
    Srinivas

  • Condition "not containing" expression  in Receiver Determination

    Hi guys,
    I have one interface which processes files with lines compossed by two fields, an identificator, and a data field.
    Inside the data field, i have a row of characters and I want to create this condition in the receiver determination:
    If Data contains text "e6212" then, receiver is X
    If Data does not contain text "e6212" then, receiver is Y.
    I know how to create the first condition, but not the second. Could anybody help me? Thanks in advance!

    Hi,
    The condition editor contains 'Contains Pattern (CP)':
    You use this operator to query a string with a pattern. You can use the following characters for this:
    ·        + for any single character
    ·        * for any string
    *mploymenttaxdeclarat+on annualemploymenttaxdeclaration.
    please read more here:
    http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm
    regards
    Vijaya

  • 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...

Maybe you are looking for

  • Allocated quanty

    Hi Friends, When i create the quota arrangement for one material i am unable to enter the quanty in the allocated qty fiels.It is in grey mode. how can i enter the quanty.Please tell me the process steps.I am new in mm module.Please tell me. Thanks V

  • Will TADM10, 12  & 51 enough for C_TADM51_70 ?

    Dear All, I have 3 plus experience in BASIS world, Now I am preparing myself for C_TADM51_70. I have went through TADM10, 12 & 51. As we know, This 3 TADMs are constructed based on the below TADMs. Is we need to read all the below TADM also or (TADM1

  • Does ARD 2.2 run on Intel iMacs?

    I'm trying to install ARD 2.2 on a 17" Intel iMac and I'm getting an error after the install when I try to open the application. (The installation process runs fine and it tells me that the software was installed properly). http://www.xid-renrag.com/

  • Problem in Deactivating Business Partner

    Hi all, In SAP CRM,when I am deactivating any business partner by checking the not-released checkbook in Status tab of transaction: BP then it is giving the first warning message: "You have chosen to DE-ACTIVATE the Business Partner" with Message no.

  • Help! CDs burnt with PC suddenly not readable!

    Hello, I've suddenly come across a problem, which I'm not sure I understand at all... My Macbook Pro has stopped being able to read PC burnt data CDs. CDs that have previously worked. I get the "The disk inserted was not readable by this computer" er