XPath for root node in condition editor

Hi,
I have a HTTP to IDOC scenario. I have to accept any incoming document,(i will know only at runtime whether it is ORDERS or INVOICE or ASN etc) and post it to the respective receiver based on what is the name of the root node. But how do i specify this in the condition editor? if i give /* or name(/*) it does not work.Can anyone suggest a solution for this?
Thanks
Shakthi

Well I have one solution but don't konw if it is worth for you.
First create one mapping called pre_mapping in this mapping map all fields and the root node value to the target structure correspondingly . Now use BPM with simple receive & send steps. BPM should send the message back to XI.
Use the final mapping with this messge retuned from BPM.
Now use the x-path and select the field from source structre (which BPM has sent back to XI) which contains IDOC type. So in this case your sender system will be BPM.

Similar Messages

  • XmlValue for root node

    Hello,
    I have inserted the following documents into a container:
    <root><value>bob</value></root>
    <anotherRoot><value>bob</value></anotherRoot>
    <anotherRoot><value>bill</value></anotherRoot>
    <anotherRoot><value>fred</value></anotherRoot>I am then attempting to construct a query that extracts the right documents based on the root node name in a variable:
    qc.setVariableValue('container', XmlValue('test.dbxml'))
    qc.setVariableValue('root', XmlValue('anotherRoot'))
    collection($container)/$rootHowever, the results I get are rather strange (XmlResult.asString()):
    anotherRoot
    anotherRoot
    anotherRoot
    anotherRootAny ideas?

    Hi,
    Not sure what you mean by "works as expected", but I guess it does something different that you think. If you predicate consists of a string variable (and in your case $nodeName is a string), then this predicate will return true if a string has non-zero length.
    A quite from the XPath spec:
    If its operand is a singleton value of type xs:string, xs:anyURI, xs:untypedAtomic, or a type derived from one of these,
      fn:boolean returns false if the operand value has zero length; otherwise it returns true.That's how a boolean value of the predicate is constructed for strings.
    So the query:
    collection($container)/anotherRoot[$nodeName]just will return all anotherRoot elements given that $nodeName is not an empty string, whereas
    collection($container)/anotherRoot[""]
    OR
    collection($container)/anotherRoot[()]will return zero results
    To sum up, a query:
    $nodes["string"]will behave exactly as just:
    $nodesHope this helps,
    Vyacheslav

  • HGrid hide the Action icon for Root Node

    Hi,
    I have a Hgrid developed. It contains a column called "Action" against all the nodes. I need to hide this icon only for the Root Node. Can anyone please suggest a solution?
    Thanks in Advance!
    Cheers.,
    Hem

    You can use a switcher (Icon and messageStyledText) or SPEL (rendered true or false) to resolve this issue. You can add a additional attribute in your VO which controls the SPEL rendered property of the icon or provides a case value for the switcher.

  • How to hide messagetextinput item on root node in HGRID

    Hi,
    I have added one messagetextinput item in HGRID.
    But it is showing 3 items(one for root node, 2 for the actual items) when there are 2 rows in master node.
    +Employee          |________|
    -101 |________|
    -102 |________|
    I want to hide the item at root node(i.e. for employee.)
    I am working on seeded page, not the custom page.
    Can someone help me..
    --Parag                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Add a switcher in Hgrid, Create 2 items in switcher. One is input type and other is styled text. Switch the values of switcher based on condition from VO.
    For detailed help, feel free to mail me at [email protected]
    OAHGridBean hGridBean =
    (OAHGridBean)webBean.findChildRecursive("QotLinesHGridRN");
    if (hGridBean != null) {
    OASwitcherBean switcherbean =
    (OASwitcherBean)createWebBean(pageContext, SWITCHER_BEAN, null,
    "DellPriceSwitcher");
    switcherbean.setLabel("Dell Auth. Unit Price");
    switcherbean.setViewAttributeName("Attribute20");
    switcherbean.setViewUsageName("QuoteLinesLevel70VO1Obj");
    hGridBean.addIndexedChild(9, switcherbean);
    //Add dell auth unit price text input item
    OAMessageTextInputBean inputbean =
    (OAMessageTextInputBean)createWebBean(pageContext,
    MESSAGE_TEXT_INPUT_BEAN,
    null,
    "DellAuthPriceinp");
    OAMessageStyledTextBean styledbean =
    (OAMessageStyledTextBean)createWebBean(pageContext,
    MESSAGE_STYLED_TEXT_BEAN,
    null,
    "DellAuthPricestyled");
    inputbean.setReadOnly(false);
    inputbean.setViewAttributeName("Attribute1");
    inputbean.setViewUsageName("QuoteLinesLevel70VO1Obj");
    styledbean.setViewAttributeName("Attribute1");
    styledbean.setViewUsageName("QuoteLinesLevel70VO1Obj");
    inputbean.setColumns(5);
    switcherbean.setNamedChild("DellAuthPriceinp", inputbean);
    switcherbean.setNamedChild("DellAuthPricestyled", styledbean);

  • Predicates for XPath in Condition Editor of NWDS for PI AEX 7.4 (SP 7)

    Dear all,
    we are in the middle of migrating from our old Dual Stack PI 7.0 to our new PI 7.4 AEX.
    We have a fairly largen receiver determination on the old system that makes heavy use of predictes. One expression for example looks like this
    (SHPMNT05/IDOC/E1EDT20/E1EDL20/E1EDL37/E1EDL49/E1EDL50[XSIQUALF='EEIVERF']/VLABDATA = 01)
    However, when I'm trying to insert this in NWDS' condition editor there's an error stating "Predicates are only allowed with EXISTS operator"
    1. Is this a limitation of the condition editor in NWDS?
    2. Is there a way to configure the above XPath so it is working in NWDS?
    3. Would it be safe / wise to configure the mappig in ICO in Swing Tool or would this be overwritten by NWDS configuraiton?
    Many thanks
    Jens

    Hi Jens
    From SAP library, the example shows that the usage of predicate is with the EX operator, so maybe it is a limitation.
    Integration Directory - SAP Library
    Maybe you can try to combine your two conditions in the predicate and use it with the EX operator
    (SHPMNT05/IDOC/E1EDT20/E1EDL20/E1EDL37/E1EDL49/E1EDL50[XSIQUALF='EEIVERF' and VLABDATA = '01'] EX)
    Rgds
    Eng Swee

  • 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

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

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

  • BMP: Condition Editor for SWITCH Step

    Hi
    Can anyone tell me how I stipulate the following conditions for a switch step in BPM:
    >, <, <=, >=
    The only options that seem to be available are:
    =, !=, Existence check and contains a particular string pattern...which is very limiting?
    Surely SAP has given the options for the greater than, less than etc oprands....hopefully i simply missing a service pack or something like that.
    Cheers
    Yackeen

    Hi
    One way could be to use XPATH expressions & XPATH functions in your condition editor. Chk whether an element has a value greater than or less than some value in the XPATH expression itself.
    The result of this check now can be compared to a true or false(that is your rt hand operand). My 2 cents.
    -Saravana

  • How to change a generated root node for a hierarchy?

    Hello,
    we are loading hierarchies from an ECC system. Some of those hierarchies don't have a root node in the source system.
    For those hierarchies, the root node is generated during the loading. This node is generated in english (ie : FUNDS CENTER HIERARCHY for fund centers). Is there a way to change the description and the technical name of this node to have it in another language.
    We have tryied to change the language of ALEREMOTE in BI but it did not solve this problem.
    Thanks,
    Philippe

    Hi Simon,
    the language that triggered the loading was french.
    BI Learner,
    - to create a custom hierarchy in a BI system, you can use RSH1 transaction.
    - if you want to load it from a SAP source system, you can use standard datasource provided in the business content (usually named *_HIER)
    -if you need to load it from a flat file, you can follow the steps of this blog, it will help you:
    Hierarchy Upload from Flat files
    you can have more information about hierarchies on the help.sap web site :
    http://help.sap.com/saphelp_nw70/helpdata/EN/a8/6b023b6069d22ee10000000a11402f/frameset.htm
    Regards,
    Philippe

  • XPath expression for each node name

    <DATABASE>
       <TITLE>
          <LANGUAGES>SGML<LANGUAGES>
       <TITLE>
    </DATABASE>Is there a direct way of retrieving xpath expression for each node name other than iterating through each node and identifying the parent node.
    Ex:
    DATABASE
    DATABASE/TITLE
    DATABASE/TITLE/LANGUAGES

    If you set an element ID using the DOM parser you can then look it up using the ID.
    private void setElementIDNode(String tag, String IDAttribute){
            NodeList nodes = doc.getElementsByTagNameNS(docNS, tag);
            for (int i = 0; i < nodes.getLength(); i++){
                Element node = (Element)nodes.item(i);
                node.setIdAttribute(IDAttribute, true);
    Element e  = doc.getElementById(elementID);But at some point you still have to iterate through the document. I believe XML Pull Parsers are a little different but I don't have experience with them.

  • PCOLL_CONTROL, PCST_TXN,...What are these objects? JBO-28039:Root node for collection

    I've a UIX JSP Application with BC4J developed with JDeveloper RC.
    I noted that in my schema there are these "strange" db objects:
    PCOLL_CONTROL
    PCST_MYPACKAGEMODULE_SEQ
    PCST_MyPackageModule
    PCST_TXN
    PCST_TXN_SEQ
    Can anyone explain what are they or where can I find documentation about them ?
    When and why Jdev create them ?
    Beside some people that use my application got the following Error:
    "JBO-28039: Root node for collection TXN of id -1 is invalid......".
    I think that it's connected with the objects listed above.
    Has someone experienced this problem ?
    thank you
    Isabella

    Could you provide more information regarding this issue:
    1. When you mention that some people that use your application receive the exception do you mean that the
    exception is thrown from the application and displayed to the user or do you mean that the exception is simply logged
    in the Diagnostic output? The latter may be expected in some scenarios.
    2. Could you provide a full stack trace for the exception?
    3. Could you provide the BC4J diagnostic output generated when the exception occurs (specify the VM switch
    -Djbo.debugoutput=console at the command line)?
    Thanks,
    JR

  • Multiple Antennas for 1300 root node

    Hello everyone.
    Is it possible to run two antennas from a 1300? We have three sites that we need to connect (one root node, point-to-multipoint). All 1300s would run in bridge mode. We are curious if the root node would need two antennas to receive signal from two 1300s in bridge mode (the non-root nodes are well outside the area of one antenna).
    AP(BR)<->{AntA <|rootAP|> AntB}<->AP(BR)
    Any help is appreciated. Thank you in advance.
    Tim

    No, two directional antennas would only confuse things. For systems with two antenna jacks per band, only one antenna is active at a time (for 'Diversity' - reduces the chance of multipath and nulls).
    The most common way would be to put a single omnidirectional antenna at the root site, then directional antennas (yagis or parabolics) at the hub sites (aimed at the omni).
    Good Luck
    Scott

  • In PI 7.1, condition editor does not show the outbound interface structure

    Hello,
    I am using PI 7.1, I need to use condition whild determing receivers. So I opened the condition editor, then open the expression editor, select XPath instead of Context object. I would expect that the outbound interface structure appears in the box underneath the XPath, so that I can navigate the structure to choose the field I want to use. However nothing appears here. Do you knwo why is that? Or do I need to do anything to bring up the outbound interface structure in the expression editor?
    Thanks
    Jayson

    Hi Jayson,
    I had the same problem
    the use of context objects and the value help for xpath is available for XI3.0 interfaces in PI 7.10 only. The functionality for "new" interfaces has been implemented in 7.11 only.
    you have to use xpath w/o value help.
    I have created a context object in one of our 7.10 test systems, and indeed I was unable to use it in a receiver determination unless the service interface pattern is "Stateles (XI 3.0 compatible)". If you were to change the service interface to that pattern, you have to change the operation name unless it is already identical to the interface name. So that may not be an option for you.
    It was possible to use the context object in a receiver rule but then I could not activate the receiver determination because the software component version was supposedly unknown. I will check with my PI contacts - please let me know if the change to "XI 3.0" interface would be a possible workaround for you.
    Try the steps which I am giving below, although it's a workaround and don't know the exact reason why it is failing.
    1. Open your Outbound Message Interface (which you are using in your Receiver Determination) in IR, edit it and change the Interface pattern (which is there just below the category "Outbound") to "Stateless (XI30 - Compatible)" , save it activate it.
    2. Follow the same step for your Inbound Message Interface. Change the Interface Pattern from "Sateless" to "Stateless (XI30 - Compatible)" .
    3. Go to ID. Remove your Outbound and Inbound Message Interface from their respective Business Service/Comp and add it again.
    4. Create your your receiver determination again using the Outbound and Inbound MI you have changed.
    5. Open condition editor of your receiver determination.You should be able to see your Message Interface and can choose the XPath.
    Thanks,
    Raj
    Edited by: raj reddy on Jan 21, 2009 5:41 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.

Maybe you are looking for