XPATH condition not executing

Hi Experts,
I am stucked with a condition in XPATH which is not executing. I want to use substring function in the Expression Editor. In the source structure field IDTNR at path /ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR if the field value of IDTNR starts with a D(for eg DADHJI) then I have to block this particular message or else(eg ASHDJKKD) pass for other values. I have tried following ways so far.
(ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[(substring(.,0,1) ='D')] EX )
/ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNRhttp://not(starts-with(.,"D"))
substring(ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR,0,1) = 'D'
And also can some body please expalin what is the meaning of http:// in the second statement as also in thread  Re: Using substring in the XPATH expression for Receiver Determination
Requesting you , please dont forward the links or blogs.
Thanks in Advance.
Sudhir

Hi Sudhir
I think
substring(string,start,length) or substring(string,start)
should work on this.
Moreover try with
contains(String,contain string) or starts-with(String, Starts with String)
I am not sure if it get problem with escape sequences in String. Check again.
You can also use
substring-before(String, String) or substring-after(String,String)
Thanks
Gaurav

Similar Messages

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

  • Condition not executed in Plan

    Hi,
    we´ve got a sql statement which looks like that:
    SELECT BplSegment.SalesOrg, WeeklyBplDataMeta.Line
    FROM BPLSEGMENT BplSegment
    LEFT OUTER JOIN BPLDATA WeeklyBplData
    INNER JOIN BPLDATAMETA WeeklyBplDataMeta
    ON WeeklyBplDataMeta.PKey=WeeklyBplData.BplDataMetaPKey
    ON WeeklyBplData.BplSegmentPKey=BplSegment.PKey
    And WeeklyBplDataMeta.Sheet='SegmentSummary'
    And WeeklyBplDataMeta.Line IN ('TotalSalesPlanned','TotalCostsPlanned','TotalQtyPlanned','ROI-BplPlanned')
    and BplSegment.SalesOrg=N'0001'
    WHERE BplSegment.BplMainPKey= '0010000000391eog'
    And BplSegment.SysPeriodPKey= '0010000000387wvy'
    The result of the query is wrong. It seems that the part WeeklyBplDataMeta.Line IN ('TotalSalesPlanned','TotalCostsPlanned','TotalQtyPlanned','ROI-BplPlanned') is not executed in plan.
    Wrong Plan:
    !http://img213.imageshack.us/img213/4500/planl.png!
    If we delete the bold part of the statement we receive the correct data! The IN (TotalSalesPlanned, ...) part is then executed in plan.
    Correct Plan:
    !http://img204.imageshack.us/img204/7740/plan2h.png!
    Why is the condition and BplSegment.SalesOrg=N'0001' so significant to the plan?
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    Thx,
    Alex

    Well, this is a bit hard to follow.
    When you say "The result of the query is wrong." do you mean the actual data returned from the query, or just the access plan of the query? I would assume the latter based on your query plan posting, but i'm really not sure.
    Also, it's not that i don't believe you, but i don't typically believe TOAD, ~insert front end tool here~, etc... when it comes to things like this. Can you provide the results using a copy/paste from SQLPLUS?
    An example would be (which you would run for BOTH statements you have) ...
    SQL?ALTER SESSION SET STATISTICS_LEVEL = ALL;
    Session altered.
    --YOUR QUERY WOULD REPLACE MY EXAMPLE QUERY
    SQL?select *
    from t1
    where col1 = 100;
      2    3 
          COL1      COL2
           100         0
    SQL?SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID     7z61ytum3h786, child number 0
    select * from t1 where col1 = 100
    Plan hash value: 2347959165
    | Id  | Operation              | Name  | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1    |        1 |         1 |      1 |00:00:00.01 |         4 |
    |*  2 |   INDEX UNIQUE SCAN         | T1_PK |        1 |         1 |      1 |00:00:00.01 |         3 |
    Predicate Information (identified by operation id):
       2 - access("COL1"=100)
    18 rows selected.
    SQL?Also, when posting, if you use the tags you can preserve the formatting of your code so it's easier to read.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Xpath condition not working for determining receivers

    hello all
    am writing a xpath expression for a simple structure
    <doc>
       <status>
       <id>
    </doc>
    status is attribute field.and will have value 'error' and some other value for no error. I want to choose one receiver if error and other receiver if no error
    so I wrote an xpath expression
    /Doc[@status='Error']   EX    --> Error receiver
    count(/Doc[@status='Error']) = '0'   --> no error receiver
    it was working couple of days ago but suddenly stopped working
    whats going on? thx
    mike

    But xpath is not working properly..
    Are you using this in the condition editor of Interface Determination (it should not be a cause of concern though)
    Can you confirm that the condition that you have specified is proper ....does it work when you specify only one condition?
    Regards,
    Abhishek.

  • Fault policies locaton and test xpath conditions not working.

    I cant place fault policies files in a non mds location or the composite directory.
    For example it does not work with an /opt/...... server path in the composite.xml property.
    Also, I can't get working xpath test expressions like this:
    <condition>
    <test xmlns:elem="http://na.telefonica.com/elementoscomunes">$fault.fault0/elem:AREA_ERROR/ErrorType = "F"</test>
    <action ref="reintentos-neon"/>
    </condition>
    In jdeveloper, the part is "fault0", and the subelements are like i've showed, but the condition never matches.
    I saw in a forum that the sintax was $fault.nameofpart/xpathexpression, but doesn't seem to work. I've tried lots of permutations of the syntax, and also with 'F' instead of "F".
    ¿Any Idea?

    This is the exception in the server GUI
    <fault>
    <bpelFault>
    <faultType>1</faultType>
    <OBA_Par_Alta_AveriaFault>
    <part name="fault0">
    <elem:AREA_ERROR>
    <ErrorID>8888</ErrorID>
    <ErrorType>F</ErrorType>
    <ErrorDesc>Afsafds</ErrorDesc>
    </elem:AREA_ERROR>
    </part>
    </OBA_Par_Alta_AveriaFault>
    </bpelFault>
    </fault>

  • 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

  • ABAP Debugger-Is it possible to NOT execute a statement?

    Hello all,
    In ABAP debugger, is it possible to NOT execute a  statement? This will allow testing programs without having to change, generate and transporting the new version.
    Thank you for your help.
    AG

    hi,
          Debugger does not have this kind of functionality but if you want to do on that then put your code between an if else block and while debugging change the value of if else condition based on ur rwquirement as u know u can change value of varriable in debugger.
    Rewards if helpful.
    Regards
    Gagan

  • Oracle ADF refresh as deferred does not execute query on page load

    In the oracle ADF page I have two panel boxes. (Oracle ADF 11.1.1.4)
    a) Personal information panel box with PanelFormLayout (PersonalInfoViewObj) - ReadOnly View Object
    b) Address information panel box with Table (AddressInfoViewObj) - Read Only View Object
    For the iterators in a) and b) I have kept refresh condition as deferred and cacheResult=false. Also in b) for af:table, I have kept contentDelivery="immediate"
    When page loads it fires SQL query for a) and populate the data in Personal information panel box. However for b) it does not execute the SQL query and the data is not getting populated ( in AddressInformation panel with the tables. Please note data is there in the DATABASE......)
    Becasue with the refresh as deferred it was not executing the sql query for Panel b) (panel with Table and table iterator). I have tried refresh as always and refresh ifNeeded/renderModel/prepareModel however in that case it is executing the SQL query two times (twice).
    Please let me know the best way to fix this issue.

    Hi,
    I think you need a method in an application module to init your data.
    In your AM : create a method like :
    public void init(){
    getViewObject().executeQuery();
    }In your adfc-config.xml create a methodCall from this method and a "control flow case" from the methodCall to your page.
    and keep refresh as "deferred " in your pageDef.
    Clément

  • QBE style(Find-Execute) Query not executing when VO has bind parameter

    I have an Entity Based ViewObject that is composed of 3 Entities so the entities are related through an Assoc. Then the ViewObject also has a bind paremeter defined and used in the WHERE clause.
    In my page everything is fine until when I use/click on the Find operation on the JSF page. When the Find operation is executed the page/form goes blank so I can enter by QBE query. Now when I Execute my search by executing the ExecuteWith params operation. Nothing is happening to the screen, it seems that query was not executed. Although there was no errors or exceptions displayed.
    However if I remove the bind parameter, and execute the Execute operation instead after going to Find mode, the query is executed properly and I get expected results.
    My problem is a bit general, but are there anyone who had a similar problem like this? Im still in the process of creating a test case.
    regards,
    Anton

    Hi Frank,
    But the "ExecuteWithParams" operation provides the bind variable right? (i had the value hardcoded on the pagedef). So it must have supplied a value. I also noticed that this is happening only when if the VIewObject contains two or more Entities. If the Viewobject has only 1 entity, the ViewObject queries properly.
    Anyway Frank, I had found a fix for this. I set an InvokeAction on the pagedef that binds to the ExecuteWithParams that is invoked during page load only(!postback condition). and then I just use the Find-Execute operations instead of the Find-ExecuteWithParams operations that I used previously.
    I will try to replicate the issue again to investigate what's really going on. I just want to know if its a bug or just an expected behavior or i just made a mistake.
    regards,
    Anton

  • Not executing the step

    hi ,
    im using loop in workflow.
    in loop i have used 3 steps.
    while i was watching the log i found that  one particular step was not executed and its going to the next step  even i have given the steps sequentially in the loop.due to that condition is not satisfied and its showing the maximun number of nodes reached.
    how to correct this error.
    please help me.
    Raghu

    Check your workflow definition to see what is wrong. Also analyze the technical log.
    Regards,
    Martin
    Edited by: Martin Nooteboom on Jun 13, 2008 11:59 AM
    Or as you will have found from your other thread, reset the buffers. Please try to be more clear when you ask a question and try to give as much information as possible.

  • Global succession updates are limited to 500 relationships. If more than 500 exist PLM presents a warning message and does not execute the update

    Global succession updates are limited to 500 relationships. If more than 500 exist PLM presents a warning message and does not execute the update.
    How/Where to increase the relationship count?
    The message which I can see :
    Warning:
    This specification has exceeded the number of parent relationships allowed by Where Used. The Where Used tool only supports up to 500 parent relationships.
    Thanks

    This really brings up a larger topic around change management.
    The questions you should start with is
    1. What kind of change is happening to the raw material? 
    2. Will this change affect anything upstream inside or outside of PLM4P? (Will this change affect nutrition, compliance, the ingredient statement, the label etc?)
    3. Who needs to approve this change?
    If they are non-material changes (changes that don't affect theoretical calculations, the ingredient statement, labeling, upstream systems that need to be notified etc) then you should be using get latest revision instead of global succession.   Get Latest Revision will automatically switch out the material with the latest approved version.  This logic is also configurable in case you need to add additional guard conditions.   We can also provide guidance around locking the get latest revision lock once a specification has reached the retired/obsolete state so changes won't occur for specifications in those statuses.
    If the changes to the raw material are material changes (changes that affect calculations, labeling etc) then the change should be reflected with a copy of the specification.  Dependent specifications then need to be re-issued so calculations can be performed and the appropriate workflow reviews can occur.   Smart Issue allows for filtering based on status and should let you re-issue in smaller blocks. 
    Let me know more about your change management strategy, how often large material changes happen and maybe example causes for those mass changes.  We can also schedule a change management training session for everyone where we can share our vision and tools available for change management.  This topic is quite large and generally requires a lot of business process discussion beyond just the tools available. 
    Thanks
    Kelly

  • Custom Code not Executing

    We implemented SAP 3/1/2010 and have had 3 separate custom programs that have behaved in this same manner.  Here is what happens.
    1.  User runs tcode per usual business process
    2.  Custom program results are not created.  In other words, it appears that the custom program does not execute because the results of the custom program are not created.
    3.  Rerun same tcode with debug stopper
        a)  If the user puts a "debug stopper" in the custom program
        b) the custom code is executed
        c) custom code functions as expected and results are displayed properly
    4.  remove the stopper
    5.  Execute tcode and it works properly
    So, the custom program is active and is executed (when stopper is there) and functions as expected.  However, it does not ALWAYS execute the code (or so it seems from the results that are displayed)
    Another work around that we have discovered.
    1.  User executes tcode and discovers the custom program did not produce expected results
    2.  User logs off of SAP
    3.  Logs back on and executes tcode
    4.  custom program expected results are displayed.
    As I said at the beginning, we have experienced this with 3 different custom programs now.  I have worked with our Basis team and have not found a solution as to why the custom programs are not executing "all the time".
    PLEASE help!

    Here are the answers to your questions.  Thanks for the quick response.
    Custom program = It is code that is executed in a user exit, or is a stand alone program
    The 3 different programs are all doing various things.  1) Passing parameters to vertex  2) very complex as it adds pricing conditions and updates forwarding agent partner  3) Stand alone program updates field in BSEG
    No security objects are involved in any of the 3 programs.
    Yes, this is in the production environment.
    No, I have not tried in any other environment because we can not find a situation where the problem always occurs.  In other words, I can not duplicate the problem "EVERY TIME" however, when a user encounters the problem it occurs all the time until they do one of our "work arounds" which is to log off SAP or to put a "degug stop" in the program.

  • BDC recording not executing last OK code for order technical completion

    Hello!
    Regarding a QM requirement, I have created a rather simple BDC recording to change the activity type of an order to new ones (based on particular conditions not relevant here) on transaction IW32.
    However, if the order is technically complete, I have to cancel the technical completion, change the activity type, and then complete the order technically again (so it remains just the way it was before modification).
    The only order types relevant in the requirement are YM01 and YM02. For YM01, the BDC recording works like a charm. But when executing the proper recording for type YM02, the last OK code (i.e. pressing the OK button on the Complete subscreen) is ignored and the process remains incomplete: the orders are never completed technically again.
    Here is the recording:
    0     T     IW32     BS AA X   F
    SAPLCOIH                       101     X                                                                               
    0           BDC_OKCODE     /00
                                            0           CAUFVD-AUFNR     80000005
    SAPLCOIH                       3000     X                                                                               
    0           BDC_OKCODE      =WIAR
    SAPLCOIH                       3000     X                                                                               
    0           BDC_OKCODE     /00
                                            0           CAUFVD-ILART     206
    SAPLCOIH                       3000     X                                                                               
    0           BDC_OKCODE      =ARCH
    SAPLIWO1                           200             X                                                                               
    0           BDC_OKCODE      =WTER
                                            0           RIWO1-CLNOT     X
    Any help would greatly appreciated!
    Best regards,
    André Santos

    Leandro, thanks for the answer!
    The BDC recording does not work when executed visibly or step by step. After some extensive debugging, I realized that the final screen (the technical complete confirmation screen) is not an actual subscreen, even though it has its own number. That screen is actually generated by an FM, so apparently that's why it's ignored when the BDC is executed.
    I found a BAPI to replace that missing step: BAPI_ALM_ORDER_MAINTAIN. However, I'm having a hard time figuring out how to reference the orders I need it to complete. The FM asks for an IT_METHODS table and I couldn't tie the method to the orders:
    it_methods-refnumber = ???
    it_methods-objecttype = 'HEADER'. "That's what I found on the example, not sure whether this is right or not.
    it_methods-method = 'TECHNICALCOMPLETE'.
    it_methods-objectkey = ??? "Maybe the order number itself?
    APPEND it_methods.
    Has anyone used this BAPI before?
    Edited by: André Felipe Oliveira dos Santos on Oct 20, 2010 2:18 PM

  • Subvi is not executable error, but it has no error

    Hey I hope you can help me with a weird error.
    I got the error "SubVi  'name' : SubVi is not executable" but when I click on the SubVi and open it it does not show me any description of an error. If I open the main vi or the SubVi alone it shows no error. Could it be a problem of a library or something else?
    I am using Labview 2012 and Labview 2012 Mindstorms NXT.
    If you neew more screenshots or the rest of the SubVis please tell me so :-)
    Thank you!
    Jan
    Attachments:
    automatischer Modus - ohne Wait - ohne Array - global.vi ‏80 KB
    Solar.vi ‏15 KB
    project.png ‏262 KB

    SmartCity-Project wrote:
    Thanks for all your replies!
    I found the error, the NXT does not support global variables in Target on NXT- Mode so I changed to Target on Computer - Mode and now it works.
    Unfortunately the program crashes after 15 minutes more or less. Could you imagine why? Is it because of to many bluetooth connections or a bad programm structure?
    After a very quick look at the code I would say that it is probably bad code. Your overuse of global variables, sequence structures and silly things like a For loop set to run once with everything inside the loop wrapped in a sequence frame is a goo dindication that you need to learn much more about data flow programming techniques. With the amount of global variables you are using your program is probably ripe with race conditions. In addition, you did not include any of the subVIs so we cannot see what is happening in them.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Condition not work

    Hi guru's
    MWST     010     Access not executed (Requirement 008 not fulfilled)
    can anyone please tell me why this error coming in pricing.I checked the entry for condition record as well.

    Hi,
    Please go to V/07 t-code for the access sequence- MWST go to accesses as below;
    Requirement-----tabdescription--
    requirment
    8---- -
    78-----Departure Country / Destination Country-----8
    you should create  for this access sequence for export business requirement -008 in MWST from VK11
    I hope this will solve your problem.
    Regards,

Maybe you are looking for

  • How to get a week number  for the year using oracle sql query?

    hi everyone, i have the requirement to find the week number for the calender.. so that week number should start with 01 when the year starts and it should end with week end date(that is first saturday of the january month).. so next week number start

  • Vendorwise Rejection Report

    hi all,   My client want to see rejection report vendor wise so that next time order placed to vendor with least rejection.   Is this report is present in SAP. thanks rahul

  • How i can make valid java appliacation and how

    i am novice in java and i want to make good and valid application that i can run from server any body can tell me how i can make this or any link for any project online or build on net with deployment details A.R

  • Using the BAPI_QUOTATION_CREATEFROMDATA

    Hi All, I want to know how to use this BAPI: BAPI_QUOTATION_CREATEFROMDATA in 4.6C As iam getting the error: E VP 112       Enter the value SOLD TO PARTY or SHIP TO PARTY. And iam passing SOLD TO PARTY or SHIP TO PARTY values below. =================

  • SMTP error when I add a new user

    An object with the SMTP proxy address ([email protected]) already exists I can't add this users alias in the SMTP address space in unity when I do I get the above. I can't find a similar entry anywhere. Has anyone run accross this? Thanks,