Table disabled after removing the last record

After removing the last row of table and disables it is unable to select any record.
Version: JDeveloper 11.1.1.2.0

Problem solution
my backBean:
protected void limpaSelecaoDaTabela() {
if (usaPopup)
if (table != null)
table.setSelectedRowKeys(null);
protected void limpaSelecaoDaTabela() {
if (usaPopup)
if (table != null)
table.getSelectedRowKeys().removeAll();
}

Similar Messages

  • How to get the last record of an internall table ....

    Hi All..
    i want to get the last record of an internal table itab, and i want the the value of the last record.

    Hi,
         Use describe statment.
    data: lv_line type i.
        Describe table itab lines lv_line.
        read table itab into wa_itab index lv_line.
    regards,
    Santosh Thorat

  • Need to fetch the last record/row from a table

    Hi,
    I have a requirement like fetching the closing balance of the last record of the table and inserting the same into the opening balance of the immediatetly created next record.
    In simple words, I need to fetch a value from the last row of the record.
    For example, I use the below query,
    select rownum, empno, ename from emp
    where rownum = (select count(rownum) from emp);
    But, the above query does not return any of the record.
    Hence, need help on this.
    Regards,
    Shivakumar A
    Edited by: shiva on Mar 27, 2011 10:14 PM

    Rows in a table are inherently unordered. In order to introduce the concept of "first" and "last", you would need to specify how to order the rows which would require that there was one or more columns in the table that you could order by in order to determine the "last" record.
    In your closing balance example, if we assume that there is something like a BALANCE_DATE column,
    SELECT account_number, balance_amount, balance_date
      FROM (
        SELECT account_number,
               balance_amount,
               balance_date,
               rank() over (partition by account_number order by balance_date desc) rnk
          FROM table_of_balances )
    WHERE rnk = 1Justin

  • Selecting the last record from a database table

    In my ABAP Program, I have to use a select statement to retrieve the last record from the database table with the same key.  In other words, the Program will get more than one hit on the database table for the selected keys and I need to retrieve values from only the last record and not the first.  I know I can use an internal table to sort the records first and then retrieve the right value.   But to make things easier, is there a SELECT statement keyword than I can use to do this in one single step?  Thanks!

    hi,
    tables:mara.
        data: begin of it_mara occurs 0,
                matnr like mara-matnr,
                meins like mara-meins,
                mtart like mara-mtart,
                end of it_mara.
    select-options:s_matnr for mara-matnr.
    select matnr
              meins
              mtart
    from mara
    into table it_mara
    where matnr in s_matnr.
    if not it_mara[] is initial.
    sort it_mara by matnr descending.
    read table it_mara index 1.
    endif.
    then you get the last record of the select statement.
    reward points if useful,
    venkat.

  • Read the last record in the database table..

    Hi..
    I am new to ABAP. So i have one condition to read the address number field in the last record from database table by using the person number where clause field.
    But the person number is same for some the records.
    So can any tell me the logic for to read the addressnumber field in the last record of selected records from database where personnumber is equal to some thing.
    Please help me..
    Thanks
    venki

    Hi Venkat ,
    u mean to say
    person number  addressnumber
    aa1            0000000000001
    aa1            0000000000002
    aa1            0000000000003
    aa1            0000000000004
    aa2            0000000000021
    aa3            0000000000110
    if i have to read the addressnumber 00000000000004
    of the person number aa1
    u can go like
    data v_address number like addressnumber.
    sort itab by personnumber addressnumber
    loop at itab .
    at end of personnumber.
    move addressnumber to v_addressnumber ..
    endat.
    endloop.
    so using control break statements i can fetch the last record of my person number if at all the same person number is having more than one address number ..
    hope this helps,
    Regards,
    Vijay
    Message was edited by: Vijay

  • Getting the last record from the internal table

    When we use a READ statement it always picks up the first record which fulfill its condition but in my case I want to pick up the last record that fulfills it condition
    I have a internal table like
    id     type
    N1      A
    N1      T
    N1      A
    N1      6 ----> LAST RECORD
    my code is
    read table itab wIth key id = netobjid.
    for eg if netobjid = N1 , then I want to read the last record that corresponds to N1 ie ID N1 TYPE - 6...
    How to do that?

    HI
    actually i have done same requirement like this ...
    Take  one count variable into your internal table ..you pass the number of records into cont variable for every time  u enter the loop .
    Sort the internal table with count variable descending . ( AS we cant sort the internal table with sy-tabix)
    Then use read statement with sy-index = 1 .
    USe below logic ,............
    data  :  count  type i value '0'.
    LOOP at int .
    count = count + 1 .
    endloop.
    sort int count descending .
    read int  with  index = 1 .

  • I have an original iPhone running version 2.2.1.  I wish to get rid of the phone, but before discarding it I want to remove the email records, phone book information, and photos.  I would like to leave the other apps in place.  Any suggestions?

    I have an original iPhone running version 2.2.1.  I wish to get rid of the phone, but before discarding it I want to remove the email records, phone book information, and photos.  I would like to leave the other apps in place.  Any suggestions?

    Delete you mail account on the phone and disable to sync your mail account in the info pane in iTunes with your phone connected, same for contacts. Also deselect photo syncing in the photo pane. After the following sync, your mail, contact and photos should be gone.
    Photos inside the camera roll have to be deleted on the phone.
    Remember, that apps only can be used with the account they were bought with. If the phone will be set up with a different iTunes account, all of your apps will be removed.
    Message was edited by: Ingo2711

  • How to Disable or Remove the Click and Call Function

     The Skype Click and Call function highlights phone and contact numbers on webpages and emails, and a Skype call can be executed by simply clicking the highlighted number. The easiest way to disable this is to remove or uninstall the Click to Call with Skype plugin, via Control Panel's Add/Remove or Uninstall Program function.
       Click and Call feature can also be deactivated by disabling or removing the plugin through your browsers' manage add-ons/plugins options (actual procedure varies according the the browser type).  Moreover, to re-enable this function, just download and install the Click and Call plugin again; Download Skype’s Click and Call plug-in   

    BISability wrote:
    I had to uninstall Skype Click-To-Call because after the last update, all Microsoft products copy/paste was broken, allowing only pasting of Unicode Text. As a programmer, this is serious really bad programmings and aweful beta testing and quality control. How many millions of people are affected by this? Priority one bug fix should be initiated and rolled out asap. the following was posted at skype.com back in April http://blogs.skype.com/garage/2012/04/skype_click_to_call_fix_for_of.html
    plus there is now an even later release
    http://www.skype.com/intl/en-us/get-skype/on-your-computer/click-to-call/windows/

  • How to get the last record??

    Hi, I now have to get only the last record from one table
    from MS Access.
    I was looking for the useful method from API, however,
    I cannot get it.
    How to get only the last record from one table ???
    Please help, thanks.

    In RDBMS, row order is really not relavent by iteself. Meaning there is no such thing as 'last record' unless it's in the context of a column (e.g. timeStamp).
    Of course, rows are inserted and stored in some natural order, but you cannot assume they'll come back the same way in a 'Select *' as they were entered.
    So, if you mean last row as in last inserted row, I would add a timestamp field that's set at insert, or use a autonumber column. Either way, have a column that will always contain the highest number or newest timestamp, and then you can build your where clause from that.
    For instance, in Access, I have an autonumbered field called 'fred', with other columns. If I want the last record, I simply use the following:
    select * from atable where fred in (SELECT max(fred) AS Max FROM atable);
    the 'where in' clause will filter to only those records in the subsequent select statment, which of course is only one, the max of the column fred.
    bRi

  • How to get the last record from the database

    I am using MS Access database and Swings as GUI. I want to get the last record of a particular column from the table and store it as a varaible.

    Hi
    To get Last record of resultset, you have pass some parameter in constructor of CreateStatement.In such case Resultset should be scrollable and Readonly
    Example
    objStatement=objCon.createStatement ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    mwwResultSet=cwwStatement.executeQuery(mwwSqlQuery);
    while(mwwResultSet.next())
    if(mwwResultSet.isLast())
    //Fetch the required column record.
    String abc=mwwResultSet.getString(1);
    I think this will work. Try it.
    bye

  • Not enough space to print the last record on each page

    Hello,
    My report looks like a simple list table, with the first row as the column header, followed by rows of records.
    The fields are placed on the Detail section and they're set with "Can Grow" property. That means, records may have different row height, some may take 1 row per record, some may take 3 rows per record, depending on the data length. I use some vertical lines on the Detail section as the column seperators, and a horizontal line as the record seperator.
    I've a Page Footer to show the page number and print date.
    My problem is:
    When the space of the last record on the current page isn't big enough, the record will be printed automatically on the second page, which is fine. But the vertical seperation lines are still displayed even though the details are printed on the second page. I got some "empty rows with vertical seperation lines" or I'd say an open-end table at the end of some pages then.
    Is there a way to avoid this?
    Your help is much appreciated. Thank you.
    Agnes

    You could draw an outline box from page header to page footer, then your internal lines would run from page header to page footer
    so if the document extends to 2 pages, the page footer will print on the 1st page and therefore the bottom line of the box
    only problem now would be that on the 2nd page the box will extend to the bottom of that page also, even if there is only 1 record

  • How to print grandtotal in table footer only in the last page in SMARTFORMS

    Hello Experts,
    How do I print the GRANDTOTAL in the table footer only on the LAST PAGE in SMARTFORMS.
    What I have done is in the text element of CELL1 of the table footer i wrote the folowing logic but not working.
    /: IF &SFSY-PAGE& EQ &SFSY-FORMPAGES&.
    * V_SUM.
    /: ENDIF.
    I even tried this.
    /: IF &NEXT-PAGE& EQ 0.
    * V_SUM.
    /: ENDIF.
    but still it displays the grand total on all pages at table footer.
    How do i go for this experts.
    Regards,
    Ranjith N

    HI Nambiar,
    To print the grand total only on the last page then create the secondary window --> create the text node for the grand total -->In the condition tab check only after the end of the main window.
    This grand total will be displayed after all the items and end of the main window.
    Footer in the table displays as the subtotals i.e on every page total is displayed..
    Regards,
    Sravanthi

  • How to get to the last record of an APEX report automatically?

    In Oracle Forms there is a "lastrec" command which can be placed after a call to a multi-row form.  The records called have the last record at the bottom of the page.  For example, if there are 100 records and there are 10 rows on the form, record numbers 91 through 100 would be showing.  Can this be done in APEX?  I have a user who wants it this way.  I set the report page up to be ordered descending, which gives her last record at the top of the page, but this is not acceptable to her.  She wants to see the last record, but she wants it at the bottom of the page. 

    Hi,
    Try this query, it should order your data as you want and the report pagination is not broken!
    The number of row displayed must be the same as the divide by value (ie. 10)
    select your_id
    from your_table
    order by trunc ((DENSE_RANK() OVER (  ORDER BY your_id desc) -1) /10)
        , DENSE_RANK() OVER (  ORDER BY your_id desc) desc;
    Page 1 displays 91 to 100
    Page 2 displays 81 to 90
    Also if your data set have 87 rows, Page 1 will display 78 to 87 (ie. the 10 last rows).
    If you want more details regarding the sorting you can have a look on this query:
    select your_id
         , trunc ((DENSE_RANK() OVER (  ORDER BY your_id desc) -1) /10)
         , DENSE_RANK() OVER (  ORDER BY your_id desc)
    from your_table
    order by 2, 3 desc;

  • Updating only the last record.

    Hi,
    I have a scenario where we get more than 1 record based on style. Everytime the new record comes in, I need to update the last record inserted. It requires a procedure to do it, but need some help on how to just update the last record only and not all the previous received records.
    Here is the scenario.
    create table test_1 as
    with data_Set as
    ( select 'ABCD' style, 20080101 date_received, 2 duration,20080301 expire_Date from dual union all
    select 'PQRS' style, 20080201 date_received, 2, 20080401 expire_Date from dual
    ) select * from data_set
    so now on next run when i get another record
    insert into test_1
    select 'ABCD' style, 20080401 date_received, 3 duration,20080701 expire_Date from dual.
    now the procedure should insert the incoming record and also update the expire_date for the previous record to a day before date_received for the new record. I am ok doing it when its only 2 records , but when i get another record of same style, i dont want to update all the previous received records. I only want to update the last record on file.
    can anyone suggest?

    STYLE     DATE_RECEIVED     DURATION     EXPIRE_DATE     SEQ_INSERTED
    110427     7/31/2006     0     7/31/2006     2
    110427     9/1/2007     12     9/1/2008     2
    110427     8/2/2008     24     8/2/2010     3
    468130     3/13/1997     0          2
    468130     3/13/1997     12     3/13/1998     2
    468130     1/12/2008     12     1/12/2009     3
    Here is my data set
    and here is the query i use to update, does it look correct?
    update test b
    set ( expire_Date) =
    (select start_date - 1
    from test a
    where (style_no, date_received) in
    (select style_no, max(date_received)
    from test c
    group by style_no
    and a.style_no = b.style_no
    and style_no in ('468130','110427')

  • Display only the last record per material in SAP query

    Hi,
    I have created a SAP Query using the quickviewer that is a join between 2 tables (MSEG and MKPF) that consist of material document information and date of posting.
    The results are fine however I would like only the last record per material to be displayed.
    Can anyone tell what do I need to add so for only the last record per material be displayed in the output.
    Thanks,
    Mark

    Hi Mark,
    May be if you use Control Level processing .........I think you will be able to get the result you want. Try displaying as Below,
    LOOP AT XXXXX.
    AT FIRST material.
    ENDAT.
    AT LAST material.
    *...Display what ever you want here. It will display at end of every material.
    ENDAT.
    ENDLOOP.
    Before using sort the table with key material in ascending.
    Hope what I had to say is helpful to you.
    Cheers,
    Raga Suman.

Maybe you are looking for

  • Workflow  for po delivery date

    Hi Good morning to all . Well I am an abaper and new in workflow . i got a requirement  to mail a user two day before po delivery date . can any one guid me . Regards Rakesh kumar singh

  • Use Secure HTTPS throughout this Forum and the Meteor Website

    This is not a "Bright Idea", this is a security flaw with the setup of this forum. When registering to use this forum you are asked for these personal sensitive pieces of information: - Password- Email Address- Mobile Number- CUSTOMER SERVICE PIN!- A

  • Employee Basic Information Portal iViews*GRANT POINTS!!!*

    Hi, I am trying to find best solution how to through the  Portal iView or set of iViews to get Employee Basic Information, say Phone number, Location in the building, Email address Manager this employee report to Photo Team Viewer I know it is possib

  • Question on MDX Query

    Hi, I have the following MDX query 1.WITH 2.MEMBER [GE].[GEOSUM] AS 'Sum({[GE].[TX],[GE].[OK]})' 3.SELECT {[GE].[TX],[GE].[OK]} ON ROWS, 4.{[Metrics].[Revenue]} ON COLUMNS FROM Cube1.Basic1 The o/p is follows : Axis 1 || Revenue || (TX) || 1000 || (O

  • How to activate unicode check flag

    How do we activate the "unicode check" flag for programs generated by workflow objects.