Select condition not work, possible mistake

I have simple select like
String sStatus=req.getParameter("processStatus")==null?"":req.getParameter("processStatus");
I can get the value of
sStatus
but my else is not working, what is the possible mistake?
if(sStatus.equals("#"))
Sql+=" and basicStatus=1 order by family_income asc ";                              
else
Sql+=" and basicStatus=1 and ProcessStatus='"+sStatus+ "' order by family_income asc ";                         
I try sql in db db like and basicStatus=1 and ProcessStatus='"New' order by family_income asc      it work fine, so??
Thank you

Hi jverd,
thank you fot the reply, but before I only nedd to executeQuery my sql once, but, if I use PreparedStatement, then I have to
executeQuery as many as the conditions I have , any way, right now I change my code to
String Sql="SELECT * FROM student2 as s, student_financial_info2 as f where s.student_id=f.student_id ";
                //search for Id, so we don't care about status and how many row in one page
                if (university_ID !=""){                   
                          Sql+=" and s.student_id=? order by family_income asc ";
                          ps = conn.prepareStatement(Sql);
                          ps.setString(1,university_ID );
                          ps.executeUpdate();
                          connectionPool.returnConnection(conn);
                //for group search
                else{
                   if(search.equals("All")){              
                        if(basicStatus.equals("basicStatus"))                     
                             Sql+=" and ProcessStatus=? and basicStatus=? order by family_income asc ";
                                      Sql+=" limit " + currentRow + ",100"; 
                                      ps = conn.prepareStatement(Sql);
                                         ps.setString(1, FStatus);
                                         ps.setInt(2,1);
                                         ps.executeUpdate();
                                         connectionPool.returnConnection(conn);        
                   //for department search
                    else{
                        if(basicStatus.equals("basicStatus")){
                          Sql+=" and faculty =? and ProcessStatus=? and basicStatus=? order by family_income asc";
                          ps = conn.prepareStatement(Sql);
                          ps.setString(1,  search);
                           ps.setString(2, FStatus);
                           ps.setInt(3,1);
                           ps.executeUpdate();
                            connectionPool.returnConnection(conn);}
                        else{
                          Sql+=" and faculty ='"+search+ "' order by family_income asc";
                          ps = conn.prepareStatement(Sql);
                          ps.setString(1,  search);
                          ps.executeUpdate();                 
                            connectionPool.returnConnection(conn);
                }// out elseI get error on String Sql="SELECT * FROM student2 as s, student_financial_info2 as f where s.student_id=f.student_id ";
          //search for Id, so we don't care about status and how many row in one page
          if (university_ID !=""){                   
                    Sql+=" and s.student_id=? order by family_income asc ";
                    ps = conn.prepareStatement(Sql);
                    ps.setString(1,university_ID );
                    ps.executeUpdate();
                    connectionPool.returnConnection(conn);
          //for group search
          else{
          if(search.equals("All")){              
               if(basicStatus.equals("basicStatus"))               
                    Sql+=" and ProcessStatus=? and basicStatus=? order by family_income asc ";
*                    Sql+=" limit " + currentRow + ",100";*
*                    ps = conn.prepareStatement(Sql);*
*                                   ps.setString(1, FStatus);*
*                                   ps.setInt(2,1);*
*                                   ps.executeUpdate();*
*                                   connectionPool.returnConnection(conn);*
          //for department search
          else{
               if(basicStatus.equals("basicStatus")){
          Sql+=" and faculty =? and ProcessStatus=? and basicStatus=? order by family_income asc";
               ps = conn.prepareStatement(Sql);
               ps.setString(1, search);
                    ps.setString(2, FStatus);
                    ps.setInt(3,1);
                    ps.executeUpdate();
                    connectionPool.returnConnection(conn);}
               else{
               Sql+=" and faculty ='"+search+ "' order by family_income asc";
               ps = conn.prepareStatement(Sql);
               ps.setString(1, search);
               ps.executeUpdate();           
                    connectionPool.returnConnection(conn);
          }// out else
I got error on the blod part JDBC error:Parameter index out of range (1 > number of parameters, which is 0).
java.sql.SQLException: Parameter index out of range (1 > number of parameters, w
hich is 0). How com the index is start on 0?
Thank you

Similar Messages

  • OR condition not working correctly in SQL

    I am adding the folling condition to a sql statement and
    AND (status_code IS NULL or status_code <> 'T'
    or (status_code IN ('A','B','C','D') and TRIM(order_type) NOT LIKE '%9999')
    or (status_code IN ('A','B','C','D') and order_type IS NOT NULL)
    or (status_code NOT IN ('A','B','C','D')))
    but the or condition work...
    if i change it too
    AND ( (status_code IN ('A','B','C','D') and order_type IS NOT NULL) )
    then this portion of the OR condition work but when I use the OR condition something weird is happening that the condition not working... and i dont see a record that meets that condition...

    Hi,
    It's not the "trim" that implies "not null", but rather the fact that:
    - "not like" operator works only on non-null values and
    - "not like" operator disregards null values.
    Consider this:
    test@ORA92>
    test@ORA92>
    test@ORA92> l
      1  with x as (
      2    select null as y from dual union all
      3    select 'a9999' from dual union all
      4    select 'bxx' from dual
      5  )
      6  select * from x
      7* where y not like '%9999'
    test@ORA92>
    test@ORA92> /
    Y
    bxx
    1 row selected.
    test@ORA92>
    test@ORA92>Here, trim function was not used, but still the first row (that had null for y) was not returned. That's because Oracle disregarded the first row for comparison and out of the next two rows, it returned the third row because it satisfied the condition.
    As for your query, do the following conditions hold true:
    1. if status_code is null      - show the row regardless of order_type
    2. if status_code <> 'T'       - show the row regardless of order_type
    3. if status_code in (a,b,c,d) and order_type is not null and order_type ends with something other than 9999 - show the row
    4. if status_code in (a,b,c,d) and order_type is null                           - do not show the row
    5. if status_code in (a,b,c,d) and order_type is not null and it ends with 9999 - do not show the row
    6. if status_code is anything other than (a,b,c,d)                              - do not show the rowpratz

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • Data Services- The job server you selected is not working

    Long Text:
    After logging in to the Data Services designer,when try to run a job it shows error -The job server you selected is not working
    Latest Software version -BODS 4.0 SP2
    Reproduce Steps:
    1. Double click on the Project from repository, it will display the project in Project area.
    2. After that it will display all the jobs under the project.
    3.Right click on the job and try to execute, then it will display the "Execution Properties" windows.
    Here the we can the default Job Server has been selected.
    4. Try to click ok to execute the job and then we get the error-"The job server you selected is not working"

    Hi
    Please contact your Data services administrator to check on the server why the job server is not working.
    There might be several issues like connectivity with the repository, access details , mapping in the management console etc.
    And let us know the exact issue.
    Regards
    Puneet

  • Cascading Select Lists - Not Working for me

    I am trying to implement Denes Kubicek's Ajax Cascading Select List solution.
    http://apex.oracle.com/pls/otn/f?p=31517:119
    But it is not working for me.
    I'm a newbie to APEX and checked the forum for advice on cascading select lists. I saw the thread for
    "Cascading Select Lists - Not Working" posted by sue and the replies by Varad Acharya, but I'm still
    having issues of not seeing the alerts, not able to run the pl/sql process in SQL Workshop, and not
    getting the expected results.
    I have a list of countries (US - USA, CA - CANADA, etc.) and a list of states for each country. When a
    user selects a country I would like to show the list of states within that country.
    This is what I've done so far:
    Defined an application process:
    Process Point: On Demand: Run ... by a page process.
    Name: CASCADING_SELECT_LIST1
    Process Text:
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    HTP.prn ('<option value="' || 99 || '">' || '- All States -'
    || '</option>'
    FOR c IN (SELECT state_code || ' - ' || state_desc d, state_code r
    FROM tbk_state
    WHERE country_code = :cascading_selectlist_item_1)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' || c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;
    defined and application item:
    Name: CASCADING_SELECTLIST_ITEM_1
    Build Option: - No Build Option -
    Created a 'Form on a table with report' as follows:
    Page 5: Report on TBK_HARDWARE_LOCATION
    Page 6: Form on TBK_HARDWARE_LOCATION
    in HTML Header of the page attributes for 'Form on TBK_HARDWARE_LOCATION' I have:
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    </script>
    <script>
    function get_select_list_xml1(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    alert ('Dept no=' + pThis.value);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
    get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    // gReturn = get.get();
    alert('Enames=' + gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    On Page 6: 'Form on TBK_HARDWARE_LOCATION' I have the following items (plus some others):
    Name: P6_COUNTRY_CODE
    Display as: Select List
    HTML Form Element Attributes: onchange="get_select_list_xml1(this,'P6_STATE_CODE');"
    Source Used: Only when current value in session state is null
    Source Type: Database Column
    maintain session state: Per session
    Source value or expression: COUNTRY_CODE
    Named LOV: LIST OF COUNTRIES
    Name: P6_STATE_CODE
    Display as: Select List
    Source Used: Only when current value in session state is null
    Source Type: Database Column
    maintain session state: Per session
    Source value or expression: STATE_CODE
    Named LOV: - Select named LOV -
    List of Values definition:
         select state_code || ' - ' || state_desc d, state_code r
         from tbk_state
         where country_code = :P6_COUNTRY_CODE
         order by 1
    LIST OF COUNTRIES is defined as:
    select country_code || ' - ' || country_desc d, country_code r
    from tbk_country
    order by 1
    Now to the problem:
    I run page 5 (the report) to see the list of locations and then I try to edit a record (page 6). When I
    try to select a different country I get the following error (on IE):
    "Problems with this web page might prevent it from being displayed properly or functioning properly.
    In the future, you can display this message by double-clicking the warning icon displayed in the status
    bar.
    Line: 17
    Char: 5
    Error: Object expected
    Code: 0
    URL: http//cmrac4.cm.timeinc.com:7777/pls/htmldb/f?
    p=114:6:1413254636072443110::::P6_HARDWARE_LOCATION_ID:2
    I don't see any of the alert messages.
    I also tried to run the application process code in the SQL - Command Processor (I replaced
    :cascading_selectlist_item_1 with 'CA' or 'US') and got the following:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
    button, or try again later.
    Only one top level element is allowed in an XML document. Error processing resource
    'http://cmrac4.cm.timeinc.com:7777/pls/...
    <select><option value="99">- All States -</option><option value="X1">X1 - X1</option><optio...
    Can someone help me please?

    Varad,
    First, thank you for taking the time to try to help me with this problem.
    When I view the page's source code (here are the first few lines):
    <html lang="en-us">
    <head>
    <script src="/i/javascript/core.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/i/css/core.css" type="text/css" />
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='Would you like to perform this delete action?';
    //-->
    </script>
    <script>
    function get_select_list_xml1(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    //alert ('Dept no=' + pThis.value);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
    get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    // gReturn = get.get();
    //alert('Enames=' + gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue);
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    It looks like line 17 is:
    var l_Select = html_GetElement(pSelect);
    I'm still not sure why I'm getting this error and why it's not working?
    Thanks,
    Eti

  • XMLP 5.6.2 - Parameters -  Both Multi-Select and All-Select  Do Not Work

    Both Multi-Select and All-Select Do Not Work.
    What's up with this behavior?
    And when might it be fixed?
    BG...

    The Multi-Select is now working, not sure what I did wrong earlier. However the "Can select all" option when building the parameter does not work as advertised, though I was able to get around that as well.
    Create a Data Model
    select LAST_NAME, FIRST_NAME from SOME_TABLE where SOME_COLUMN =:SOME_VALUE
    OR
    select LAST_NAME, FIRST_NAME from SOME_TABLE where SOME_COLUMN in (:SOME_VALUE)
    Create a LOV
    Name = LOV_SOME_COLUMN
    Type = SQL Query
    select distinct SOME_TABLE.SOME_COLUMN as SOME_COLUMN from SCHEMA.TABLE
    Create a Parameter
    Identifier = PARM_SOME_COLUMN
    Data Type = String
    Default Value = NULL
    Parameter Type = Menu
    Display Label = LOV_SOME_COLUMN
    List Of Value = LOV_SOME_COLUMN
    Option
    Multiple Selection - Checked
    Can select all - Checked
    Refresh other parameters on change - Checked
    Then test your report. Select "All" from the LOV and click view. Result - No Rows Returned.
    Selecting a "Single" or "Multiple Values" values from the LOV does work.
    The way I am getting around the problem is to uncheck the "Can select all" and then manually select all the values in the LOV in order to get the "All".
    BG...

  • I have F.F 3.6 and windows 7.: 1) When i want to buy a airplane ticket and want to select 2 adults or 2 children, the draw down select, does not work in any websides,? WHY?. 2) Have FF any problems with SKYPE

    I have F.F 3.6 and windows 7.: 1) When i want to buy a airplane ticket and want to select 2 adults or 2 children, the draw down select, does not work in any websides,? WHY?. 2) Have FF any problems with SKYPE
    == This happened ==
    Not sure how often
    == After innstalling windows 7

    As a suggestion I'd put the Text_io segments into their own begin - exception - end sub-blocks within the main code. This way if Text_io does raise an exception you can catch it earlier as it may be able to recover - That is if it is a text_io exception.
    Other than that you;ll have to step through in Debug.

  • SELECT * CONNECTION not work

    Hi,
    It is found that SELECT * does not work with CONNECTION. For example, I use the following statement to retrieve data from another system and an error states that SQL error 207 when accessing table 'MARA'. 'Invalid column name  'ANIMAL_ORIGIN''. If columns are specified, data can then be retrieved. The SAP BASIS version is 7.31.
    SELECT SINGLE *
          INTO CORRESPONDING FIELDS OF ls_mara
        FROM MARA
                   CLIENT SPECIFIED
                   CONNECTION ('G01')
    WHERE MANDT = '100'.

    Hi TS,
    You gave the answer already, but look at the HELP:
    To allow the Open SQL command to be run for the secondary database connection, the table definitions in the connection must be the same as those in the standard database.
    Cheers,
    Custodio

  • Routine in DTP. Selection conditions not visible

    Hello,
    I am under BW7.0
    I am filtering data with a routine in a DTP. The routine is reading a custom table that user maintain. It contains a date range.
    This works, the correct data is selected.
    My problem is that in the request the 'Selection Conditions' field is empty and consequently, I cannot delete in the cube the same selections.
    This was working under BW3.5..
    Many Thanks,
    Alex-

    Hello,
    Here is the code. It is working as I expect. And debugging gives me the correct start and end date. But this is not reflected in the request 'Selection conditions'.
    TYPES:
    BEGIN OF BCSZP_TYPE,
    JJJJPER TYPE ZCBCSZP-ZEITPUNKT,
    RELEV   TYPE ZCBCSZP-RELEVANT,
    END OF BCSZP_TYPE.
    DATA: BCSZP_TAB TYPE STANDARD TABLE OF BCSZP_TYPE,
          BCSZP_WA TYPE BCSZP_TYPE,
          start_date type sy-datum,
          end_date type sy-datum.
      SELECT ZEITPUNKT
             RELEVANT
        FROM ZCBCSZP
        INTO TABLE BCSZP_TAB
       WHERE ZEITPUNKT <> ''.
      READ TABLE BCSZP_TAB INTO BCSZP_WA
      WITH KEY RELEV = 'X'.
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          I_GJAHR        = BCSZP_WA-JJJJPER(4)
          I_PERIV        = 'K6'
          I_POPER        = BCSZP_WA-JJJJPER+4(3)
        IMPORTING
          E_DATE         = start_date
        EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          I_GJAHR        = BCSZP_WA-JJJJPER(4)
          I_PERIV        = 'K6'
          I_POPER        = BCSZP_WA-JJJJPER+4(3)
        IMPORTING
          E_DATE         = end_date
        EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.
      read table l_t_range with key
           fieldname = 'FKDAT'.
      l_idx = sy-tabix.
      l_t_range-sign = 'I'.
      l_t_range-option = 'BT'.
      l_t_range-low = start_date.
      l_t_range-high = end_date.
      if l_idx <> 0.
        modify l_t_range index l_idx.
      else.
        append l_t_range.
      endif.
      p_subrc = 0.

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

  • "If"  condition not working

    Hi all,
    Here i want to put condition like when BELRT field of BKPF table get 'RE' type data this time condition is fire and program will termineted. for this i put code like below.
    SELECT * FROM BKPF INTO TABLE IT_BKPF WHERE BELNR IN P_DOCNO          " DOCUMENT NO.
                                            AND   GJAHR IN P_FYEAR.         " FISCAL YEAR.
        if it_bkpf-blart = 'RE'.
          MESSAGE 'Please Enter Correct Doc.No and Financial Year' TYPE 'I'.
          SUBMIT ZFI_MM_DEBIT_VENDOR1 VIA SELECTION-SCREEN AND RETURN.
          LEAVE PROGRAM.
        endif.
    But it will not working. So please help me out..
    Thanks in Advance.
    keyur chauhan
    Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:28 PM

    please correct you code
    SELECT * FROM BKPF
    INTO TABLE IT_BKPF
    WHERE BELNR IN P_DOCNO    and                  " DOCUMENT NO.
               GJAHR IN P_FYEAR    and               " FISCAL YEAR.
                blart  ='RE'.
    if sy-subrc = 0.
    "  do what ever you want here further processsing
    else.
       message 'No Data Found' type 'I'.
       LEAVE-LIST PROCESSING.
    ENDIF.
    ( or )
    SELECT * FROM BKPF
    INTO TABLE IT_BKPF
    WHERE BELNR IN P_DOCNO    and                  " DOCUMENT NO.
               GJAHR IN P_FYEAR .                            " FISCAL YEAR
    if sy-subrc = 0.
       loop at it_bkpf in wa_bkpf.
          if wa_bkpf-blart = 'RE'.
              "  Do you logic what you want
         else.
       "   here you can do many things
         "     a) use CONTINUE statment to move to next loop pass
           "   b) you can raise an  message
         endif.
    Let me know if you need further information
    Regards
    Satish Boguda

  • Oracle equals_path condition NOT working with table and materialized view

    The user i am using is xdb with dba role.
    1.When i try to use the statement
    SELECT PATH FROM xdb.path_VIEW
    WHERE
    EQUALS_PATH(res, '/home/OE/PurchaseOrders/2002')=1
    the result is
    /home/OE/PurchaseOrders/2002
    2. When i drop the path_view and recreated it like materialized view with statement
    create MATERIALIZED view path_view as
    select /*+ ORDERED */ t2.path path, t.res res,
    xmltype.createxml(xdb.xdb_link_type(NULL, r2.xmldata.dispname, t.name,
    h.name, h.flags, h.parent_oid, h.child_oid),
    'http://xmlns.oracle.com/xdb/XDBStandard.xsd', 'LINK') link,
    t.resid
    from ( select xdb.all_path(9999) paths, value(p) res, p.sys_nc_oid$ resid,
    p.xmldata.dispname name
    from xdb.xdb$resource p
    where xdb.under_path(value(p), '/', 9999)=1 ) t,
    TABLE( cast (t.paths as xdb.path_array) ) t2,
    xdb.xdb$h_link h, xdb.xdb$resource r2
    where t2.parent_oid = h.parent_oid and t2.childname = h.name and
    t2.parent_oid = r2.sys_nc_oid$
    then the equals_path condition STOP working !!!
    3. The same experiment, but i recreate it like table
    create table path_view as .... using the rest of the statement ...
    Can someone help me to understand why equals_path is NOT working on table and materialized view !

    Thanks Jonah. I was under the impression that I already had it but seems like it has to be a direct priv - thru a role doesn't work.
    I granted the reqd privs and then it worked fine. Thx for your help!

  • Date Condition Not Working ,Value not cming in to item.

    Hi Friends,
    i have create a form for palce order and i have create a MASTER table for fixed item Rate between two date with price code like A,B,C,D .
    In Form i have for Item
    :P1_ORDER_DATE
    :P1_ITEM_CODE
    :P1_PRICE_CATEGORY Select List With Submit
    :P1_ITEM_RATE
    In Item rate i have put in Source ,
    Source Type --SQL Quary
    Source Vale
    select RATE_1 from SAM_ITEM_MAS where ITEM_CODE =:P1_ITEM_CODE and  PRICE_CATEGORY=:P1_PRICE_CATEGORY and :P1_ORDER_DATE
    between FROM_DATE and TO_DATEMy Table
    CREATE TABLE  "SAM_ITEM_MAS"
       (     "ID" NUMBER NOT NULL ENABLE,
         "ITEM_CODE" NUMBER,
         "PRICE_CATEGORY" VARCHAR2(5),
         "FROM_DATE" DATE,
         "TO_DATE" DATE,
         "RATE_1" NUMBER,
         CONSTRAINT "SAM_ITEM_MAS_PK" PRIMARY KEY ("ID") ENABLE
    /that code's not working but if i run this code in to SQL Command Then it's work fine.but not in to ITEM :P1_ITEM_RATE .
    i want when i select P1_PRICE_CATEGORY Like A,B,C,D then Respective Rate from Table SAM_ITEM_MAS should come in to item :P1_ITEM_RATE .
    Oredr date condition is not working.
    Thanks
    Edited by: 805629 on Dec 28, 2010 11:32 PM

    Hi,
    Have you tried casting the item values as dates using TO_DATE():
    select RATE_1
    from SAM_ITEM_MAS
    where ITEM_CODE =:P1_ITEM_CODE
    and  PRICE_CATEGORY=:P1_PRICE_CATEGORY
    and TO_DATE(:P1_ORDER_DATE,'DD/MM/YYYY') between "FROM_DATE" AND "TO_DATE"(change the date format string to match the format of the P1_ORDER_DATE page item)
    You should probably change the name of the field to something other than TO_DATE as this is an Oracle function name - try DATE_FROM and DATE_TO or START_DATE and END_DATE or something like that. Otherwise you may have to use the double-quotes as I have shown above
    Andy

  • Toggle zoom to fit selection key not working

    I am using the default key command "z" for "Toggle zoom to fit selection or all contents" which works to zoom in but does not toggle back out when hitting "z" again. Does anyone else have this problem or a possible solution to get the key command to toggle instead of just zoom in?

    I've tried using a different UNUSED key comb and it's still not working. Also tried unlearning toggle track zoom and same problem. Must be something else.

  • SELECT does not work in View

    I have a select that runs well alone, but when i want to create a view with this select, i get the error "ORA-00933: SQL command not properly ended".
    The select is of form
    select
    col1 as "one",
    null as "two",
    UNIONALL
    select
    abc as "one",
    def as "two",
    order by "one", "two"
    the select alone works as expected. i also enclosed the select in "select * from ( ... )" and moved the order by outside. but it still has this error.
    if i leave out the order by, the view creation works. but why? the select itself also works with the order by ...?

    1) In Oracle 8 you could not use NULL as a column. You have to put to_char(null) or to_number(null). But in 9i you can use null without translation function. Also you can use ORDER BY, in 9i, in a view.
    I did all what you said, on my 9i database, and it worked properly. So, I do not "obtain" that error.
    2) Try to create the view without using double quote for aliases, even though it is correct what you've done.
    3) Maybe is a stupid advice, but I dare:
    Are you sure you haven't a comma(or something like this) before the order by clause. The explanation for this message error, in Oracle 8, is:
    "ORA-00933: SQL command not properly ended
    Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement.ORDER BY cannot be used to create an ordered view or to insert in
    a certain order. Also, an improper SQL ending occurs if IN clause is used with only one argument (IN(X), for example). An IN clause must have two or more
    arguments.
    Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the rows of a view, do so when querying the view and not
    when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for indented lines and delete these spaces."
    4) You can try to report bugs on metalink at the patches section.
    Eugen

Maybe you are looking for

  • Text Object Error in Adobe forms

    Hello Friends, I am trying to include a text object in Adobe PDF-based print form. In the context, I have created a node for the text. I chose the Text Type as “Include Text”. I am able to choose the required Text Object and Text ID from the respecti

  • File Content Conversion ( avoid fields in conversion)

    Hi all                     An IDoc to File scenario , I am doing file content conversion in receiver File adapter. my message type for file  2 HEADER each having its own substructure Like    1header                    fieldA                         

  • Trouble Playing A loaded 'SWF' file in the pain timeline

    Hey there. I have created a presentation that loads interactive SWF movies into a 'target' movie clip on the main timeline. As you progress through the presentation different SWF movies are loaded into the presentation. And this in turn allows me to

  • Win7 64-bit Forms 11.1.2.0 and JDeveloper 11.1.1.6 use same weblogic server

    Trying to make JDev 11.1.1.6 and Forms 11.1.2.0 use same weblogic server on Win 7 64-bit. Installed JDeveloper 11.1.1.6 studio generic. This installs a 32-bit JDK and weblogic 10.3.5. (Oracle, Why doesnt forms installer install weblogic like JDev doe

  • IPad 1 not upgrading to iOS 6

    Why isn't the original iPad not being updated to ios 6