Using substring in the XPATH expression for Receiver Determination

Hello, I need a little help please.  In my receiver determination, I have a condition and I need to do a "not like" check.   Basically, if the first three positions of the source field does not start with a specific code, then I need to execute the condition.   The condition editor does not support a "not like" operand, so I went to the XPATH expression editor.  I tried to used the XPATH substring function to get the first three characters and then do a "not equal" operand, but it doesn't appear to work.  There are not any runtime errors, but the condition is not executing.  Any ideas on this?  Does the XPATH expression support the substring function?

Hi Jesse,
Can you please explain what is the meaning of http:// in the statement
/p1:PRODUCT/MATNRhttp://not(substring(.,string-length(.) - 2) = '123')
Please explein, I am having same issue. It is not working here.In My case it is
/p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[http://not(starts-with(.,\"D\"))]
also tried with
/p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[http://not(starts-with(.,'D'))]
Thanks in advance!

Similar Messages

  • Reg:'XPATH' Expressions in Receiver Determination

    Hi All,
    My scenario is an IDoc type.
    Structure:
    ZABCD
    IDOC
    TEST1
    FIELD1
    FIELD2
    TEST2
    FIELD3
    FIELD4
    Condition:
    (field1 = "500" OR field1 = "800" ) AND (field3 = "EZTU" OR field4 = "BLKB")
    I am trying to achieve the above condition  through own XPATH expression in Receiver determination.
    Can anyone help me out in this.
    Thanks in Advance,
    Lavanya .B

    I have just simulated your structure in XML Spy
    <ZABCD>
         <IDOC>
              <TEST1>
                   <FIELD1>500</FIELD1>
                   <FIELD2></FIELD2>
              </TEST1>
              <TEST2>
                   <FIELD3>EZTU</FIELD3>
                   <FIELD4>BLKB</FIELD4>
              </TEST2>
         </IDOC>
    </ZABCD>
    and the XPath is /ZABCD/IDOC/TEST1[FIELD1 = '500' or FIELD1= '800' and /ZABCD/IDOC/TEST2[FIELD3 ='EZTU' or /ZABCD/IDOC/TEST2[FIELD4 = 'BLKB'
    consider that thread does not show the some character, so, put a ] after 800,'EZTU' and 'BLKB' if i put it the blog consider as a link everithing between [     ]
    I mean
    '800']
    'EZTU']
    'BLKB']
    refer to this link: /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    Edited by: Rodrigo Alejandro Pertierra on Sep 15, 2010 10:46 AM
    Edited by: Rodrigo Alejandro Pertierra on Sep 15, 2010 10:49 AM

  • Xpath expression in Receiver Determination

    Hi All,
    I have a condition where i need to check if WERKS is containg any value starting with IT , then i need to send this IDOC to the target.
    I tried to used the following expression \MARCM\WERKS = IT* in RD , but its not workin when i am sending an IDOC with value as IT03 or other values startign with IT .
    Any idea how to deal with such an issue...
    Regards
    Vinay P.

    Hi,
    Instead of
    \MARCM\WERKS = IT*
    Use
    \MARCM\WERKS ~ IT* 
    [dobule(~)]
    double(~)
    for your help
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    regards
    Ramesh

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

  • The result is empty for the XPath expression

    Hi friends
    Please, could anyone help-me with this issue? My BPEL process was working yesterday and stoped today...
    I think I´m facing a namespace problem.
    If I start my process using BPEL Console, filling the "HTML form" option, all works ok.
    If my process is started by a call from another bpel process, my XPath query gives me an error, but the 2 received messages are "almost" egual:
    Using BPEL Console:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage ns1:BatchId="" ns1:PrimaryKey="" ns1:RejectionId="invalid_msg_processName_token1_token2_token3" ns1:BatchInfo="" >
    <MessageHeader/>
    <MessagePayload/>
    <RejectionReason/>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    Started by another BPEL Process:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage RejectionId="INVALID_MSG_BatchTest_Read_20060418_101233_0463" BatchId="" BatchInfo="" PrimaryKey="" >
    <MessageHeader/>
    <MessagePayload> AgICAgICAgICAgICAgICAgIE1aIEpBSVJPUyAg MDYwMzA4MTAwMQ0K </MessagePayload>
    <RejectionReason> ORABPEL-11008</RejectionReason>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    XPath Query:
    bpws:getVariableData('RejectionMessage','message','/ns2:RejectedMessage/@ns2:RejectionId')
    In the first case, it works.
    In the second case, it raises a "The result is empty for the XPath expression" error.
    As you can see, this process is used as a "Rejection Handler" process: It implements the interface defined in RejectionMessage.wsdl
    Could you help me?
    Thanks in advance

    Hi All
    I find a workaround to the problem. I´m almost sure it is a bug in BPEL.
    As you can see on my previous post, the diferences between the two messages is that the attributes have qualified names on one message and unqualified names on the other: ns1:BatchId, ns1:PrimaryKey...
    The schema definition for this message (JCAErrorHandling.xsd) define that attribute names MUST be qualified (attributeFormDefault="qualified"). The problem is that the File Adapter sends the message with unqualified attribute names!!
    So I edited JCAErrorHandling.xsd (<ORACLE_HOME>\integration\orabpel\system\xmllib\jca) file, changing it to attributeFormDefault="unqualified".
    The correct solution is to fix File Adapter to send the message with qualified names, so I´m opening a Service Request at Oracle Metalink.
    Thanks.

  • Assigning JMS message in BPEL: The result is empty for the XPath expression

    Hi,
    My project, an Oracle BPEL 11g project, is reading an XML payload from a JMS queue. I would like to transform the message and assign the elements of the messages to other variables. But when I am doing that in the "assign" step, it raises an error: Error in evaluate <from> expression at line "63". The result is empty for the XPath expression : "/ns2:publishProject/payload/Message".
    Even though I can see the message payload in the Audit with all the values.
    To me it looks like a name space issue, but I could not find out how to correct it. Any hint will be a big help. Please let me know if you want to check the .xsd for the message.

    I publish a JMS message to a topic in one BPEL process and have another BPEL process read from the topic and start the flow. The problem I have is that the first process is writing fine to the topic, but the second process seems to be reading twice. I am seeing two instances of the second process in em.
    Can anyone help? I am using JDev 11.1.1.1.0
    Thanks

  • Using the XPATH expression function in Transformation activity

    Hi,
    I have to map the variable value(other than the source variable) to one of the node in the target variable in the transformation activity. For that I am using the XPATH expression function bpws:getVariableData ('variableName') and map it to corrsponding target node. But this mapping is not at all happening. The same prolem occurs while using function ora:getInstanceID() in transformation function. Then I could find a metalink note id: 387381.1,saying it as the bug in 10.1.2.2 BPEL PM, which they are covering in the next release. But our BPEL PM version is 10.1.3.3. But still the same type of problem occurs.
    Please let me know, is there are any solution for using the ora:getInstanceID() , bpws:getVariableData in Transformation activity.

    Hi,
    I dont understand why would you need to use the "bpws:getVariableData" function.
    When you are mapping a source-node to a target-node, it usually assigns the value in the source-node to the target-node, which is as good as using the "bpws:getVariableData" function.
    So, technically speaking you need to use this function explicitly to achieve that ...
    Also, if you want the instance-id, you can use the "ora:getInstanceId()" directly in the BPEL code than using it in the transformation.
    Regards,
    Madhu.

  • Wat should be the regular expression for string MT940_UB_*.txt to be used in SFTP sender channel in PI 7.31 ??

    Hi All,
    What should be the regular expression for string MT940_UB_*.txt and MT940_MB_*.txt to be used as filename inSFTP sender channel in PI 7.31 ??
    If any one has any idea on this please let me know.
    Thanks
    Neha

    Hi All,
    None of the file names suggested is working.
    I have tried using - MT940_MB_*\.txt , MT940_MB_*.*txt , MT940*.txt
    None of them is able to pick this filename - MT940_MB_20142204060823_1.txt
    Currently I am using generic regular expression which picks all .txt files. - ([^\s]+(\.(txt))$)
    Let me know ur suggestion on this.
    Thanks
    Neha Verma

  • HT3728 I do not need another wireless network but want to use the airport express for printer access only.  Can this be done and how?

    I do not need another wireless network but want to use the airport express for printer access only.  Can this be done and how?

    You can configure the AirPort Expess to "Join a wireless network" and enable the Ethernet port so that Ethernet devices will be able to connect.
    In order to print from the iOS devices, you will need to have an application like Printopia installed on your Mac. The Mac must be active when you want to print.
    More details here: Printopia - AirPrint to Any Printer - Print from iPad - Print from iPhone ...
    There is a free trial available for Printopia, so make sure that it will work before you buy the AirPort Express.

  • Xpath expression for a custom SearchBoxEx WebPart to a DataFormWebPart

    Hi all,
    I have a custom search webpart that has asp controls that are used in my dataview (DataFormWebPart) for retreiving data. This data view has the xslt variable "Rows" with the following xpath expression: 
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[
    (contains(translate(@Title,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'), translate($FilterName,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')) or $FilterName = '')]"/>
    *<ParameterBinding Name="FilterName" Location="Control(txtName)" DefaultValue=""/>
    This webpart searchs for people by their name. For example:
    search for:
    jose
    results:
    jose luis escudero
    jorge jose torres
    Ok, it works fine there, but what if I want to search for: jose escudero. There won't be any results because the search xpath expressions has a contains function for what you write in the textbox control.
    So I think it should be splited by " " and searchs for the each word in the @Title column of the data source.
    I don't master xpath expressions so I don't know how to code a correct xpath expression for that, any idea? I would greatly appreciate any help. Thanks.

    Hi  betozg31,
    According to your description, the point is that your Xpath code put the “jose escudero” search keyword as a unitary string. So  your search  would not return any results. I think
    if you want to search result using two or more keywords ,you need to deal with the keywords firstly. Separating from the “jose escudero” search keyword , getting “jose” search keyword and “escudero” search keyword. Here is a simple code you
    can have a look:
    <xsl:if test="$FilterName =' ' ">
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[ $FilterName=' ']"/>
    </xsl:if>
    <xsl:variable name="FormatFN" select="lower-case(normalize-space($FilterName))"/>
    <xsl:variable name="FormatT" select="lower-case(@Title)" />
    <xsl:if test="matches($FormatFN,' ')">
    <xsl:variable name="FilterNameBefore" select="substring-before($FormatFN,' ')"/>
    <xsl:variable name="FilterNameAfter" select="substring-after($FormatFN,' ')"/>
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[ contains(contains($FormatT, $FilterNameBefore),$FilterNameAfter )]"/>
    </xsl:if>
    <xsl:if test="not(matches($FormatFN,' '))">
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[ contains($FormatT,$FormatFN)]"/>
    </xsl:if>
    Hope this helps!
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Using sql in the filter expression

    For a project I need to use a filter which is a construction
    with BETWEEN dateFrom AND dateTo.
    But the user does not choose these datevalues,
    he chooses timePeriods which have a unique startDate.
    The dashboard prompts are populated with these timePeriods and the user chooses 2 of these and 2
    presentation variables are set.
    Now I need to retrieve the according startDate for a chosen timePeriod.
    I tried to do this using a sub-query in the filter expression,
    but this seems not to be valid in Answers.
    In standard SQL it is expressed like this:
    select table1.* from table1
    where table1.dateValue  BETWEEN
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue1')+
    AND
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue2')+
    The return of the subqueries are single row, as it should in such constructions.
    I want the where clause to be in the filter expression for the dateValue column in Answers.(trimming of the WHERE keyword)
    Is there any other construction that does this trick in the BI Answers/Dashboard environment to do this?
    Kind regards

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

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

  • SCCM 2012 R2 reporting error: "The DefaultValue expression for the report parameter 'UserTokenSIDs' contains an error: A specified logon session does not exist. It may already have been terminated. (rsRuntimeErrorInExpression)"

    Hi,
    I have two SCCM environments under same active directory domain and one service account have been used for SCCM configurations on both the environments (QA and PRODUCTION). I am facing similar error as mentioned above while trying to fetch reports on
    PRODUCTION site, but the QA site is working fine, though same service account have been used for configuring both. While looking at the reportserverservice_<date> log on my Production DB server i see the following error
    "processing!ReportServer_0-3!2124!01/02/2015-09:09:30:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during
    report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot read the next data row for the dataset DataSet1. ---> System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'Override
    Default' to data type int."
    My DB and SCCM primary site are different and the reorting services point is installed on remote DB server. Please help me resolving the issue.
    Troubleshooting performed:
    1.Disabled the registry key 'EnableRbacReporting' from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\SRSRP to 0 and then restarted SSRS service and the reporting worked for some minutes after that the registry key reverted back to 1 automatically and
    reporting started throwing errors again.
    2. Checked with the permissions on DB whether or not 'sysadmin' role is assigned to the SCCM service account.
    3. re-registered the SQL management Provider WMI class.
    mofcomp.exe “C:\Program Files (x86)\Microsoft SQL Server\110\Shared\sqlmgmproviderxpsp2up.mof”

    Hi All,
    Finally found exact solution to the reporting error.
    Error: while launching SCCM reports (both from Console and web based) an unexpected error occured with error message as "The DefaultValue expression for the report parameter ‘UserTokenSIDs’ contains an error: A specified logon session does not exist.
    It may already have been terminated. (rsRuntimeErrorInExpression)"
    Solution: This is password replication issue for the domain account used to configure reporting services point in SCCM. If your SQL SSRS reporting services instance and databse runs with local default account whereas the reporting services point on SCCM
    primary site is configured with domain account, (As in My case) you need to perform the following in order to get rid of the error.
    Launch 'Reporting Services Configuration Manager' from the SQL SSRS box(either Local or Remote), Connect to Report Server Instance->Go to 'Execution Account' tab->Specify the 'Execution Account' as domain account and password which is used to configure
    Reporting Services Point in SCCM Primary Site, and then click apply.
    Now Lauch the report either way (Web based or from Console), the error will disappear and all your default reports will execute perfectly as before.

  • Customised xpath expression for does not contain

    Hi folks,
    Is there a customised symbol for xpath expression for "does not contain" . cant seem to find it in the xpath operators.
    Thanks
    Pratichi

    Hi,
    Refer the below link:
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/15981541f7648ee10000000a1553f7/content.htm
    -Supriya.

  • The XPath expression  problem

    Hi everyone,
    I developed a workflow. I builded and deployed successfully.
    And I assing this workflow to a policy.
    I create a request, but this request gave a fail.
    Error in <assign> expression: <to> value is empty at line "181". The XPath expression : "" returns zero node, when applied to document shown below:
    Line 181 :
    <copy>
    <from variable="inputVariable" part="payload"
    query="/ns3:process/ns4:RequestID"/>
    <to variable="initiateTaskInput" part="payload"
    query="/ns2:initiateTask/task:task/task:payload/task:RequestID"/>
    </copy>
    It seems that I could not take requestID.
    Do you have any idea ?
    Thanks for your help.
    Regards

    How did you resolve the issue?  We're facing the same problem.

Maybe you are looking for