Xslt/xpath: count preceding elements which starts-with 'S'

Hi everybody,
I got the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
     <A1>
          <FOO>1</FOO>
     </A1>
     <A1>
          <FOO>2</FOO>
     </A1>
     <B1>
          <FOO>3</FOO>
     </B1>
     <A1>
          <FOO>4</FOO>
     </A1>
</ROOT>
I want wo count all preceding Elements of each 3
How has the experssion has to look?
count(/ROOT/A1/FOO/preceding::[starts-with(.,'A')])
DOES not work
Any suggestions?
Regards Mario
Edited by: Mario Müller on Sep 12, 2008 2:23 AM

Hi Mario,
What are you using to test xsl expressions?
I am using XSL Tester, all sugestions that i gave you retrieve a solution. Therefore, this solution will depend from XML tree. For instance if you have something like this:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
     <A1>
          <FOO>1</FOO>
          <FOO>5</FOO>
                        <A1000>
                              <FOO>46</FOO>
                       <FOO>400</FOO>
                        </A1000>
          <FOO>300</FOO>
     </A1>
     <A2>
          <FOO>2</FOO>
          <FO>6</FO>
     </A2>
     <B1>
          <FOO>3</FOO>
     </B1>
     <A1>
          <FOO>4</FOO>
          <FO>7</FO>
     </A1>
</ROOT>
Using this XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="/">
            <Result>
               ---- Expression ----
          </Result>
     </xsl:template>
</xsl:stylesheet>
Results using the expressions that i gave you, will be:
1.1
<xsl:value-of select="count(//FOO[1][starts-with(name(parent::node()),'A')])"/>
<?xml version="1.0" encoding="UTF-16"?>
     <Result>7</Result>
1.2
<xsl:value-of select="count(//FOO[1][starts-with(name(parent::node()),'A')])"/>
<?xml version="1.0" encoding="UTF-16"?>
    <Result>4</Result>
2.1
<xsl:value-of select="count(/ROOT/*/FOO[starts-with(name(parent::node()),'A')])"/>
<?xml version="1.0" encoding="UTF-16"?>
  <Result>5</Result>
2.2
<xsl:value-of select="count(/ROOT/*/FOO[1][starts-with(name(parent::node()),'A')])"/>
<?xml version="1.0" encoding="UTF-16"?>
    <Result>3</Result>
I think the last one, fits your solution. Give me more hints, maybe i can help you.
Best regards,
Pedro Pereira

Similar Messages

  • How to select rows which starts with

    In the below example I want only the rows which starts with the word CERTIFICATE.
    How do we do?
    create table full_text(text clob);
    insert all
    into full_text values('CERTIFICATE OF SERVICE')
    into full_text values('APPLICATION FOR CERTIFICATE')
    into full_text values('CERTIFICATE OF LIABILITY')
    into full_text values('CERTIFICATE OF TITLE')
    SELECT * FROM DUAL ;
    COMMIT;
    CREATE INDEX CTX_INDX_TEXT ON full_text (TEXT) INDEXTYPE IS CTXSYS.CONTEXT;
    SQL> select * from full_text where contains(text,'$CERTIFICATE')>0 ;
    TEXT
    CERTIFICATE OF TITLE
    CERTIFICATE OF LIABILITY
    APPLICATION FOR CERTIFICATE
    CERTIFICATE OF SERVICE
    The 3rd row show not appear.
    Thanks

    I understand what Roger is saying. Since it is past his bedtime there in the UK and still sunny here in California, here is an example for you:
    SCOTT@orcl_11g> create table full_text(text clob)
      2  /
    Table created.
    SCOTT@orcl_11g> insert all
      2  into full_text values('CERTIFICATE OF SERVICE')
      3  into full_text values('APPLICATION FOR CERTIFICATE')
      4  into full_text values('CERTIFICATE OF LIABILITY')
      5  into full_text values('CERTIFICATE OF TITLE')
      6  SELECT * FROM DUAL
      7  /
    4 rows created.
    SCOTT@orcl_11g> CREATE OR REPLACE PROCEDURE your_proc
      2    (p_rowid IN           ROWID,
      3       p_clob     IN OUT NOCOPY CLOB)
      4  AS
      5  BEGIN
      6    FOR r IN
      7        (SELECT text
      8         FROM      full_text
      9         WHERE  ROWID = p_rowid)
    10    LOOP
    11        DBMS_LOB.WRITEAPPEND (p_clob, 8, 'XXSTART ');
    12        DBMS_LOB.APPEND (p_clob, r.text);
    13        DBMS_LOB.WRITEAPPEND (p_clob, 6, ' XXEND');
    14    END LOOP;
    15  END your_proc;
    16  /
    Procedure created.
    SCOTT@orcl_11g> SHOW ERRORS
    No errors.
    SCOTT@orcl_11g> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('your_datastore', 'USER_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE ('your_datastore', 'PROCEDURE', 'your_proc');
      4    CTX_DDL.SET_ATTRIBUTE ('your_datastore', 'OUTPUT_TYPE', 'CLOB');
      5  END;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11g> CREATE INDEX CTX_INDX_TEXT ON full_text (TEXT) INDEXTYPE IS CTXSYS.CONTEXT
      2  PARAMETERS ('DATASTORE your_datastore')
      3  /
    Index created.
    SCOTT@orcl_11g> select * from full_text where contains(text,'XXSTART $CERTIFICATE')>0
      2  /
    TEXT
    CERTIFICATE OF SERVICE
    CERTIFICATE OF LIABILITY
    CERTIFICATE OF TITLE
    SCOTT@orcl_11g>

  • XMLStreamException: Unable to write XML string which starts with the illegal XML char 0x0000

    Hi,
    I am trying to run a WebLogic 8.1 Workshop webservice using Tuxedo Controls. I
    am running in to an XML error:
    <faultcode>JWSError</faultcode>
    <faultstring>com.bea.xml.marshal.XmlEncodingException: Error writing XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which starts with
    the illegal XML char 0x0000</faultstring>
    <detail>
    If i look into the application server log file, It says:
    <FML32Deserializer::deserializeInteger>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer> <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <Exception deserializing field BUFFERSIZE, exception: weblogic.jws.control.ControlException:
    Error getting field BUFFERSIZE as a Integer, exception: 4 (FNOTPRES)>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer> <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <FML32Deserializer::deserializeField - Name=ROWID, type=class java.lang.String>
    But these fields are in the field table class file generated using java weblogic.wtc.jatmi.mkfldclass32

    I am pasting the response i get while i try to run this web service using WebLogic
    Workshop.
    Anyones help would be much appreciated.
    Thanks,
    Deepak
    Service Response
    Submitted at Friday, December 19, 2003 1:25:00 PM CST
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>com.bea.xml.marshal.XmlEncodingException: Error writing XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which starts with
    the illegal XML char 0x0000</faultstring>
    <detail>
    com.bea.wlw.runtime.core.request.ResponseValidationException: com.bea.xml.marshal.XmlEncodingException:
    Error writing XML stream: com.bea.xml.pure.XMLStreamException: Unable to write
    XML string which starts with the illegal XML char 0x0000
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.setReturnValue(MimeXmlResponse.java:35)
    at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:242)
    at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
    at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:159)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:134)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:46)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.exploreExec(HttpServerHelper.java:253)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:570)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6316)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Caused by: com.bea.xml.marshal.XmlEncodingException: Error writing XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which starts with
    the illegal XML char 0x0000
    at com.bea.xml.marshal.MarshalContext.error(MarshalContext.java:140)
    at com.bea.xml.marshal.MarshalContext.writeCharacterData(MarshalContext.java:178)
    at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:79)
    at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
    at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:358)
    at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
    at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
    at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.writePart(MimeXmlResponse.java:105)
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.writeOutputPart(MimeXmlResponse.java:97)
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.setReturnValue(MimeXmlResponse.java:31)
    ... 22 more
    </detail>
    </error>
    "Deepak" <[email protected]> wrote:
    >
    >
    >
    Hi,
    I am trying to run a WebLogic 8.1 Workshop webservice using Tuxedo Controls.
    I
    am running in to an XML error:
    <faultcode>JWSError</faultcode>
    <faultstring>com.bea.xml.marshal.XmlEncodingException: Error writing
    XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which
    starts with
    the illegal XML char 0x0000</faultstring>
    <detail>
    If i look into the application server log file, It says:
    <FML32Deserializer::deserializeInteger>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer>
    <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <Exception deserializing field BUFFERSIZE, exception: weblogic.jws.control.ControlException:
    Error getting field BUFFERSIZE as a Integer, exception: 4 (FNOTPRES)>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer>
    <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <FML32Deserializer::deserializeField - Name=ROWID, type=class
    java.lang.String>
    But these fields are in the field table class file generated using java
    weblogic.wtc.jatmi.mkfldclass32

  • SDK J2 EE server remove it from list of programs which start with windows

    Hello there
    Since SDK J2EE 5 server takes many resources, I would like to be able to remove it from the list of programs which start with Windows XP PRO start up.
    How could I possibly do that?
    Thanks in advance

    Since SDK J2EE 5 server takes many resources,is it take more resource ?
    is it decrease your speed ?
    is it not allow another app or software to run ?
    if you say yes,
    then
    type msconfig in start->run
    click startup tab and deselect the corresponding checkbox
    or
    go to control panel -> administrator tools -> services -> select the service , then right click properties and select disable in drop down,
    or
    control panel -> add or remove programs -> select j2ee-xxx remove it

  • XML Parsing - problem with a value of an element if starting with space

    Hi Experts,
    I need your valuable guidence to get out of a problem in parsing an XML file.
    An XML file is read into xstring variable and it is processed to be split into the corresponding itab.
    Please find the code below
    types: begin of ty-itab,
                field(4096),
              end of ty-itab.
    Data:
    g_ixml                       TYPE REF TO if_ixml,
    g_ixmldocument               TYPE REF TO if_ixml_document,
    g_ixmlstreamfactory          TYPE REF TO if_ixml_stream_factory,
    g_ixmlstream                 TYPE REF TO if_ixml_istream,
    g_ixmlparser              TYPE REF TO if_ixml_parser,
    g_ixmlnodemainlist        TYPE REF TO if_ixml_node_list,
    g_ixmlnodelistmainelement TYPE REF TO if_ixml_node_list,
    g_sxmldata                TYPE string,
    g_ixmlnode                TYPE REF TO if_ixml_node.
      DATA: wa_xmltab TYPE xstring,
                itab type table of ty-itab.
    OPEN DATASET l_file IN BINARY MODE FOR INPUT MESSAGE v_msg.
    READ DATASET l_file INTO wa_xmltab.
    PERFORM f_create_xmltable USING wa_xmltab
                                  CHANGING v_msg.
    IF NOT v_msg IS INITIAL.
          msg = v_msg.
          EXIT.
        ELSE.
          itab[] = it_xmldata[].
        ENDIF.
    CLOSE DATASET l_file.
    Subroutine to convert xstring to char type ITAB.
    FORM f_create_xmltable USING  value(pi_inputxmlstring) TYPE xstring
                           CHANGING v_msg.
    *-- create the main factory
      g_ixml = cl_ixml=>create( ).
    *-- create the initial document
      g_ixmldocument = g_ixml->create_document( ).
    *-- create the stream factory
      g_ixmlstreamfactory = g_ixml->create_stream_factory( ).
    *create input stream
      g_ixmlstream = g_ixmlstreamfactory->create_istream_xstring( string =
    pi_inputxmlstring ).
    *-- create the parser
      g_ixmlparser = g_ixml->create_parser( stream_factory =
    g_ixmlstreamfactory
                                      istream        = g_ixmlstream
                                      document       = g_ixmldocument ).
    *-- parse the stream
      IF g_ixmlparser->parse( ) NE 0.
    *if parser cannot be created then give error exit
        IF g_ixmlparser->num_errors( ) NE 0.
          EXIT.
        ENDIF.
      ENDIF.
    *-- we don't need the stream any more, so let's close it...
      CALL METHOD g_ixmlstream->close( ).
      CLEAR g_ixmlstream.
    *get the number of main nodes of the XML document
      g_ixmlnodemainlist = g_ixmldocument->get_children( ).
    *set number of elemtns
      g_inummainelements = 0.
      g_imainelementsctr = 0.
      g_inummainelements = g_ixmlnodemainlist->get_length( ).
      g_ifirstlevelctr = 0.
    *loop through the document till all have nodes have been covered.
      WHILE g_ifirstlevelctr LT g_inummainelements.
    *get the first node
        g_ixmlnode = g_ixmlnodemainlist->get_item( g_ifirstlevelctr ).
    *check the type of node
        g_isnodeelement = g_ixmlnode->get_type( ).
    *if node is not of type Element then continue
    *because we have got to read only text from element nodes.
        IF g_isnodeelement NE c_nodeelement.
          g_ifirstlevelctr = g_ifirstlevelctr + 1.
          CONTINUE.
        ENDIF.
    *get nodes of the element just found.
        g_ixmlnodelistmainelement = g_ixmlnode->get_children( ).
    *get number of children of main element
        g_inumchildelements = g_ixmlnodelistmainelement->get_length( ).
    *loop trhough the number of children
        WHILE g_imainelementsctr LT g_inumchildelements.
          g_ixmlnodemainelement = g_ixmlnodelistmainelement->get_item(
        g_imainelementsctr ).
    *get type of node
          g_isnodeelement = g_ixmlnodemainelement->get_type( ).
          IF g_isnodeelement NE c_nodeelement.
            g_imainelementsctr = g_imainelementsctr + 1.
            CONTINUE.
          ENDIF.
    *get name of the node.
          g_selementvalue = g_ixmlnodemainelement->get_name( ).
    *get children of node
          g_childnodelist = g_ixmlnodemainelement->get_children( ).
          g_inumchildren =  g_childnodelist->get_length( ).
          g_ichildelementcounter = 0.
    *while there are number of children of node.loop through
          WHILE g_ichildelementcounter LT g_inumchildren.
    *get the child node
            g_childnode = g_childnodelist->get_item(
    g_ichildelementcounter ).
    *check the type of node
            g_isnodeelement = g_childnode->get_type( ).
    *if node is not of element type continue
            IF g_isnodeelement NE c_nodeelement.
              g_ichildelementcounter = g_ichildelementcounter + 1.
              CONTINUE.
            ENDIF.
    *otherwise get element name
            g_selementname = g_childnode->get_name( ).
    *get value stored in this node.
            g_selementvalue = g_childnode->get_value( ).
            g_numelem = g_inumchildren - 1.
            IF g_ichildelementcounter EQ g_numelem.
              CONCATENATE: g_slinedata g_selementvalue
                      INTO g_slinedata.
            ELSE.
    *      store the value of noide in delimiter ~ line
    *      Check for Invalid characters in file
                IF g_selementvalue CA '&'.
                  REPLACE ALL OCCURRENCES OF '&amp;' IN g_selementvalue WITH
                endif.
    *if value contains delimiter then error
                IF g_selementvalue CA '~'.             
                  V_MSG = text-003.
                  EXIT.
                ELSE.
                  CONCATENATE: g_slinedata g_selementvalue '~'  .
                  INTO g_slinedata.
                ENDIF.
            ENDIF.
    *continue
            g_ichildelementcounter = g_ichildelementcounter + 1.
          ENDWHILE.
          g_ichildelementcounter = 0.
    *increment the main element counter by one to go to the next node
          g_imainelementsctr = g_imainelementsctr  + 1.
    *move the current delimiter line creted to internal table to be given
    *back to the calling program
          MOVE g_slinedata TO wa_xmldata-data.
          APPEND wa_xmldata TO it_xmldata.
          MOVE '' TO g_slinedata.
          MOVE '' TO wa_xmldata-data.
        ENDWHILE.
    *increment counter to move to hte next node.
        g_ifirstlevelctr = g_ifirstlevelctr + 1.
        g_imainelementsctr = 0.
      ENDWHILE.
    ENDFORM.                    "f_create_xmltable
    XML structure
    <?xml version="1.0" encoding="utf-8"?>
    <ABCInbound xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\XYZSchema\ABCInbound.xsd">
    <HH>
    <RecordType>HH</RecordType>
    <Source>ABC</Source>
    <Destination>XYZ</Destination>
    <TimeStamp>20050909220546</TimeStamp>
    </HH>
    <BH>
    <RecordType>BH</RecordType>
    <DocType>AB</DocType>
    <Reference>2205516125</Reference>
    <DocumentDate>20080909</DocumentDate>
    <PostingDate></PostingDate>
    <CompanyCode>ABC</CompanyCode>
    <Currency>INR</Currency>
    <ExchangeRate>1.0000</ExchangeRate>
    <Park></Park>
    <ItemNumber>2</ItemNumber>
    </BH>
    <BL>
    <RecordType>BL</RecordType>
    <Reference>2205516125</Reference>
    <RefLineItem>1</RefLineItem>
    <AcctType>K</AcctType>
    <DrCrIndicator>H</DrCrIndicator>
    <Account>01000003</Account>
    <Amount>364.00</Amount>
    <VendorName-1>TOM &amp; JERRY IS MY</VendorName-1>
    <VendorName-2> NAME TO BE PAID</VendorName-2>
    <VendorName-3>1987566Z</VendorName-3>
    <VendorName-4>22</VendorName-4>
    <Street>UCX STREET</Street>
    <City>ROAD 4</City>
    <PostalCode>515004</PostalCode>
    <Country>IND</Country>
    <ContactPerson></ContactPerson>
    <AlternatePayeeCode></AlternatePayeeCode>
    <AlternatePayeeName-1></AlternatePayeeName-1>
    <AlternatePayeeName-2></AlternatePayeeName-2>
    <AlternatePayeeName-3></AlternatePayeeName-3>
    <PaymentTerms></PaymentTerms>
    <BaselineDate></BaselineDate>
    <PaymentMethods></PaymentMethods>
    <Allocation></Allocation>
    <LineItemText>item text</LineItemText>
    <TaxCode></TaxCode>
    <TaxAmount>0.00</TaxAmount>
    <WHTaxCode></WHTaxCode>
    <WHTaxbase>0.00</WHTaxbase>
    <Fund></Fund>
    <FundCenter></FundCenter>
    <CostCenter></CostCenter>
    <InternalOrder></InternalOrder>
    <TaxAutomatically></TaxAutomatically>
    <SpecialGLIndicator></SpecialGLIndicator>
    </BL>
    <TT>
    <RecordType>TT</RecordType>
    <TotalRecords>1</TotalRecords>
    <TotalValue>222</TotalValue>
    </TT>
    </ABCInbound>
    when the above xml file is read and populated into ITAB, for element vendorname-2 which has a space in first position , that space is ignored.
    This is being used for a FB01 posting and vendor is paid based on Name1+Name2 printed on cheque and due to the space ignoring problem, the vendor name is displayed wrongly thus causing problems.
    I appreciate if someone could guide me thru and help me in solving this problem.
    How to preserve the leading or trailing space.
    g_selementvalue = g_childnode->get_value( ).
    when i check g_selementvalue, space is ignored.
    i will be greateful if someone could guide me through.
    Regards,
    Simha
    Edited by: Simha on Dec 11, 2008 10:49 AM

    0.02: A C C E P T: Request="NEXT"
    0.06: Fetch session state from database
    0.08: ...Check session ... owner
    0.08: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.08: Session: Fetch session header information
    0.08: ...Metadata: Fetch page attributes for application ..., page 330
    0.08: ...Validate item page affinity.
    0.08: ...Validate hidden_protected items.
    0.08: ...Check authorization security schemes
    0.08: Session State: Save form items and p_arg_values
    0.08: ...Session State: Save "P330_PROJECT" - saving same value: ""
    0.09: ...Session State: Saved Item "P330_SHUTTLE" New Value=""
    0.09: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.09: Branch point: BEFORE_COMPUTATION
    0.09: Computation point: AFTER_SUBMIT
    0.09: Tabs: Perform Branching for Tab Requests
    0.09: Branch point: BEFORE_VALIDATION
    0.09: ...Evaluating Branch: BEFORE_VALIDATION type: "REDIRECT_URL" button: 12904321314585385 branch: (Unconditional)
    0.09: Perform validations:
    0.09: ...Item Not Null Validation: P330_SHUTTLE
    0.09: ...Validation did NOT pass
    This is from debugging, what does the point "0.09: ...Session State: Saved Item "P330_SHUTTLE" New Value="" "
    mean ? I think it means, that the Shuttle somehow sets itself to null ?! but i dont understand why...
    There is no computation or anything that deletes the shuttle, the page is quite small, there is not much more than the shuttle and the validations and computations to give default value and transforming the shuttle items into a collection to continue working with the IDs.
    I dont check whats the problem
    Edited by: user12154443 on 21.07.2010 09:47

  • Inserting a column which starts with _

    Hi, I want to create a table with a column that begins with the _ character, but unfortuntly SQL*PLUS will not accept it.
    I checked and it seems that the _ character is a reserved oracle character for the LIKE operator.
    Is there anyway to start a column with the _ character ?
    Thank you in advance for your replies.

    Yes, you can do it, but you should avoid it. In order to do it, you have to enclose it in double quotes. The drawback is that you will then have to enclose it in double quotes any time that you reference it, which can get very messy if, for example, you are using some complex dynamic sql. The following demonstrates that it can be done, but it is definitely not recommended.
    scott@ORA92> create table "_test" (col1 number)
      2  /
    Table created.
    scott@ORA92> insert into "_test" values (1)
      2  /
    1 row created.
    scott@ORA92> desc "_test"
    Name                                      Null?    Type
    COL1                                               NUMBER
    scott@ORA92> select * from "_test"
      2  /
          COL1
             1
    scott@ORA92> drop table "_test"
      2  /
    Table dropped.
    scott@ORA92>

  • Regarding Ranges : to search for a patter which starts with 0 and any no: 0

    HI,
    My requirement is to use ranges on LIFNR to select data from EKKO.
    Here, I need to give 000123 for a vendor 123. ie, I need to prefix zeros.
    The problem is I cannot use any pattern here.. like if I give 12*, the conversion exit will give a dump.
    Is there any pattern to specify <0(or any occurance of 0)>12.*
    Thanks in advance,
    Sreekanth
    Edited by: Sreekanth Krishnan on Dec 1, 2009 7:46 AM

    hai sreekanth,
    try given Below program, May be helpful For u.....
    TABLES LFA1.
    data : begin of ivendor OCCURS 10,
           lifnr like lfa1-lifnr,
           end of ivendor.
    data: iekko like ekko OCCURS 10 WITH HEADER LINE.
    SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
    INITIALIZATION.
    VENDOR-LOW    =   1000.        " It specifies the range starting value.
    VENDOR-HIGH    =   2000.       " It specifies the range ending value.
    VENDOR-OPTION  =  'BT'.        " specifies ranges value is in between.
    VENDOR-SIGN      = 'I'.           "specifies both inclussive.
    APPEND VENDOR.
    shift vendor-low LEFT DELETING LEADING space.
    shift vendor-high LEFT DELETING LEADING space.
    ivendor-lifnr = vendor-low.
    CONCATENATE '000' ivendor-lifnr into ivendor-lifnr.
    append ivendor.
    loop at ivendor.
    if ivendor-lifnr+3(6) <> vendor-high.
    ivendor-lifnr = ivendor-lifnr + 1.
    shift ivendor-lifnr LEFT DELETING LEADING space.
    CONCATENATE '000' ivendor-lifnr into ivendor-lifnr.
    append ivendor.
    endif.
    endloop.
    select * from ekko into table iekko for all ENTRIES IN ivendor
                                      where lifnr = ivendor-lifnr.

  • Ignorning includes which starts with %

    Hi All,
    I am fetching Program name, and Include from the Table D010INC. but in the resulted output
    there are some includes that are begining with the symbol   %.  I don't want to display them in the final
    output.
    my select query is as follws.
      SELECT master include FROM d010inc INTO TABLE itab_d010inc
               WHERE master   IN s_mast AND
                     include  IN s_incl and
                     master NOT LIKE '%___________________' and
                     include NOT LIKE '%___________________' and
                     include NOT LIKE '<%>'.
    how do add not like %   condition  in the where clause ?
    Thanks in advance'
    Kr

    Hi KR,
    Please write the code as i hve given below :
    SELECT master include FROM d010inc INTO TABLE itab_d010inc
    WHERE master IN s_mast .
    IF itab_d010inc[] IS NOT INITIAL.
    DELETE itab_d010inc where master CS '%'
                          OR INCLUDE CS '%'.
    ENDIF.
    Hope It will solve your problem..
    if not then get back to me..there are so many way..you can delete.
    Thanks,
    Sujeet

  • Count files that start with a certain letter

    I need a simple script to give me a count of the files in a certain folder that start with "A" or some other character that I might choose.
    I tried this but got an error
    count every file name starts with "A" of folder ProofsOutFolder
    Thanks for the help.

    You can also approach it this way...
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Copy this code and paste it into your Script Editor application.">set theFolder to choose folder
    set theChar to text returned of ¬
    (display dialog "Enter Search Character:" default answer "A")
    do shell script "find " & quoted form of POSIX path of theFolder & ¬
    " -type f -name '" & theChar & "*'|awk 'END{print NR}'"</pre>
    Just another option to try out.

  • Poplist behavior for selecting value starting with a letter

    Hi
    I have got a poplist in a control block in my form. This is a database item and is populated fine.
    Now, the problem is if I want to select one record in the poplist starting with a particular letter, in-one-go, it is not possible..
    For example, I know that the value in the poplist I want, starts with the letter 'D'
    There are 10 values in the poplist that starts with the letter 'D' and I want to select the 6th value that starts with 'D'.What I want is, when I type in 'D', the poplist should pass controlto the (i.e. select) first element in the list, which starts with 'D'...then it should still remain as popped.The user should be allowed to navigate to all "D's" either using up arrow, down arrow or by typing in the letter D itself..
    Now what happens is, if I type in 'D' in the keyboard, the first value among the list that starts with 'D' is selected by the poplist and the records corresponding to this value is displayed.
    The up arrow/down arrow works fine in the following case now - If I click on the poplist, but do not actually select any item and just use up arrow, downarrow, it works...
    But the real requirement is when typing in any letter, any value in the poplist need not get selected ,but the poplist values should popped up so that the user can browse on it, and then select the required value.
    I will be grateful if somebody gives me the code for this and also tell me which trigger to put in the code?Any property needs to be changed?
    At the moment , my when-list-changed trigger is as follows..Also want to know, if this need to be changed at all?
    go_block('MY_DATABLOCK');
    clear_block(no_validate) ;
    execute_query;Edited by: Krithi on 12-Aug-2009 04:12

    Krithi wrote:
    You have moved far away from what I really need
    I DO NOT use a webform and I dont need to use Javabean in my form!You never mentioned anywhere that YOU DO NOT use a webform. One more reason why you should mention your forms version when you post some questions ;-) which would help others to respond with relevant answer.
    Its just the normal form.
    I said I have just seen examples in web forms but I believe it is do-able in normal forms too..Pls help someone?I am afraid you do not have much choice in client server.
    -Arun

  • How to test BPEL Process that starts with a pick consuming a JMS message

    Hi,
    We are using App Server v 10.1.3.3.0 and attempting to test a BPEL process which starts with a pick operation which is awaiting a JMS message on a specific queue.
    We are using the Oracle JMS adapter to achieve this.
    Is there any way in which this particular configuration can be easily tested using the BPEL testing framework? I have problems when I write the first initiate XML statement in my test case (stack trace below)
    <2011-01-27 10:23:47,028> <ERROR> <ProvisioningInterface.collaxa.cube.bpeltest> test run failed!
    ORABPEL-20011
    Instance initiation error.
    An error occurred while launching an instance for suite "BasicTest", test "baseline.xml".
    Please examine the log file for details or contact the system administrator.
    at com.collaxa.cube.engine.test.BPELTestRunManager.initiate(BPELTestRunManager.java:218)
    at com.collaxa.cube.ejb.impl.BPELTestBean.runSuites(BPELTestBean.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Unfortunately, there are no further details or any example I can see which simulate the kind of setup I have for my test.
    Any help much appreciated,
    Kind Regards,
    Colin.

    Hi,
    I assume you mean the JMS example under the $OH BPEL examples area. Unfortunately, this only shows how to get a BPEL process kicked off by awaiting a JMS message - but there is no test code there! There are specific examples which show off the testing framework facilities but it appears that all the examples which use async type of interactions are in the middle of a process which is kicked off by a normal synchronous client interaction.
    Any further help much appreciated.
    Colin.

  • [ADF] Query panel advanced search - starts with

    Hi all
    I have a query panel with an attribute which has an Attached LOV. The operator is defined as "Equals" in the View criteria
    The attribute is behaving properly
    View image: 1
    but when switched to advanced mode and "starts with" operator selected, the LOV changes to a numeric field and expects a numeric value
    View image: 2
    Is there a work around for this apart from removing the startswith operator
    Jdev version - 11.1.2.0.0

    User, please always tell us your jdev version.
    Well, this use case need some thinking to be done. What do you want to archive with adding a new query field to the panel? As you said you already have one field for employeeId and now, on a click on a button, you add another one. How would the resulting query work with the new field? Should it use 'and' to concatenate the query or should it use 'or'?
    I suggest that you use the ADF Riche Client Demo (http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx) select the Query node and then select 'af:query'. This shows you what is possible otu of hte box using the af:query component. You can add fields to existing queries in advanced mode (e.g. use system query 5, which starts with an empty panel and allows you to add fields).
    Once you understand how this works you may come back with a more detailed use case description or you have found the solution already. Read the documentation on af:query along with trying otu the component.
    Timo

  • FM to read files starting with TEST(for example) from Unix server

    Hi all,
    Is there a FM to read all the files which start with TEST (for example) from the Unix server?
    Requirement is if we put TEST* in the selection screen for the filename, it should read all the files which start with TEST from the default Unix path.
    Thanks and regards,
    Anishur

    Function Modules
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful.........
    Minal

  • Potential bug in javamail + qmail when email body starts with dots

    I may have discovered a potential issue with using JavaMail + QMail server. It appears that if there is a message in my mailbox which starts with either one dot ('.') or a series of dots ('...hello there'), when I attempt to do a :
    inbox.fetch(messages, profile);
    I get the following JavaMail error:
    javax.mail.MessagingException: error getting size;
    nested exception is:
    java.io.IOException: Unexpected response: .
    at com.sun.mail.pop3.POP3Message.getSize(POP3Message.java:100)
    at com.sun.mail.pop3.POP3Folder.fetch(POP3Folder.java:369)
    This issue seems to only occur on qmail. When I try to read the same email starting with one or multiple leading dots, I can retreive it without any issues.
    Has anyone else experienced anything of the sort?

    Almost certainly it's a QMail bug. Turn on session
    debugging and
    examine the protocol trace to see what the server is
    really saying.
    If you need help interpreting it, send it to us at
    [email protected]
    or post it here.you might be right. here's the output from the javax.mail debug mode. note that it appears that qmail potentially returns the headers as well as an extraneous dot ('.') and that is what causes the whole issue:
    DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
    DEBUG POP3: connecting to host "mail.dynamomail.com", port 110, isSSL false
    S: +OK <[email protected]>
    C: USER [email protected]
    S: +OK
    C: PASS somepassword
    S: +OK
    C: STAT
    S: +OK 4 11729
    C: NOOP
    S: +OK
    C: TOP 1 0
    S: +OK 2917 octets
    Received: (qmail 17849 invoked from network); 6 May 2006 04:21:03 -0000
    Received: from unknown (HELO pre-smtp15-01.prod.mesa1.secureserver.net) ([64.202.166.67])
    (envelope-sender <[email protected]>)
    by smtp15-01.prod.mesa1.secureserver.net (qmail-ldap-1.03) with SMTP
    for <[email protected]>; 6 May 2006 04:21:03 -0000
    Received: (qmail 10294 invoked from network); 6 May 2006 04:21:03 -0000
    Received: from unknown (HELO s.somewhere.org) ([1.2.3.4])
    (envelope-sender <[email protected]>)
    by pre-smtp15-01.prod.mesa1.secureserver.net (qmail-ldap-1.03) with SMTP
    for <[email protected]>; 6 May 2006 04:21:03 -0000
    Received: from localhost.localdomain (localhost [127.0.0.1])
         by someserver (Postfix) with ESMTP id E57DA4394E
         for <[email protected]>; Fri, 5 May 2006 21:21:02 -0700 (PDT)
    Received-SPF: pass (s.somewhere.org: domain of [email protected] designates 1.2.3.4 as permitted sender)
    Received: from wx-out-0102.google.com (wx-out-0102.google.com [1.2.3.4])
         by (Postfix) with ESMTP id B340910E25
         for <[email protected]>; Fri, 5 May 2006 21:21:02 -0700 (PDT)
    Received: by wx-out-0102.google.com with SMTP id s10so699939wxc
    for <[email protected]>; Fri, 05 May 2006 21:21:02 -0700 (PDT)
    DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
    s=beta; d=gmail.com;
    h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
    b=pnrSN/WBJArwYZxG9jk6jkw2VmTIntJnKSIlTFWb1gslSjmavE1Ng+4oAIEooihq8foHxkclsQREVGSlEamC56yMYlYujGSudbbNQDrjcBR0VeNpLXRJ7iJac/8pwqz0vHtD2SaeR1p/8Pfx/PRG9kYPlfvnPYAWTh9xn4X3XCs=
    Received: by 10.70.40.5 with SMTP id n5mr3267300wxn;
    Fri, 05 May 2006 21:21:02 -0700 (PDT)
    Received: by 10.70.49.9 with HTTP; Fri, 5 May 2006 21:21:02 -0700 (PDT)
    Message-ID: <[email protected]>
    Date: Sat, 6 May 2006 00:21:02 -0400
    From: "Sender" <[email protected]>
    To: [email protected]
    Subject: just a test
    MIME-Version: 1.0
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline
    X-Nonspam: None
    C: LIST 1
    S: .
    C: QUIT
    S: +OK 1 2917
    javax.mail.MessagingException: error getting size;
    nested exception is:
         java.io.IOException: Unexpected response: .
         at com.sun.mail.pop3.POP3Message.getSize(POP3Message.java:100)
         at com.sun.mail.pop3.POP3Folder.fetch(POP3Folder.java:369)
         at org.ProcessMailViaPOP.getItems(ProcessMailViaPOP.java:585)
         at java.lang.Thread.run(Unknown Source)
    java.lang.IllegalStateException: Folder is not Open
         at com.sun.mail.pop3.POP3Folder.checkOpen(POP3Folder.java:422)
         at com.sun.mail.pop3.POP3Folder.close(POP3Folder.java:193)
         at org.ProcessMailViaPOP.getItems(ProcessMailViaPOP.java:813)
         at java.lang.Thread.run(Unknown Source)

  • How to select number field starting with 99

    Hi Freinds-
    I have to pick values for a number field  but  i want only those values which starting with 99 
    how i can put code in select query for this ?
    Regards
    Meeta & Ruby

    Hi,
    Use the query as:-
    select
       <field1>
       <field2>
    from <database_table>
    into table <internal_table>
    where
       <field_name> like '99%'.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

Maybe you are looking for

  • Photoshop CS2 crashes on my computer

    Photoshop CS2 crashes on my computer when I am in photoshop and try to open any file.  As soon as I click on ''open file'' or ''open as'', Ps shut itself off. I'm using Windows XP.  I tried uninstalling Ps and installing it again with no results.  I

  • Variable length in substring

    i am trying unsuccessfully to write a udf, as suddenly the fixed length field i was using a substring on has changed to a variable length field... i need to pass the field into a UDF and then pass out the last two characters for one field... and the

  • "MULTIVALUE" in reports

    Post Author: Adrin CA Forum: WebIntelligence Reporting On Web Intelligence report I have encountered this problem. In some queries, if there is more than one value in database for some of the fields of query, the report can't display all values in di

  • Re: Claim Your Adobe Licensing Product Upgrade

    Dear Sir, I received the email from your company about the claim for the Adobe Licensing Product Upgrade. I have log-in to the webpage with the coupon no. and find the coupon is already being deleted. Please help to check if the coupon is deleted or

  • Upload  infotype  with  ZDTT  (HR DATA TRANSFER TOOLBOX)

    Hi, Can  someone  has  documentation  for  ZDTT ? Thanks  in  advance Soufiene