Xpath condition in interface determination

Hi all,
I have a scenario where i have two Interface mappings between same source and target. I need to define a condition based on if a field exists, then first one should be executed and if the field doesn't exists, then second.
How should i define a condition that if field doesn't exists,  the second mapping should be executed.
Can any body please suggest.
Thanks,
Kalyani.

Thanks for your replies . But this condition is not working for our requirement .
Below is our exact requirement.
Source structure  is the xsd which we have imported into ExternalDefinition.This External Definition has 2 other external references(namespaces are also different).
The field which we need to check is in the external reference. This field is not visible in interface determination condition editor.
We have manually added the xpath condition in the interface determination.
1)The Xpath for EXIST condition looks like
(/p1:ABC_Responses/p1:ABC_Response/p1:ABCResponses/p1:ABCResponse/p6:Fault/p6:ID EX).
This is working fine.
2) The XPath for Not Exists condition looks like
(/p1:ABC_Responses/p1:ABC_Response/p1:ABCResponses/p1:ABCResponse/p6:Fault[not(p6:ID] EX).
This is not working.
Hope iam clear with the requirement now.
Edited by: kalyani uppari on Feb 11, 2010 10:30 AM

Similar Messages

  • XPATH condition in Receiver Determination in PI 7.1

    Hi all,
    I'm doing a Inbound 850 Scenario (no BPM involved)...based on the condition for (/LIST/S_ISA/S_GS/S_ST/S_BEG/D_353 = 00) its should either create ORDERS.ORDERS05 or create ORDCHG.ORDERS05 if (/LIST/S_ISA/S_GS/S_ST/S_BEG/D_353 = 04)...I'm giving the condition in interface determination and multiline selected in the Xpath editor
    I'm using PI 7.1 and irrespective of the condition it always creats Orders.Orders05, I have 2 receiver agreements also for both receiving interfaces...
    Any solution on how to debug?
    Thanks,
    Srini
    Edited by: Srinivas Davuluri on May 12, 2009 10:56 AM

    I forgot to give the prefix...mistake from my side

  • Condition Based Interface Determination in ICO (AAE) - PI 7.1 EHP1

    Hi Friends,
    We have PI 7.1 EHP1 - SP 04.
    In our scenario, we have 1 outbound interface and 2 inbound interface. Based on condition, it needs to select the first inbound interface or second inbound interface.
    In the normal configuration, we are able to select. (By click + icon and add condition in the Receiver Interfaces in Interface Determination Step)
    When we create configuration using ICO (Integrated Configuration), there is no option in "Receiver Interfaces" Tab to add two inbound interfaces with condition.
    Could you please clarify how do we do this in ICO?
    Kind regards,
    Jegathees P.

    IMHO, condition based interface determination is not possible in ICO.
    Use Multiple inbound service interfaces... You can handle in design level .. ESR level. 
    Check the Abhishek's blog... This  might be helpful.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?quicklink=index&overridelayout=true
    Note: Since in your case you need two receiver agreements, you cannot handle through ICO. The above link might be helpful to do multimapping without BPM.
    Edited by: Baskar Gopal on Apr 26, 2011 9:53 AM

  • XPATH to determine node name in condition of Interface determination

    Hi,
    does anybody out there know whether one can use a condition such as "name(/p1:Envelop/p1:Body/*)" to retrieve the name of the first element underneath the Body structure which is usually the payload. In the example below.  I'd like to retrieve "ns0:BAPI_USER_GET_DETAIL" or just "BAPI_USER_GET_DETAIL" which I would like to than compare in my "=" condition.
    <?xml version="1.0" encoding="iso-8859-1"?>
    <sap:Envelope xmlns:sap="urn:sap-com:document:sap" version="1.0">
      <sap:Header xmlns:rfcprop="urn:sap-com:document:sap:rfc:properties">
        <saptr:From xmlns:saptr="urn:sap-com:document:sap:transport">BC1</saptr:From>
        <saptr:To xmlns:saptr="urn:sap-com:document:sap:transport">BC2</saptr:To>
      </sap:Header>
      <sap:Body>
         <ns0:BAPI_USER_GET_DETAIL xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
          <CACHE_RESULTS/>
          <USERNAME>bauerd</USERNAME>
         </ns0:BAPI_USER_GET_DETAIL>
      </sap:Body>
    </sap:Envelope>
    I have a client that once to migrate his SAP BC interfaces to PI without having to change the sending application which is a CICS mainframe application. The mainframe application invokes various BAPI's by just passing in a different payload into the above envelope. The payload is always the request structure for the BAPI. The message is send synchronously to SAP BC which than calls the BAPI and returns the response to the caller, again in form of the above envelope and as payload the BAPI response structure.
    To convert this to PI I have to be able to initiate different interface mappings depending on what BAPI is requested. This is pretty straight forward as there are no special mapping transformation taking place in SAP BC for both the BAPI request and response. However I need to determine what interface mapping to call depending on BAPI requested by the CICS application.
    As said the customer does not want to change the sending application. The only part we are allowed to change is the URL which changes from SAP BC to the SAP PI Plain HTTP sender adapter. The post will always use the same outbound message interface. Therefore I can't use SAP PI's standard receiver determination. Using this adapter I will also be able to get access to the whole message envelope as outlined above.
    I already got all of this working nicely with the exception that I can't determine what BAPI is requested and therefore what interface mapping I have to trigger in my interface determination.
    Has anybody used a condition as above and if so how should it look like in the condition editor. The one outlined above does not seem to work. However it is also not failing in PI.
    Also I don't want to change my approach for doing this. However if it is not possible to retrieve the node name using the xpath statement (as outlined above) in the condtion editor than I will have to look for a different approach to resolve this problem. Any suggestions would than be more than welcome.
    Many thanks in advance.
    Dieter

    If the structure is not too big, you can use:
    //ns0:BAPI_USER_GET_DETAIL EX
    otherwise take the full path:
    /p1:Envelop/p1:Body/ns0:BAPI_USER_GET_DETAIL EX
    The namespaces have to be declared.
    Regards
    Stefan

  • Condition based Interface determination

    Hi ,
    Environment : PI 7.1.
    Scenario : File to Proxy.
    In this scenario , We have a single file interface which reads a file and routes the data to two different inbound interfaces.
    Steps followed to do this -
    >>Defined two inbound interfaces interface1 & interface2.
    >>Both interfaces are pointed to same ECC system.
    >>Read the file using a single sender file communication channel.
    >>Define receiver ECC in the receiver determination.
    >> Define interface determination based on a value of a field in the file structure(source structure). Used XPATH to define this content based routing and selected operation mapping specific to the interface.
    1 sender agreement
    1 receiver determination ( not using enhaced receiver determination because we have only one receiver)
    1 interface determination which has two receiving interfaces based on XPATH condition ( maintain order runtime is checked)
    2 Receiver agreements.
    2 Communication channels.
    For example if you have 10 lines in a file , out of which if 5 lines has a value related to interface 1 & 5 lines has a value related to interface 2. It should push the data into two different proxies as configured.
    We are facing a problem in this scenario -
    There is no consistency in the logic. Some times it runs interface 1 & some time it executes interface 2.
    based on condition 1 it routes the data to interface 1 successfully but the structure is not getting created for interface 2 so it is giving an error stating the interface 2 structure is not available.
    In SXMB_MONI the branching steps show two subnodes but if you see the log it shows that in subnode 1 the sender is sender interface & the receiver is interface 1 based on the filter condition. If you see the log for subnode 2 then it shows the sender is sender & the receiver as interface 2 below that it shows another entry which shows the reciver interface is interface2.
    Please evaluate and let us know if the approach we are following works or not. If there is any limitations please let us know how to achive this.
    Regards,
    Reddy

    Hi,
    Your design is correct but here you missed one point. Here the message is send either to receiver1 or receiver2  depending on the condition but not both. As this does not result in multiple messages with the same payload because only one condition can ever be true at runtime. For more details see the below link
    http://help.sap.com/saphelp_nw04/helpdata/en/46/8015de950e6be3e10000000a155369/frameset.htm
      If you want to create multiple message then you need do 1:n mapping :
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID2056393550DB10021342992851308291End?blog=/pub/wlg/2927
    Shweta.

  • IDoc to file- How to include conditions in Interface determinations

    Hi,
    In interface Determination i am trying to add the conditions based on IDoc structure field value. But when i clicked on Condition editor i don't find Idoc stucture in editor XPath.
    Please suggest me how i can add the condtions in the Interface determination in IDoc to file Senario.
    Thanks in Advance...
    Regards
    Sreeni

    Hi Sudhir,
    I have tried as you mentioned, but still its not working. Below i am providing my inbound payload.
    Could please let me know how i have to mention in condition editor to refer the IDoc field
    ZGHIER01/IDOC/Z1GLHIERH/SETNAME
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ZGHIER01>
    - <IDOC BEGIN="1">
       + <EDI_DC40 SEGMENT="1">
        - <Z1GLHIERH SEGMENT="1">
           <CATEGORY>GLHIER</CATEGORY>
           <SETNAME>PEGPL_AG</SETNAME>
         + <Z1GLHIERD SEGMENT="1">
         + <Z1GLHIERI SEGMENT="1">
         + <Z1GLHIERI SEGMENT="1">
         + <Z1GLHIERI SEGMENT="1">
         + <Z1GLHIERI SEGMENT="1">
       </Z1GLHIERH>
    </IDOC>
    </ZGHIER01>
    Thanks & Regards
    Sreeni
    Edited by: Sreenivasulu Reddy jonnavarapu on Dec 12, 2008 10:39 PM

  • Configuring conditions in Interface Determination

    Hi,
    We have a scenario where the Message has to be sent to 2 different business systems(say BS1, BS2). with in one business system(BS2) we need to send the message to 2 different locations based on the Value we received in the Message.
    For the above Scenario we have developed a Receiver Determination with 2 receiver systems(2 different business systems BS1,BS2)
    As part of the Interface Determination
    for 1 business system(BS1) we have a single Interface Determination(ie 1 configured Inbound Interfaces) .
    in the  2nd Business system(BS2) we have 2 configured Inbound Interfaces and have a conditions added to that.
    While we execute the Interface with a Message (end to end flow) The message is going through BS1 where as in BS2 if any of the conditions failed(OR Condition), the message is not getting routed to any of the locations in BS2.
    If we see in SXMB_MONI the message is getting branched and were able to see one message successfull and the other Message in(for the flow in which the condition is successful) "Message being Processed".
    Thanks in advance.
    Ganesh

    Hi,
    Check some links,
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm
    http://www.w3schools.com/xpath/default.asp
    http://www.w3schools.com/xpath/xpath_operators.asp
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service
    Regards,
    phani

  • Conditions during interface determination (urgent)

    Hi all,
    well i am using <b>conditions</b> during <b>Interface Determination</b> and according to the result of the condition a mapping program is triggered.
    Now i am using <b>XPath.</b>
    In my file i have a field called amount. The total of the amount field is stored in the trailer in a field called total.
    Is there anyway that using XPath i can check if the sum of the amount field that r in the file is equal to the value in the total field?
    a sample file would be as shown below ...
    01xxxxxxxxxxxxxxxxxx -
    header
    02xxxxxxx10000xxxxxx ---
    02xxxxxxx20000xxxxxx   | body
    02xxxxxxx10000xxxxxx ---
    03xxx40000xxxxxxxxxx -
    trailer
    eg.
    the sum of the amount field in the body (100002000010000) should be compared to that
    in the trailer (40000) [the values in the amount field
    will vary so does the total accordingly ]
    can anybody suggect a solution ??
    Regards,
    ShabZ

    Hi Frank,
    Would xpath functions work, eg. compare , sum etc ?
    the twist in the scenario is that if the validations fail then a output say A has to be generated and if its a success a different one say B has to be generated. And accordingly are to be sent to two different folders (2 diff. Comm. Channels).
    Thanks,
    ShabZ

  • PI 7.1 Condition in interface-determination

    Hi everybody,
    I want to process interface determinations depending on payload. But when opening the condition editor in interface determination, the interface on which to apply the condition is not obtained!
    What could be the reason?
    Thanks
    Regards Mario

    Hey Mario .. that's a bug. Thanks for pointing this out. Never noticed till now
    Regards,
    Neetesh

  • Condition in Interface Determination giving problem - URGENT!

    Hello experts,
    In my scenario I have one idoc posted from the SAP R/3 and I need to write max of 3 files in the same receiver file system based on some condition i.e. based on the value of some field in the incoming idoc.
    What I have done is in my interface determination, I have given that condition for all the 3 inbound interface. that is in the condition field in interface determination, for each inbound interface I chose that perticular field in idoc and gave the condition for which that interface should run.
    Now when I am pusing an idoc, if that idoc contains only one condition than my interface is working fine by creating only that file. I have checked this for all 3 files by sending 3 different conditions in 3 idocs. It creates 3 different files for 3 idocs.
    But if I send all 3 conditions in one idoc (since idocs can have multiple segments - in few segments i am giving one condition and in few others the 2nd conditon and in the rest the 3rd condition), I expect all 3 files to be created in my file system with data fulfilluing only that perticular condition. but this is not happening. In interface determination only one of the 3 is getting executed. Rest 2 is ignored and i cannot trace it anywhere (RWB, SXI_MONITOR etc)
    I have tried all possible combinations but this is not working if i send in 1 single idoc?
    Please help me in solveing this as this is a production issue and they cannot send 3 diffent idoc for 3 conditions. Where am i going wrong?
    Waiting for your responses.
    Thanks,
    Yash

    Hi Jakub,
    My scenario is one idoc say IDOC 1 and 3 files says FILE1, FILE2 and FILE3. Now the target message type for these three files are MT_FILE1, MT_FILE2 and MT_FILE3 (3 different message types).
    The only catch point here is i have 2 different interface for creating FILE3 (same message type but different mapping, interface etc). Each interface is based on a condition.
    Now when I send one doc which includes condition for only FILE1 and FILE2, it creates 2 file.
    If I have condition of only FILE3 (one condition of FILE 3 as FILE3 has 2 conditions) and FILE2, it creates both files.
    If I have both condition for FILE3 and FILE2, it creates FILE3 with only one condition and FILE2.
    If i have condition for FILE1, FILE2 and both conditions for FILE3, it creates FILE1 and FILE2 both no FILE3 at all.
    I guess the problem might be that I have same message type for both conditions for FILE3 but I m not sure. Let me try by creating seperate message type for both and see. But is there any other problem?
    Yash

  • Condition for interface determination

    Dear all,
    I would like to choose a target inbound interface depending on values in a field.
    The problem is, that the source field has occurency 0...unbounded so that I check
    the same field twice.
    Example:
    /TestMessage/Field1 = "A"
    AND
    /TestMessage/Field1 = "B"
    To route the message to the desired inbound interface we need at least two occurencies
    of source field "Field1". One with value "A" and one with value "B".
    But he seems to check if Field1 is "A" and "B" so he will never use the desired inbound
    interface. Do I have a chance to check values of two occurencies of one field or do I need
    to use enhanced interface determination?
    Thanks
    Chris

    Hi Christian,
    You interface determination condition should work. e.g for one of my interface I am using following interface determination condition to send the msg to specific  inbound interface.
    (/p1:MT_Input/Recordset/row/Key = 10 AND /p1:MT_Input/Recordset/row/Key = 20)
    The condition check if there is any "Key" with value 10 and othet with value 20 and then only it selects the desired output
    inbound.  The order of value 20 and 10 doesnt matter. Also only when both the values are there, then also inbound interface is
    selected.
    Can you provide your sample payload here?
    Pooja Pandey

  • Condition in Interface Determination

    Hi
    I have two interfaces clubbed together. The output is an Idoc and the same Idoc is sent to two interfaces. The Business Sytem is same for both receivers. The Idoc has to be sent only to both reveiver interfaces if the EKORG is one and I have put that condition in Receiver Determination and its working fine.
    Now, I have two interfaces and one of the interface has an additional condition. If only a particular Idoc field has values either 12 or 20. So how do I incorporate it ? Should I go to the Configured Inbound Interfaces under Interface Determination, select the Interface and use " OR " there ?
    Regards

    I didn't understand how to create the OR operand
    You need to make use of the Insert Group option....it is mentioned in this help link
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/67/49767669963545a071a190b77a9a23/content.htm
    You can even enter the condition manually in the condition editor...for more info check the blog by Shabharish.
    Regards,
    Abhishek.

  • Error while specifying condition in  Interface Determination

    Hi all,
    I am facing a typical problem
    It's a proxy to file scenario with mutiple receivers.
    In the interface determination when we are trying to specify the condition, it gives the following error.
    "Message interface does not exist in any software components installed on this business system".
    Detailed solution would be highy helpful.
    regards.
    younus

    Hi Yonus,
    It seems that u have made changes in SWCV after doing the configuration.
    Try out thess:
    STEP1->In ID
    Go to menu :--> Enviorment->clear SLD cache
    Step2->In IR
    Go to menu :-->Tools->Transfer from SLD->Update application component and then step 1
    Step3->IN SLD
    Check the the SWCV u r using is associated with the Business system u are using. Check for the checkbox for SWCV in Business System.
    Sachin
    Message was edited by:
            Sachin Dhingra

  • XPATH condition in receiver determination.. Sum one of the filed

    Hi,
    This is my input payload.
    segment "Record" will be coming multiple times.
    <ns:MT_Account xmlns:ns="urn:com.statement">
    -<BalanceRecs>
      - --<Record>
    <field1>CUA</field1>
    <field2>0.00</field2>
    <field3>324612.28</field3>
    <field4> LTD</field4>
        -----<numRecs>0</numRecs>
    </Record>
      --- <Record>
    <field1>CUb</field1>
    <field2>0.00</field2>
    <field3>324612.28</field3>
      <field4> LTD</field4>
      <numRecs>2</numRecs>
    </Record>
      --- <Record>
    <field1>CUc</field1>
      <field2>0.00</field2>
    <field3>324612.28</field3>
       <field4> LTD</field4>
    <numRecs>0</numRecs>
      </Record>
    </BalanceRecs>
    Requirement:
    I need to calculate the sum of field "numrecs".
    If the sum is 0, then pass to BPM(IP_BPM)
    If the sum is > 0 then pass to System B.
    I tried using the below blog from shabarish..
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /p1:MT_ActBalance/BalanceRecs/BalanceRecord[sum(numRecs) = 0] EX        --> BPM
    /p1:MT_ActBalance/BalanceRecs/BalanceRecord[sum(numRecs) > 0] EX        --> SystemB
    Is there anything im missing .. kindly suggest.
    Thanks
    Deepthi.

    Hi Mark,
    It is working only for one receiver.
    i mean
    <numRecs>0</numRecs>
    <numRecs>0</numRecs>
    <numRecs>0</numRecs>
    The message is going correctly when the sum value is 0. ie to BPM.
    <numRecs>0</numRecs>
    <numRecs>2</numRecs>
    <numRecs>0</numRecs>
    OR
    <numRecs>2</numRecs>
    <numRecs>0</numRecs>
    <numRecs>0</numRecs>
    When I pass the above payloads, it is going to both the receivers.
    Since the total is 2, it should go only to systemB
    Any idea?
    This is working perfectly for enhanced receiver determination. I dont want to use enhance version for this simple case.

  • Xpath condition in Receiver Determination

    Hi  Gurus -
    I want to implement a condition, For QUALF=01 AND ORGID=ORG1, then only it should go to some receiver and otherwise some other Receiver.However when i implement this using context object/Xpath, The condition happens to be true which should not be true for following structure as No segment contain "QUALF=01 AND ORGID=ORG1".
    It happens to be true probably because one of the QUALF=01 and one of the ORGID=ORG1, however i doesnt want like that
    - <E1EDK14 SEGMENT="1">
      <QUALF>01</QUALF>
      <ORGID>ORG2</ORGID>
      </E1EDK14>
    - <E1EDK14 SEGMENT="1">
      <QUALF>02</QUALF>
      <ORGID>ORG1</ORGID>
      </E1EDK14>
    - <E1EDK14 SEGMENT="1">
      <QUALF>01</QUALF>
      <ORGID>ORG2</ORGID>
    Expert opinions are invited.
    Regards.
    Jeet,

    Hi Jeet,
    Your Condition should be as
    <b>/p1:ORDERS05/E1EDK14/QUALF=01 AND /p1:ORDERS05/E1EDK14/ORGID=ORG1</b>
    and not as <b>(/p1:ORDERS05/E1EDK14[QUALF="01" and ORGID="ORG1"] EX )</b>
    To acheive this,
    1. Go to condition editor in the RD
    2. Insert a new expression clicking on the + button at the top left.Now u will find the operation AND between the two condition
    3. In both the condition line select the respective XPath of the node and specify the matching condition.
    It should look like..
    Left Operand                                     OP    Right Operand
    /p1:ORDERS05/E1EDK14/QUALF       =           01                   AND
    /p1:ORDERS05/E1EDK14/ORGID        =          ORG1                 
    Regards
    San

Maybe you are looking for

  • LabView for Linux/Mac: integrate external UI controls

    Hello, for Windows, there's the posibillity to integrate (UI-)controls written in annother language using ActiveX or .NET. Is there an equivalent solution for Linux and Mac? I.e., can I use a GTK or Carbon/Cocoa based control in LabView on Linux or M

  • IdeaPad S400 won't open Windows 8

    Hi Everyone -- Hate to have to send this brand new computer in for repairs which is what Lenovo CS suggests...I can access OneKey with the side button, but (factory installed) Windows 8 will not open without CD/DVD -- how do I fix this problem??

  • Webi filtering two seperate contexts

    Hi , We are trying to model a Universe directly on top of a Siebel Transactional Database. Thus, there are some dimensions which are having 1:N relationship to a common dimension. In this case, we have an Account Table which has 1:M relation with Acc

  • Change Default Include Library

    Hello, We've created an apps global.jsp that will load the version in the /libs folder as well as other custom jsp files we've created.  So the fist include section of all of our components looks something like this: <%@include file="/apps/mycompany/

  • I need help on the below problem..

    Hi All, I need help on the below problem.. I've 2 Schemas called      1. MAXIMO and DBLink is GQMFOF      2. GQMMGR adn DBLink is MAXFOFNC Now i would likw to retrive the data from both the schemas, i.e some columns from WORKORDER table of maximo sch