Displaying the table based on number of records.

Hi Experts,
I want to display a normal table based on the records, if there is only one record then only one row should be displayed on the table, if there are 2 records then 2rows should be displayed on the table with the data, if they are more than 2 records only 2 rows should be displayed on the table and remaining rows should be able to scroll on the table.
Please Provide the requried infformation.
Thanks & Regards.
Bhushan.

Hi Bhushan
  What exactly is row scroll? Did you not refer to the vertical scrollbar that appears when the number of rows is more than the number of displayed rows? Please clarify
If it is the vertical table scroll bar you refered to then you will get it if the number of records are more than the visibleRowCount you set
If it is the horizonal table scroll bar you refered to then you will get it by setting a fixed width to the table. If your column(s) value width exceeds the table width you have specified, you get the horizontal scrollbar.
Regards,
Gayathri Shanbhag

Similar Messages

  • To divide the table based on number of rows

    Hello,
    I am trying to divide a table based on the number of rows and then to process it.
    Say i have a table TEST_XXX which contains 50 rows, what i would like to do is,
    to access rows in multiple of 10. How can we do this ?
    What i was thinking is, once the table gets created and row are filled in,
    add a new column to the table and run a procedure which inserts 1 to first 10 rows
    and 2 to next 10 rows and 3 to next 10 row ...etc. Based on this we can process
    the first set of rows then next set or rows etc ....
    is there a better way to do this ?
    Code to create the table :
    CREATE TABLE TEST_XXX
      A_ID   VARCHAR2(10),
      B_ID   NUMBER,
      c_ID   VARCHAR2(10),
      D_ID   NUMBER
    )Code to add rows:
    DECLARE
    BEGIN
      FOR I IN 1..50
      LOOP
          INSERT INTO TEST_XXX VALUES('ABCDE',123,'ZYXWV',321);
      END LOOP;
      COMMIT;
    END;The original problem is, i do have a huge table, and i write a sql query to process it,
    when i process it selecting all values from table, it is very slow.
    But when i process it in small chuks(say 100 rows) it works fine.
    Thats how i was the above approach in mind.

    The original problem is, i do have a huge table, and i write a sql query to process it,
    when i process it selecting all values from table, it is very slow.Did you trace both the implementations and see why it is taking longer?

  • Can I display the table content of a web page??

    Hi guys I am new to java and here I need to count the words in each table and display the table with largest number of words . This being a part of my huge project. Below is my code where I have succeeded in displaying all the tables present in the web page.But I need to count all the words in the table and display only that table which has largest number of words including all the tags. So java experts please help me with this piece of code...................
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.regex.*;
    public class findtable{
      public static void main(String[] args) {
        String inputLine = null;
        String wholeHtml = "";
    int trcount=0;
        try{
          URL yahoo = new URL("http://books.google.com/books?q=+subject:%22+Science+Fiction+%22&as_brr=3&rview=1&source=gbs_hplp_fict");
          URLConnection yahooConnection = yahoo.openConnection();
          BufferedReader br = new BufferedReader
            (new InputStreamReader(yahooConnection.getInputStream()));
          int start = 0;
          while ((inputLine = br.readLine()) != null) {
            wholeHtml += inputLine;
            if (inputLine.contains("<table")){
                      ++start;
            if (start != 0) {
              System.out.println(inputLine);
            if (inputLine.contains("</table>")) {
              --start;
        catch (MalformedURLException me) {
           System.out.println("MalformedURLException: " + me);
        catch (IOException ioe) {
          System.out.println("IOException: " + ioe);
        }So any help would be really really appreciated....
    The code should take care of nested tables also..
    So guys looking forward for the generous help....

    I have already parsed the HTML and checked all the closing of tags and corrected the indent using Tidy and then I have applied this code so some other suggestions please

  • Is it possible to find the  table based on the Date ?

    Dear Team ,
    Is it possible to find the table based on the Date ?
    I have created an table ,But forgot the Table Name .
    Is it possible to find the Tables created on particular Date .
    Regards ,
    Augustine

    as date is record the time also below query will work.
    select * from user_objects
    where
    object_type = 'TABLE' and
    to_date(created,'DD-MON-YYYY') =to_date('<your date value in DD-MON-YYYY format>','DD-MON-YYYY');
    Edited by: shaileshM on Feb 24, 2010 9:39 PM

  • Find - tables with largest number of records?

    Hi,
    I need to find tables with largest number of records. Any transaction show this details?
    aRs

    Go to transaction DB02,  then click on the button that reads,  "Space Statistics", the dialog box, click ok, leave the "*" for all tables,   In the next screen put your cursor in the appropriate column labeled as Rows and click the sort button.  Now you will see your biggest tables at the top of the list.
    Regards,
    Rich Heilman

  • Error when displaying the table

    hellow,
        here i have to .htm pages, in first page i am entering the table name, and it has to display the table details in second page.
    but in second page i am getting error like field catalog not found
    plz help me.
    with regards
    babu

    hi babu rs
    Please post the code of the two bsp page with the layout as well as abap code. Only than anybody can help you.

  • How do you display the tables of EBS R12 (VIS)?

    Hi,
    My sqlplus does not work but I have an Oracle sqldeveloper. How do you display the tables info of order management module in EBS R12 for windows?
    For example:
    Base tables
    oe_order_headers_all
    oe_lines_all
    oe_lot_serial_numbers
    oe_sales_credits
    oe_price_adjustments
    Interface tables:
    OE_HEADERS_IFACE_ALL
    OE_LINES_IFACE_ALL
    OE_RESERVTNS_IFACE_ALL
    OE_CREDITS_IFACE_ALL
    OE_PRICE_ADJS_IFACE_ALL
    OE_LOTSERIALS_IFACE_ALL
    OE_ACTIONS_IFACE_ALL
    Thanks,
    Fernando

    Hi Fernando,
    The tables for Order Management will mostly be in ONT schema - APPS schema only holds Views, Synonyms, PL/SQL Packages and similar abstractions.
    In SQL Developer make a connection to the APPS schema, then go to Synonyms and you'll see the tables (note you should filter as there are lots of objects in Apps schema)!
    In the synonym SQL tab you can see the base schema for the table, e.g.
    CREATE OR REPLACE SYNONYM "APPS"."OE_ORDER_HEADERS_ALL" FOR *"ONT"*."OE_ORDER_HEADERS_ALL";
    Make a connection to the base schema, e.g. ONT.
    Then you'll see the ONT tables under the Tables folder.
    Alternatively, connect as apps and execute SQL "desc OE_ORDER_HEADERS_ALL"
    Or look at the APPS schema views instead, e.g. OE_ORDER_HEADERS
    Regards,
    Gareth
    Edited by: gareth.roberts on Aug 18, 2009 11:52 AM

  • Query to display the tables with referential integrity

    Hello,
    I need to display the Tables which are having referential integrity..
    Like need to dispaly the parent and child tables
    Please give me some idea on this..
    Thanks,

    Here's a nice query you can use:
    with temp_constraints as (
    select table_name
    ,      constraint_name pkey_constraint
    ,      null fkey_constraint
    ,      null r_constraint_name
    from   user_constraints
    where  constraint_type = 'P'
    union all
    select a.table_name
    ,      a.constraint_name pkey_constraint
    ,      b.constraint_name fkey_constraint
    ,      b.r_constraint_name
    from   user_constraints a, user_constraints b
    where  a.table_name = b.table_name
    and a.constraint_type = 'P'
    and b.constraint_type = 'R'
    select rpad( '*', (level-1)*2, '*' ) || table_name relation
    from   temp_constraints
    start with fkey_constraint is null
    connect by pkey_constraint <> r_constraint_name
    and prior  pkey_constraint = r_constraint_name;From http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:661009003696#tom69115451356231

  • Select the table based on 2 months ? Query no working

    I have a table TEST1 in schema MESSAGE_REPORT. What i want to do is select the table based on 2 months ( JULY and AUGUST ). The requirement is Whole JULY data should be there and for AUG the data should be till 01 aug . Below is the query i m using but its giving me error . Moreover the Where clause "TRUNC(HIRE,'MONTH') " part is compulsary to be used ,changes have to be made in the ">= timestamp '2010-07-01 00:00:00' and frd.sent_timestamp < timestamp '2010-08-10 00:00:00';" part only . please can anyone help me out
    NAME        HIRE
    SALE     01.07.2010 00:00:00,000000000
    cops     15.07.2010 00:00:00,000000000
    NAVEED     31.07.2010 00:00:00,000000000
    HEN     01.08.2010 00:00:00,000000000
    BEN     10.08.2010 00:00:00,000000000
    CROSS     15.08.2010 00:00:00,000000000
    select * from MESSAGE_REPORT.test1 where
    TRUNC(HIRE,'MONTH') >= timestamp '2010-07-01 00:00:00' and frd.sent_timestamp < timestamp '2010-08-10 00:00:00';
    ERROR:
    ORA-00904: "FRD"."SENT_TIMESTAMP": invalid identifier
    00904. 00000 -  "%s: invalid identifier"
    *Cause:   
    *Action:
    Error at Line: 24 Column: 60Edited by: user12633486 on Aug 11, 2010 1:13 PM
    Edited by: user12633486 on Aug 11, 2010 1:51 PM

    Thats becuase you are comparing with Month and not the complete date.
    Check this:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'SALE' col1,'01.07.2010 00:00:00' col2 from dual
      2  union all select 'cops','15.07.2010 00:00:00' from dual
      3  union all select 'NAVEED','31.07.2010 00:00:00' from dual
      4  union all select 'HEN','01.08.2010 00:00:00' from dual
      5  union all select 'BEN','10.08.2010 00:00:00' from dual
      6  union all select 'CROSS','15.08.2010 00:00:00' from dual)
      7  select * from t
      8  where
      9  TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') >= timestamp '2010-07-01 00:00:00'
    10* and TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') < timestamp '2010-08-10 00:00:00'
    SQL> /
    COL1   COL2
    SALE   01.07.2010 00:00:00
    cops   15.07.2010 00:00:00
    NAVEED 31.07.2010 00:00:00
    HEN    01.08.2010 00:00:00
    SQL>
    -- For less than equal to
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'SALE' col1,'01.07.2010 00:00:00' col2 from dual
      2  union all select 'cops','15.07.2010 00:00:00' from dual
      3  union all select 'NAVEED','31.07.2010 00:00:00' from dual
      4  union all select 'HEN','01.08.2010 00:00:00' from dual
      5  union all select 'BEN','10.08.2010 00:00:00' from dual
      6  union all select 'CROSS','15.08.2010 00:00:00' from dual)
      7  select * from t
      8  where
      9  TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') >= timestamp '2010-07-01 00:00:00'
    10* and TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') <= timestamp '2010-08-10 00:00:00'  -- less than equal to includes data for 10th august as well
    SQL> /
    COL1   COL2
    SALE   01.07.2010 00:00:00
    cops   15.07.2010 00:00:00
    NAVEED 31.07.2010 00:00:00
    HEN    01.08.2010 00:00:00
    BEN    10.08.2010 00:00:00
    SQL> Edited by: AP on Aug 11, 2010 1:31 AM
    Edited by: AP on Aug 11, 2010 1:32 AM

  • How to display the table components that make up a structure?

    Hi,
    How does one display the table components that make up a structure?
    I want to see the table fields that make up the structure EKBEZ.
    Thx.
    Andy

    Hi
    GOTO SE11 , type the structure name in DataType optional feild , you will get the feilds that make the structure
    Kindly rewards the points accordignly
    Regards,
    Pranshu

  • Why teststand can not display the ASCII character which number up to 128?

    Hello All,
            I have encountered a problem on an application for ASCII character,why teststand can not display the ASCII character which number up to 128?
           For example:an expression  Local.xx=Chr(164),
           xx-->string,I can not get the correct string.
           Have any idea for this?
    OS:WinXP,Teststand2012 SP1.
           Thanks a lot.
    Solved!
    Go to Solution.

    dug9000 wrote:
    [...]On Windows 7 at least, the code page setting for the operating system is located in the "Region and Language" control panel in the "Administrative" tab where it says "Language for non-Unicode programs".
    Hope this helps,
    -Doug
    Ah, that explains why i see "European Set"....
    One question, Doug: Obviously, you can select only the localization there. Is this PostScript Characters for all languages? Or is it possible to switch to something like true types, e.g. "Wingdings"? (I know, bad example, but i hope you get the point)
    thanks,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Displaying the table using TableModel

    Hi,
    I am using TableModel to connect to a database and display the results. I am unable to display the table. It doesn't display anything. Below is the code from the TableModel I am using to connect to database. Could anyone help me find the errors please. any help would be ggreatly appreciated.
    public HolidayTableModel() throws ClassNotFoundException, SQLException
             tableData = new Vector();
             int currentRow = 0;  
            try
                 Class.forName("oracle.jdbc.driver.OracleDriver");
                 Connection con = DriverManager.getConnection("jdbc:odbc:thin:@rub:1521:1B","asd","asdf");                                   System.out.println("Connection Established...");
                sqlStatement = con.createStatement();
                ResultSet rs = sqlStatement.executeQuery("select * from hlday10t");                                      System.out.println("ResultSet Statement executed...");
                numCols = rs.getMetaData().getColumnCount();
                columnNames = new String[numCols]; //Get the column names and cache them                                      for(int column = 0; column<numCols; column++)
                     columnNames[column] = rs.getMetaData().getColumnLabel(column+1);
                  while (rs.next())
                     Vector rowVector = new Vector();
                     for (int currentCol = 1; currentCol < numCols; currentCol++)
                         rowVector.addElement(rs.getObject(currentCol));
                     tableData.addElement(rowVector);
                     con.close();
                    fireTableChanged(null);//Tell the listener a new table has arrived
            catch(ClassNotFoundException e){
                  System.out.println("*** Cannot find database driver classes: "+e.getMessage());                                                            
             catch(SQLException e) {
                 System.out.println("*** Cannot connect to this database: "+e.getMessage());                               } 

    Hi,
    My TableModel extends AbstractTabelModel. Here is the full code. Sorry for posting partial code before.
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.*;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.table.AbstractTableModel;
    import java.util.*;
    import java.text.*;
    import java.sql.*;
    import java.net.*;
    import java.util.Properties;
    import java.applet.Applet;
    import oracle.jdbc.driver.*;
    public class HolidayTableModel extends AbstractTableModel {
         int rows = 0;
         Vector data = new Vector();
            String[] columnNames = {"HOLIDAY_CODE",
                             "HOLIDAY_DESCR",
                             "HOLIDAY_DATE",
                             "LAST_CHANGE_USERID",
                             "LAST_CHANGE_TMSTMP"};
            Connection con;
            Statement sqlStatement;
            int numCols = 0;
            int numRows = 0;
            Vector tableData;
            public HolidayTableModel() throws ClassNotFoundException, SQLException
               tableData = new Vector();
               int currentRow = 0;
               try
                  Class.forName("oracle.jdbc.driver.OracleDriver");
                  Connection con = DriverManager.getConnection("jdbc:odbc:thin:@d1b:1521:1B","asdf","asdf");
                  System.out.println("Connection Established...");
                  sqlStatement = con.createStatement();
                  ResultSet rs = sqlStatement.executeQuery("select * from hlday10t");
                  System.out.println("ResultSet Statement executed...");
                  numCols = rs.getMetaData().getColumnCount();
                  columnNames = new String[numCols];
                  //Get the column names and cache them
                  for(int column = 0; column<numCols; column++)
                     columnNames[column] = rs.getMetaData().getColumnLabel(column+1);
                  while (rs.next())
                     Vector rowVector = new Vector();
                     for (int currentCol = 1; currentCol < numCols; currentCol++)
                        rowVector.addElement(rs.getObject(currentCol));
                     tableData.addElement(rowVector);
                     con.close();
                     fireTableChanged(null);//Tell the listener a new table has arrived
               catch(ClassNotFoundException e){
                   System.out.println("*** Cannot find database driver classes: "+e.getMessage());
               catch(SQLException e) {
                    System.out.println("*** Cannot connect to this database: "+e.getMessage());
         public int getRowCount() {
              return tableData.size();
           public int getColumnCount() {
                return columnNames.length;
           public String getColumnName(int index) {
                return columnNames[index];
           public Object getValueAt(int row, int column)
               Vector rowVector = (Vector)tableData.elementAt(row);
               return (String)rowVector.elementAt(column);
         public void addRow(Vector rowData) {
              tableData.addElement(rowData);
              fireTableRowsInserted(tableData.size(), tableData.size() );
           public void removeRow(int row)
              data.removeElementAt(row);
              fireTableDataChanged();
           public boolean isCellEditable(int row, int column) {
              return true;
         public void setValueAt(Object o, int row, int column)
              // change a field of hi
              HolidayItem hi = (HolidayItem)data.elementAt(row);
              switch (column) {
                   case 4:
                        hi.hlday_code = (String)o;
                        break;
                   default:
                        System.out.println("Bad column when editing data: "+column);
                        break;
              fireTableCellUpdated(row, column);
    }

  • Display the data based on country currency

    Hello All,
        I was created one alv report in that i have display currency field based on country currency.means if if company code is india it is display 44.44 and if it is viyatnam 4444 with no decimals both will display in same report .I tried lot but i was getting please any one have solution give me reply fast.
    Thanks & Regards,
    Venkatesh

    Hi,
    While poplulating the feild catelogue internal table. Pass the currency field  in the internal table.
    then pass the paramter cfieldname for the amount field with the name if the field of internal table which contains the currency unit. and also create the seperate entry in the feild catellouge for the currecy unit as well.
    for more detalis see the REUSE_ALV_GRID function module documentation.

  • Making particular rows as non editable before displaying the TABLE

    Hi everyone,
                               I would like to know how to make a particular rows as non editable in UI element "TABLE" before it is displayed . The scenario is :
    On entering the Personnel number, I am getting family dependants in the table. Then, I am selecting any of the family members on some condition and saving each member with the request.
    Next time when i enter the same personnel number, I would like to show the table with already saved request for the family members rows as non editable & other members row as editable.????
    Please provide a feasible solution.

    Hi Pradeep,
    follow as per suggested. if not work use cell variants concept. it will work.
    Please check this wiki...
    http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproforABAPCellVariants
    Cheers,
    Kris.

  • List all the table names and no of records in DB.

    Hi,
    How can i write a select query which should give the total tables in the database and the number of records in each table.
    Eg: I have 2 table in the database 1. EMP 2. DEPT . EMP table has 14 records and DEPT has 4 records. Then the out put should come like following.
    TNAME RecCount
    EMP 14
    DEPT 4
    Regards
    Bond.

    Also if Table statistics have been gathered(analyze table or DBMS_STATS) then this can also be used:
    SQL> create table TEST_ABC
      2  (name_ABC varchar2(200));
    Table created.
    SQL> insert into TEST_ABC
      2  values('ABC');
    1 row created.
    SQL> insert into TEST_ABC
      2  values('DEF');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select table_name, num_rows from all_tables where table_name = 'TEST_ABC';
    TABLE_NAME                       NUM_ROWS
    TEST_ABC
    SQL> analyze table TEST_ABC compute statistics;
    Table analyzed.
    SQL> select table_name, num_rows from all_tables where table_name = 'TEST_ABC';
    TABLE_NAME                       NUM_ROWS
    TEST_ABC                                2
    SQL>

Maybe you are looking for

  • Animated gif interpolation

    i want to export some animated gifs using quicktime player 7. but i dont want antialiasing / interpolation, - i rather want every pixel to be translated to e.g 100 pixels directly. so if the gif is 16 * 16 px, i get a .mov at 160 * 160 that look 'sup

  • Urgent : Deleting a row in a sql report region

    Hi I have an SQL report, i must have an icon "delete row", when clicing this icon the row must be deleted from the report, what I have do but not sure of this : in my query I am containing some html in witch I have an icon, when the user click on thi

  • How do I add a computer to my itunes account?

    Hello, I have an iTunes account that has my iMac registered to and now I wish to access that account from my new Mac Air laptop, and download previous purchases. I can't see anywhere to add this. Thanks for any advice

  • Why did my iPhone (not PCs) suddenly require a change in POP/SMTP server spec's for one (only one) of my email accounts?

    Hello! Why has my (iPhone only) POP and SMTP settings suddenly changed for one (oddly only one) of my email sub-accounts? -It changed from "incoming.verizon.net" and "outgoing.verizon.net" to pop.verizon.net and smtp.verizon.net, respectively, ALL BY

  • What is the best kids camera for iMovie '08? Flip or, say, IXUS/Elph?

    My kids love creating video clips and the old camera they use is beginning to fall apart and I'm trying to figure out what to replace it with. USER BRIEF: The goal is simplicity and ease of use, so iMovie '08 fits the bill. Video and audio quality ar