Execute a Select in the if conditon

DECLARE
  vcount NUMBER;
BEGIN
  SELECT COUNT(*) INTO vcount FROM EMP WHERE EMPNO=7788;
  IF (vcount >=1) THEN
    DBMS_OUTPUT.PUT_LINE('emp exists');
  ELSE
    DBMS_OUTPUT.PUT_LINE('emp not exists');
  END IF;
END;The above code is working but the below one is not working. Can we execute a select stmt in the if conditon to check on the fly...?
DECLARE
BEGIN
  IF ((SELECT COUNT(*) FROM EMP WHERE EMPNO=7788) >=1)
  THEN
    DBMS_OUTPUT.PUT_LINE('emp exists');
  ELSE
    DBMS_OUTPUT.PUT_LINE('emp not exists');
  END IF;
END;Thanks

Just for your program,
you may even go with this instead of pl/sql.. (not sure about your original code though)
SELECT DECODE (COUNT (*), 0, 'Sorry no emp with that id', 'emp exists')
          chk_emp
  FROM emp
WHERE id = 1000;Cheers,
Manik.

Similar Messages

  • Why does SQL execute inner selected functions again in the outer select?

    Hi,
    Why does SQL execute inner selected functions again in the outer select?
    Given:
    CREATE OR REPLACE FUNCTION K_TEST
    RETURN NUMBER IS
    BEGIN
    RETURN 1;
    END;
    SELECT K_TEST, K_TEST FROM DUAL;Will (logically) execute the function twice.
    SELECT intest, intest
    FROM (SELECT K_TEST intest FROM DUAL);Will execute the function twice too!
    Why can't SQL buffer the inner result?
    Does anyone have an idea on how to achieve executing the function only once? My original called function is quite heavy and returning a user defined type. Adding predicates, the function is executed 3 or 4 times!
    Thanks for any tips,
    K.

    Hello
    Depending on your version of Oracle, Sub query caching could help....
    XXXX> create sequence seq_1
      2  /
    Sequence created.
    Elapsed: 00:00:00.07
    XXXX> CREATE OR REPLACE FUNCTION K_TEST
      2  RETURN NUMBER IS
      3
      4      ln_Ret  NUMBER;
      5
      6  BEGIN
      7      SELECT
      8          seq_1.NEXTVAL
      9      INTO
    10          ln_Ret
    11      FROM
    12          dual;
    13
    14      RETURN ln_Ret;
    15  END;
    16  /
    Function created.
    Elapsed: 00:00:00.60
    XXXX>
    XXXX> SELECT K_TEST, K_TEST FROM DUAL;
        K_TEST     K_TEST
             1          2
    1 row selected.
    Elapsed: 00:00:00.06
    XXXX> SELECT K_TEST, K_TEST FROM DUAL;
        K_TEST     K_TEST
             3          4
    1 row selected.
    Elapsed: 00:00:00.01
    XXXX> SELECT intest, intest
      2  FROM (SELECT K_TEST intest FROM DUAL);
        INTEST     INTEST
             5          6
    1 row selected.
    Elapsed: 00:00:00.10
    XXXX> SELECT
      2      intest,intest
      3  FROM
      4      (
      5          SELECT (SELECT K_TEST FROM dual) intest
      6          FROM
      7          dual
      8
      9      )
    10  /
        INTEST     INTEST
             7          7
    1 row selected.
    Elapsed: 00:00:00.03
    XXXX> /
        INTEST     INTEST
             8          8
    1 row selected.
    Elapsed: 00:00:00.01THis last example takes advantage of a specific optimisation for calling functions in a subquery. Not sure if it would suit your circumstance though...
    Alternatively - again depending on your version - you might be able to look at function result caching...
    HTH
    David
    Edited by: Bravid on Feb 1, 2012 12:32 PM

  • Default hierarchy not getting selected in the GOTO report.

    Hi friends,
                 I am facing a weird problem in a jump query(GoTo query). I am giving an input for the main query. The input values are week and Organization(it is a hierarchy). I am executing the report and after that i am going into the jump query through the main query.
    In the GoTo Query, when i right click on the Organization -> properties -> Chacteristics -> i could find that the hierarchy is not getting selected by default. I need to go and select from the dropdown manually.
    If i execute the same GOTO report directly without going through main query, I am able to see the default hierarchy. I would like to see the same in my first case as well(i.e when i run the query through the Main Query).
    Can somebody help me in achieving this.
    Thank you
    Sunil

    @ is a default value as per ALV internal process. This is used in icons .
    I think this is causing the confusion.
    Check in the fieldcat if there is any adjsutment to be made to handle this.
    Br,
    Vijay

  • Values from a Multi-Select in the where clause of a Select statement

    I have a web page that solicits query parameters from the user.
    The selections that the user makes will populate the WHERE clause of a Select statement.
    One of the controls on the page is a multi-select control.
    When this page posts, I would like to execute a Select statement wherein the selected values from this control appear in the .. Column IN ( <list here> ) portion of the WHERE clause.
    This is an extremely common scenario, but I cannot seem to locate a how-to or message thread that addresses this specific case.
    I have an idea that it may involve dynamic SQL or Execute Immediate, but cannot seem to pin down the answer.
    Any help would be greatly appreciated!

    anonymous - As illustrated here: Re: Search on a typed in list of values
    Scott

  • How to execute a SELECT statement  in java??

    Hello !!
    In my java program , i need to delete a record of number X, so
    i accept the number X from the keyboard
    Then before deleting it
    i want the program to show me the name, age of the record which has the number X
    How to do this

    hello kylas
    actually i didnt get why this program example?? wats
    its executing ??? Look at reply #3 in your other thread:
    http://forum.java.sun.com/thread.jspa?threadID=713289&messageID=4126346
    Notice the similarity? You've now asked "How to delete a record in Java" and "how to execute a select statement in java". You may have noticed that, aside from the SQL and the call to execute and executeUpdate (for delete) it's the same code. This is because you don't so much do these things in Java, you do them in SQL. The Java code simply asks the Driver to execute whatever SQL you write. So, I really hope your next post isn't "how do I execute an UPDATE statement in Java".
    Good Luck
    Lee

  • Executing Multiple Select Queries in a Single attempt

    HI,
    I executed two select queries in a single statement execute. It is executing without any error. Hence there must be two resultset objects within that single statement.
    What the problem is that I m able to fetch the first resultset and its data, But I execute stmt.getMoreResults() to move to the next resultset, it returns false, which means there is no more results. I want to know what is the problem ?? (Record exist in the database for both queries)
    And How can I rertieve both the resultsets. ??
    Plz help me asap.
    For ur convenience I m posting the Java code also which I m trying.
    sql.delete(0, sql.length());
    sql.append("select FIRST_NAME , MIDDLE_NAME , LAST_NAME from USER_MASTER where USER_ID=4;");
    sql.append("select producttransaction_id, product_type from product_transaction where transaction_id=102 order by product_type desc");
    Statement stmt = con.createStatement();
    stmt.execute(sql.toString());
    int resultsetcount =1;
    ArrayList arrlist = new ArrayList();
    rs = stmt.getResultSet();
    if(rs !=null)
    if(rs.next())
    .........// logic here working properly
    //Now when I move to next resultset using the below statement
    //it returns false indicating that there r no more results.
    // Why this is so ?????
    boolean moreresultsets = stmt.getMoreResults();
    System.out.println("MoreResultsets::"+moreresultsets);
    if(moreresultsets)
    rs = stmt.getResultSet();          
    if(rs!=null)
    while(rs.next())
    //...Logic.......
         rs.close();
    Thanks

    I've never seen this used the way you are using it. In my experience the only way to do this would be to execute a single SQL statement that returns multiple result sets - you are trying to append two SQL statements.
    You could define an in-line procedure wrapping your two select statements, or you could define a stored procedure to do the same thing. Then (either way) use CallableStatement to execute the call to the procedure.

  • How to execute a select query stored in variable

    Hello  helpers ,
    I have some "select queries" stored in the database . Now I can derive this query in some variable . How do I execute this query from the variable .
    example :
    Data Query type char50 .
    QueryVar = 'Select MATNR from MBEW where BWKEY = '0001' . '
    How do I execute this Query stoored in variable QueryVar in ABAP program ?
    Thanks a lot for helping .
    Regards
    Shashank

    Shashank,
    It is also possible to use (column_syntax) and (dbtab_syntax) together with (cond_syntax) when using SELECT statements in ABAP. For more info on (column_syntax) and (dbtab_syntax) just have a quick look at ABAP Keyword documention on SELECT statement (hit F1 on SELECT then scroll down to Select->Select result->Select Columns....)
    So in your case, you need to separate out (split) the value in 'wa_itab-query' into other variables or append into separate internal tables using common keys etc. - then looping at those tables with the common key (READ TABLE WITH KEY....) use the following syntax at the time of triggering the SELECT query:
    SELECT (column_syntax)
           FROM (dbtab_syntax)
           WHERE (cond_syntax).
    Also worth a look at this example below:
    PARAMETERS: p_cityfr TYPE spfli-cityfrom,
                p_cityto TYPE spfli-cityto.
    DATA: BEGIN OF wa,
             fldate TYPE sflight-fldate,
             carrname TYPE scarr-carrname,
             connid   TYPE spfli-connid,
           END OF wa.
    DATA itab LIKE SORTED TABLE OF wa
                   WITH UNIQUE KEY fldate carrname connid.
    DATA: column_syntax TYPE string,
          dbtab_syntax TYPE string.
    column_syntax = `c~carrname p~connid f~fldate`.
    dbtab_syntax = `( ( scarr AS c `
      & ` INNER JOIN spfli AS p ON p~carrid  = c~carrid`
      & ` AND p~cityfrom = p_cityfr`
      & ` AND p~cityto   = p_cityto )`
      & ` INNER JOIN sflight AS f ON f~carrid = p~carrid `
      & ` AND f~connid = p~connid )`.
    SELECT (column_syntax)
           FROM (dbtab_syntax)
           INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT itab INTO wa.
      WRITE: / wa-fldate, wa-carrname, wa-connid.
    ENDLOOP.
    Hope this helps.
    Cheers,
    Sougata.

  • Execute A select statement under Oracle connection?

    Hi,
    How can i execute a select statement
    under an existing Oracle connecton without
    defining extera JDBC connection.

    Be aware that you can create View Objects that are NOT based on entity objects. In this case, they are read only, but if you just want to display results, or check for a specific value, it at least reduces the overhead of an EO.
    I'm not sure that answers the question here, but thought I would at least throw it out there.
    In the View Object wizard, on the page that asks you to choose an EO, just click Next without selecting any EOs. This will automatically put you in expert query mode. Just type in your query and go.
    You do have to be a little careful with expert mode queries, especially if you go back and edit them later. You need to make sure to keep the attribute mapping in synch on the Attribute page.
    Also, I have found some limitations to this approach, which I'm not sure are fixed in 3.2. Namely, you can't use setWhereClause() to set the entire where clause string from the client. You have to use setWhereClauseParams(). This means that you have to have the basic where clause included in the query and user parameters as placeholders for the where clause values. These are JSP methods, I'm not sure what the equivalent is in DAC, but I am pretty sure the same limitation is there.

  • Execute CALL TRANSACTION in the background....

    Hi,
    I want to use CALL TRANSACTION in a report program and execute this report in the background.
    There is not GUI_UPLOAD / GUI_DOWNLOAD used anywhere.
    Can someone suggest me what precaution I need to take in my code for CALL TRANSACTION?
    Is there any additional code for background processing?
    Thanks.

    hi,
    this is the sample code:
    Precations need to take :
    1. see that u r transfer tha data in correct field, on correct screen, and of correct format.
    2. capture the error logs in bdcmsgcoll - error logs have to be handle.
    3. ensure correct recording.
    in selection screen you can mention in which mode u want :
    A     Display all screens
    E     Display errors
    N     Background processing
    P     Background processing; debugging possible
    This is the sample code:
    & Report  ZKO01_BDC                                                       &
    & Object Id       :                                                       &
    & Object Name     : ZKO01_BDC                                             &
    & Program Name    : ZKO01_BDC                                             &
    & Transaction Code: ZKO01_BDC                                             &
    & Module Name     : FI / CO                                               &
    & Program Type    : BDC Program      Create Date     : 23.06.2008         &
    & SAP Release     : 6.0              Transport No    :                    &
    & Description     : BDC to upload internal order with indernal assignment &
    & Version         : 1.0.                                                  &
    & Changed on      :                                                       &
    report zko01_bdc
           no standard page heading line-size 255.
    types: begin of record,
            auart_001(004),
            ktext_002(040),
            bukrs_003(004),
            werks_004(004),      " ADDED NEW - RAHUL SHINDE
            scope_005(010),
            prctr_006(004),      " ADDED NEW - RAHUL SHINDE
            waers_007(005),
            astkz_008(001),
            plint_009(001),
          end of record.
    types: begin of ty_stats,
           mess(72) type c,
           auart_001(004),
           text(18) type c,
           end of ty_stats.
    data : it_record type table of record,
            wa_record like line of it_record.
    data: bdcdata type table of bdcdata,
          mestab type table of bdcmsgcoll.
    data : stats type table of ty_stats.
    data: opt type ctu_params.
    data: m(72) type c.
    data : fl_name type string.
    data :  wa_bdcdata like line of bdcdata,
            wa_mestab like line of mestab.
    data :  wa_stats like line of stats.
    data:   ctumode like ctu_params-dismode.
    data:   cupdate like ctu_params-updmode.
    data: file type  rlgrap-filename.
    data: xcel type table of alsmex_tabline with header line.
    data: mod1(1) type c.
    initialization.
    opt-dismode = 'A'.
    opt-updmode = 'S'.
    opt-nobinpt = 'X'.   "No batch input mode
                        Selection Screen
    selection-screen begin of block bk1 with frame.
    selection-screen skip 1.
    parameters p_file type localfile. " default 'D:\Common\PWC\Asset BDC\Book2.xls'.
    parameters p_mode like ctu_params-dismode obligatory.
    selection-screen skip 1.
    selection-screen end of block bk1.
    file = p_file.
    mod1 = p_mode.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
                        Selection Screen
    start-of-selection.
    file = p_file.
    ctumode = mod1.
    cupdate = 'L'.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = file
                i_begin_col             = '1'
                i_begin_row             = '1'
                i_end_col               = '100'
                i_end_row               = '5000'
           tables
                intern                  = xcel
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
    loop at xcel.
      case xcel-col.
        when '0001'.
            wa_record-auart_001 = xcel-value.      "ok
        when '0002'.
            wa_record-ktext_002 = xcel-value.      "ok
        when '0003'.
            wa_record-bukrs_003 = xcel-value.      "ok
        when '0004'.
            wa_record-werks_004 = xcel-value.      "ok
        when '0005'.
            wa_record-scope_005 = xcel-value.      "ok
       when '0005'.
           wa_record-KTEXT_005 = xcel-value.    "ok
        when '0006'.
            wa_record-prctr_006 = xcel-value.      "ok
        when '0007'.
            wa_record-waers_007 = xcel-value.      "ok
        when '0008'.
            wa_record-astkz_008 = xcel-value.      "ok
        when '0009'.
            wa_record-plint_009 = xcel-value.      "ok
      endcase.
      at end of row.
        append wa_record to it_record.
        clear wa_record.
      endat.
    endloop.
    loop at it_record into wa_record.
    perform bdc_dynpro      using 'SAPMKAUF' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'COAS-AUART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'COAS-AUART'
                                  wa_record-auart_001.
    perform bdc_dynpro      using 'SAPMKAUF' '0600'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BUT2'.
    perform bdc_field       using 'COAS-KTEXT'
                                  wa_record-ktext_002.
    perform bdc_field       using 'BDC_CURSOR'
                                  'COAS-SCOPE'.
    perform bdc_field       using 'COAS-BUKRS'
                                  wa_record-bukrs_003.
    perform bdc_field       using 'COAS-WERKS'
                                  wa_record-werks_004.
    perform bdc_field       using 'COAS-SCOPE'
                                  wa_record-scope_005.
    perform bdc_field       using 'COAS-PRCTR'
                                  wa_record-prctr_006.
    perform bdc_dynpro      using 'SAPMKAUF' '0600'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    *perform bdc_field       using 'COAS-KTEXT'
                                 wa_record-KTEXT_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'COAS-PLINT'.
    perform bdc_field       using 'COAS-WAERS'
                                  wa_record-waers_007.
    perform bdc_field       using 'COAS-ASTKZ'
                                  wa_record-astkz_008.
    perform bdc_field       using 'COAS-PLINT'
                                  wa_record-plint_009.
    call transaction 'KO01' using bdcdata
                            options from opt
                            messages into mestab.
    *PERFORM loggs.
    clear wa_record.
    refresh bdcdata.
    endloop.
    end-of-selection.
    clear : wa_stats.
    if stats is initial.
        write :/ text-001.
    else.
      loop at stats into wa_stats.                         "displays runtime messages
        write:/ 'MESSAGE  :',wa_stats-auart_001.
        if wa_stats-auart_001 is not initial.
        write:/ wa_stats-auart_001,  wa_stats-text.
        endif.
        skip 1.
      endloop.
    endif.
    *&  FORMS BDC_DYNPRO
    form bdc_dynpro using program dynpro.
      clear wa_bdcdata.
      wa_bdcdata-program  = program.
      wa_bdcdata-dynpro   = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      append wa_bdcdata to bdcdata..
    endform.
      FORM BDC_FIELD                                                 *
    form bdc_field using fnam fval.
        clear wa_bdcdata.
        wa_bdcdata-fnam = fnam.
        wa_bdcdata-fval = fval.
        append wa_bdcdata to bdcdata..
    endform.
    *&      Form  loggs
          text
    -->  p1        text
    <--  p2        text
    form loggs .
    loop at mestab into wa_mestab.
        if wa_mestab-msgtyp = 'E'.
          call function 'FORMAT_MESSAGE'
            exporting
              id        = wa_mestab-msgid
              lang      = 'E'
              no        = wa_mestab-msgnr
              v1        = wa_mestab-msgv1
              v2        = wa_mestab-msgv2
              v3        = wa_mestab-msgv3
              v4        = wa_mestab-msgv4
            importing
              msg       = m
            exceptions
              not_found = 1
              others    = 2.
          wa_stats-mess = m.
          wa_stats-text = text-001.            "'Not Created'.
          wa_stats-auart_001 = wa_record-auart_001.
          "wa_stats-sernr = wa_flat-sernr.
          append wa_stats to stats.
        elseif wa_mestab-msgtyp = 'S'.
          call function 'FORMAT_MESSAGE'
            exporting
              id        = wa_mestab-msgid
              lang      = 'E'
              no        = wa_mestab-msgnr
              v1        = wa_mestab-msgv1
              v2        = wa_mestab-msgv2
              v3        = wa_mestab-msgv3
              v4        = wa_mestab-msgv4
            importing
              msg       = m
            exceptions
              not_found = 1
              others    = 2.
          if wa_mestab-dyname = 'SAPMIEQ0'
                                    and wa_mestab-dynumb = '0101'
                                    and wa_mestab-msgspra = 'E'
                                    and wa_mestab-msgid = 'IS'
                                    and wa_mestab-msgnr = '144'.
            loop at stats into wa_stats where auart_001 = wa_record-auart_001.
                                          "and sernr = wa_flat-sernr.
                 delete stats.
            endloop.
                clear : wa_stats.
                wa_stats-mess = m.
                append wa_stats to stats.
          endif.
        endif.
        clear : wa_stats.
      endloop.
    endform.                    " loggs
    Edited by: Naseeruddin on Nov 26, 2008 8:57 AM

  • How to do multi select for the oracle forms textfields using openscript

    hi
    my scenario is to record  by selecting 3 order number same time and do copy of that in the oracle order management module.
    can anybody help me in to select the 3 order numbers and execute.
    thanks
    sudhiir

    hi Deepu,
    the code you have given is not working.
    Below is the code i have written
    Robot robot = new Robot();
    robot.keyPress(KeyEvent.VK_SHIFT);
    FORMS.TEXTFIELD(ORDER_NUMBER_0).CLICK
    FORMS.TEXTFIELD(ORDER_NUMBER_1).CLICK
    FORMS.TEXTFIELD(ORDER_NUMBER_2).CLICK
    robot.keyRelease(KeyEvent.VK_SHIFT);
    even after adding the above code it is clicking on the each text field instead of selecting all the three text field which is my requirement.
    i think their is some defect in openscript or my code is wrong.
    thanks
    sudhiir

  • Call and Execute Multiple Windows of the same VI

    Hi,
    I would like to call and execute multiple windows of the same VI.
    Please take a look for my attached vi, and start from the 2x2.vi, i think you have to re-enter the file path to run (sorry for inconvenience).
    If I click the start button in different sub panels, the sub vi(Temperature Analysis.vi..& etc) should be called out in multiple windows, hold it, and run simultaneously.
    But now the problem is, the sub vi is called out 1 by 1 until it is finished prior the second sub vi is called.
    May I know how to solve that?
    Thanks.
    Attachments:
    My VI.zip ‏173 KB

    Hello TanTan
    1. Open the PopUpmain.vi and select the path of PopUp.vi
    2. Enter the number of popups and run the VI.
    Hope this attached VI will work as per your expection. Please select the less number of instances 
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet
    Attachments:
    PopUpMain.vi ‏12 KB
    PopUp.vi ‏8 KB

  • Inspecting the current selection using the HTML5 SDK

    I have been banging my head against the wall trying to get what I thought would be something very simple working.
    What I want to do is have an InDesign panel, the contents of which changes based on the current selection on the page.
    Now, I can access the event "afterSelectionChanged" in the native scripting environment, but there appears to be no way for the native environment to trigger an event in the HTML5 panel unless I use a C++ hybrid extension and call the PlugPlugDispatchEvent() method.
    The events available in the HTML5 API are incredibly limited and don't seem to include any selection-based events.
    This makes it nigh-on impossible to use an HTML5 panel as an inspector of any kind without making an overly complex hybrid extension, which I want to avoid.
    Is this correct? If so, it seems amazingly short-sighted. If there is a way to do this, can someone please show me the way?

    Hi Samuel,
    I didnt clearly understood  your problem. When you are selecting a particular row in a table you are executing a web service named Get Mail. Are you passing any input parameter(any selected row data)  while executing a web service. And when you get the response node where you have a attribute in the node getmail. Am I right.
    If this is the case, then first check if the GetMail node is present or not by comparing it will null or checking its size. If the node is null then you will not get attribute as the element itself is null as nothing is retrieved in response. And if the node is not null then the element at 0th position is selected by default. you can retreieve the attribute by directly using the following code
    if(wdContext.nodeGetMail() !=null)
        String profileId= wdContext.currentGetMailElement().getProfileID();
    Check if this works for you.
    Regards,
    Ardhendu Sarkar

  • I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise.  I've tried two routes unsuccessfully.  I install the CD, it does not autoplay.  I execute Autoplay.exe at the root directory, I am welcomed, I ch

    I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise. I’ve tried two routes unsuccessfully. I install the CD, it does not autoplay. I execute Autoplay.exe at the root directory, I am welcomed, I choose English, I accept the EULA, I get the Install/Explore choices window, with the Install button already selected, I click the Photoshop button, the CD spins, and nothing happens.  In the 2nd attempt I execute Setup.exe in the Photoshop directory, and nothing happens at all.  I’m never even offered the opportunity to enter my product code. What should I do?

    There could is likely a compatibility problem between the old software and the newer operating system.

  • Entity selected from the rich:dataTable with paging issue

    I tend to use rich:dataTable and retrieve entities clicked with this code.
         public final static Object selecionado(final String formulario,final String tabela) {
              try {
                   final UIComponent comp = FacesContext.getCurrentInstance().getViewRoot().findComponent(formulario);
                   final javax.faces.component.UIData data = (javax.faces.component.UIData) comp.findComponent(tabela);
                   return data.getRowData();
              } catch (final Exception e) {
                   throw new IllegalArgumentException("There was an error on select entity from table.\n" +
                             "Form = " +formulario+"\n" +"Tabela:" +tabela+"\n" +"Look up if the names are correct. <h:form id=\""
                             +formulario+"\"> e"+" <h:dataTable id=\""+tabela+">",e);
         }{code}
    ps: I create a column of type h:commandlink and its call to action (which performs this method to see which entity was selected).
    It works perfectly on the first page (rich:datascroller) but when I navigate to another page and click on the link (edit) the code is not even executed (I confirm this on debug mode too) and what happens is that the paging sends me back to page one.
    Is there anything I can do?
    Best regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I'm assuming you have <h:messages/> on your page?
    The action events are queued during the Apply Request Values phase of the request. Typically if an action is not queued it is because some state of the components is not same as it was during the Render Response of the previous request. For example, if the value of the rendered attribute somehow changed, a component will not queue an action if it thinks it was not rendered.
    It your case the most likely thing to have changed seems to be the pagination state of the dataTable. The table thinks it is on the first page for some reason during the Apply Request Values phase and so iterates over the data in the first page and never discovers the request flag indicating that an event should be fired for data in the second page. So the action event is not queued, nothing happens in the Execute Action phase and the Render Response phase simply re-renders the existing view.

  • SPRUNCONVERSION and SELECTION in the FXTRANS

    Hi Experts,
    I want to execute the FXTRANS logic automaticaly, without selecting any ENTITY, CATEGORY and TIME.
    So that, i want to force the selection in the logic. is that possible ? How ?
    Thanks a lot ,
    Olivia;

    Hi,
    Thanks for your reply.
    I tried this :
    *FOR %VERSION%=V_REEL
    *RUN_STORED_PROCEDURE=SPRUNCONVERSION([%APP%],[VERSION],[EUR],[RATEINPUT],[%SCOPETABLE%],[%LOGTABLE%])
    *NEXT
    Just to test that FOR ... NEXT is working.
    But, I get that message :
    *ERROR* FX-100 Problem IN Category OR Ratedim Dimension check properties.
    That's sot strange, 'cause, while trying this, it works fine :
    *RUN_STORED_PROCEDURE=SPRUNCONVERSION([%APP%],[V_REEL],[EUR],[RATEINPUT],[%SCOPETABLE%],[%LOGTABLE%])
    *RUN_STORED_PROCEDURE=SPRUNCONVERSION([%APP%],[V_BUD2010],[EUR],[RATEINPUT],[%SCOPETABLE%],[%LOGTABLE%])
    So, i believe that the error message is not appropiate (again ;)...)
    What do you think ? Any idea ?
    Thanks for your help.
    Olivia.

Maybe you are looking for

  • In MVC for controller whether to go for JSP or Servlet???

    Which will be better for controller... JSP or a Servlet.... will there be any difference in response time and performance. kiran

  • Final Cut Pro X not updating

    Hey guys! So I have Final Cut Pro 10.0.5 and I just realized I am 3 update behind. It's not showing up in my app store that it needs to be updated, but I know it does. Is there anyway I can update it without going through the app store? Thanks!

  • When I create PDFs it adds a file I didn't select to the PDF as well as the one I did. Why?

    the question is why is it doing this. I really only use it for excell files so thats where im having the problem. its the same file that keeps apearing.

  • Please HELP with Enterprise Manager

    I'm new with Oracle and I don't know a lot of things. When I create a New Database with the assistant, then I log in the Enterprise Manager and I don't see that database in the tree. Why? If I open the enterprise manager in standalone mode then I can

  • Showing on front panel

    How to show the three link cluster to display on the front panel wait running? 1) hours per run - to show running time 2) number of events - to show each event as it happen, like a counter 3) fan duration time - to show running time Attachments: link