Count the results in a Table View

Hi there,
I use a API and a table outputForm. And what I want is to show how many entries are in the table. Can somebody tell me the way how this could be done?
Thanks in Advance
Marcus

Hi Marcus,
do you use RFC ABAP? - If it is so, you can add an export parameter E_number_of_records the you can give the information as output.
(e.g. for an internal table
* Using ABAP function
DESCRIBE TABLE youritab LINES E_number_of_records.
Best Regards,
Marcel

Similar Messages

  • Program (PL/SQL) for count the registers of all tables in a schema

    Hi...
    I create a little program , for count the registers of all tables in the schema...
    If you need , send me your email...
    Atte
    Hector

    Hi,
    You can create a script by yourself by executing the script mentioned below:
    Connect as sys or system....
    SQL> spool test.sql
    SQL> select 'select count(*) from '||owner||'.'||table_name||';' from dba_tables;
    SQL> spool off;
    Hope this helps.
    Regards,
    -Praveen.
    http://myracle.wordpress.com

  • Displaying large result sets in Table View u0096 request for patterns

    When providing a table of results from a large data set from SAP, care needs to be taken in order to not tax the R/3 database or the R/3 and WAS application servers.  Additionally, in terms of performance, results need to be displayed quickly in order to provide sub-second response times to users.
    This post is my thoughts on how to do this based on my findings that the Table UI element cannot send an event to retrieve more data when paging down through data in the table (hopefully a future feature of the Table UI Element).
    Approach:
    For data retrieval, we need to have an RFC with search parameters that retrieves a maximum number of records (say 200) and a flag whether 200 results were returned. 
    In terms of display, we use a table UI Element, and bind the result set to the table.
    For sorting, when they sort by a column, if we have less than the maximum search results, we sort the result set we already have (no need to go to SAP), but otherwise the RFC also needs to have sort information as parameters so that sorting can take place during the database retrieval.  We sort it during the SQL select so that we stop as soon as we hit 200 records.
    For filtering, again, if less than 200 results, we just filter the results internally, otherwise, we need to go to SAP, and the RFC needs to have this parameterized also.
    If the requirement is that the user must look at more than 200 results, we need to have a button on the screen to fetch the next 200 results.  This implies that the RFC will also need to have a start point to return results from.  Similarly, a previous 200 results button would need to be enabled once they move beyond the initial result set.
    Limitations of this are:
    1.     We need to use custom RFC function as BAPI’s don’t generally provide this type of sorting and limiting of data.
    2.     Functions need to directly access tables in order to do sorting at the database level (to reduce memory consumption).
    3.     It’s not a great interface to add buttons to “Get next/previous set of 200”.
    4.     Obviously, based on where you are getting the data from, it may be better to load the data completely into an internal table in SAP, and do sorting and filtering on this, rather than use the database to do it.
    Does anyone have a proven pattern for doing this or any improvements to the above design?  I’m sure SAP-CRM must have to do this, or did they just go with a BSP view when searching for customers?
    Note – I noticed there is a pattern for search results in some documentation, but it does not exist in the sneak preview edition of developer studio.  Has anyone had in exposure to this?
    Update - I'm currently investigating whether we can create a new value node and use a supply function to fill the data.  It may be that when we bind this to the table UI element, that it will call this incrementally as it requires more data and hence could be a better solution.

    Hi Matt,
    i'm afraid, the supplyFunction will not help you to get out of this, because it's only called, if the node is invalid or gets invalidated again. The number of elements a node contains defines the number of elements the table uses for the determination of the overall number of table rows. Something quite similar to what you want does already exist in the WD runtime for internal usage. As you've surely noticed, only "visibleRowCount" elements are initially transferred to the client. If you scroll down one or multiple lines, the following rows are internally transferred on demand. But this doesn't help you really, since:
    1. You don't get this event at all and
    2. Even if you would get the event, since the number of node elements determines the table's overall rows number, the event would never request to load elements with an index greater than number of node elements - 1.
    You can mimic the desired behaviour by hiding the table footer and creating your own buttons for pagination and scrolling.
    Assume you have 10 displayed rows and 200 overall rows, What you need to be able to implement the desired behaviour is:
    1. A context attribute "maxNumberOfExpectedRows" type int, which you would set to 200.
    2. A context attribute "visibleRowCount" type int, which you would set to 10 and bind to table's visibleRowCount property.
    3. A context attribute "firstVisibleRow" type int, which you would set to 0 and bind to table's firstVisibleRow property.
    4. The actions PageUp, PageDown, RowUp, RowDown, FirstRow and LastRow, which are used for scrolling and the corresponding buttons.
    The action handlers do the following:
    PageUp: firstVisibleRow -= visibleRowCount (must be >=0 of course)
    PageDown: firstVisibleRow += visibleRowCount (first + visible must be < maxNumberOfExpectedRows)
    RowDown/Up: firstVisibleRow++/-- with the same restrictions as in page "mode"
    FirstRow/LastRow is easy, isn't it?
    Since you know, which sections of elements has already been "loaded" into the dataSource-node, you can fill the necessary sections on demand, when the corresponding action is triggered.
    For example, if you initially display elements 0..9 and goto last row, you load from maxNumberOfExpected (200) - visibleRows (10) entries, so you would request entries 190 to 199 from the backend.
    A drawback is, that the BAPIs/RFCs still have to be capable to process such "section selecting".
    Best regards,
    Stefan
    PS: And this is meant as a workaround and does not really replace your pattern request.

  • Execute a VO '4' times and show the result in single table at once.

    Hi,
    I want to execute single a VO query multiple times with different parameters and show the results together in a Table at once
    In Detail
    I have a table to which is associated with a VO.
    The VO contains SQL whose WhereClauseParameters need to be dynamically binded.say headerId and lineId
    Select ... from ....where headerId = :1 AND lineId = :2
    I have to pass these 4 values and show all the results in a single table
    headerId lineid
    H1 ............... L1
    H1 ............... L2
    H2 ............... L1
    H2 ............... L2
    I understand that i need to bind parameters dynamically and exceute the VO.
    As i have 4 different set of parameters, the view object will be executed 4 times.
    I want to show all the results together in a single table.
    How can I do it.
    thanks,
    Gowtam

    Hi Mani,
    Thanks a lot for the patience and detailed solution.I will try it out and tell you the status.
    Meanwhile, I have 2 questions on this solution(just curious)
    I will give you the snapshot of the table
    Table - ModelInfo
    Model......Tube..... Float....Size......Col5.....Col6.......Col7.......
    M1............T1.......... F1. .....1..........C15......C16.....C17.....
    M1............T1...........F1.......2..........C25......C26.....C27.....
    M1............T2......... .F2.......1..........C35......C36.....C37.....
    M1............T2...........F2.......2..........C45......C46.....C47.....
    M2............T1.......... F1. .....1..........
    M2.............T1..........F1.....2.........Cn5.......Cn6........Cn7
    .<continues...>
    .<till>
    .Mn............Tn..........Fn.......n........Cxy.......Cpq.......Crs....
    Question 1:
    if you notice this data,
    The Columns 5 to 7 are dependent on Combination of Model,Tube,Float and Size.
    Hence will this query work properly(without mixing up data from other Pk combination) and will it be efficient?(I Know this is a stupid qst, still double checking..As your solution assumes that each row is unique for Model only..which is not true)
    Select ...From....Where
    Model in(M1,M2,..Mn) AND Tube in(T1,T2..Tn) AND Float in(F1,F2,....Fn) and Size in(1,2...n).
    In short, will C15,C16 and C17 appear only with M1,T1,F1,1..I believe it will.
    Question 2:
    As I told,
    Third party program will return Array of Objects.
    Each object will have a variable called Flow along with
    Model,Tube,Float and Size.
    Flow is not stored in the database(can not be stored due to functional reasons).I want to show this Flow also along with other columns fetched from the DB for all 100+ rows.
    How can I do it?
    I will give u the scenario(with just 2 rows)...please check(Flow is not stored in DB)
    Third Party object : ObjModel
    Model......Tube..... Float....Size......Flow
    M1............T1.......... F1. .....1..........100
    M1............T1...........F2.......2...........200.
    M1............T2.......... F1.......1..........300
    M1............T2...........F2.......2..........400
    My concern is,
    After the VO executes and shows other 6 columns, it should show Flow appropriately.(associated with each object in the array)
    I understand that I need to have a Transient attribute in VO called[b] Flow.But I don't know how to perform the two tasks simultaneously..
    Task1:Your solution on showing table columns
    Task2:Showing Transient data for each object returned from program.
    thanks,
    Gowtam

  • Can you select the row in a table view without highlighting the cell?

    I have an an app with a table view which is presented modally. Cell selections in this table are saved in the parent controller so that they can be reselected if the table is reloaded after being dismissed.
    When the cell is first highlighted, I want to momentarily highlight the cell and have it fade out, which I do by unselecting the cell from the modal view controller's didSelectRowAtIndexPath by calling setSelected:animated on the table view cell.
    However, when I present the table view controller modally again and want to display the previously selected cell as selected, I don't want the cell background to be highlighted, and I'm having trouble doing this.
    In order to make sure the table view knows the cell is selected, I am calling selectRowAtIndexPath. I need to make sure the cell is selected so that I can set/unset the cell's accessoryType. However, this has the sideeffect of highlighting the cell too, which looks weird and confusing to the user.
    I've tried things like temporarily setting the cell's selection style to none, but while that stops the cell background from highlighting? I've tried setting the selectionStyle to UITableViewSelectionStyleNone, but while this prevents the cell background from highlighting, the cell text still changes to white, so it the text is invisible against the white background.
    Is there a easy way of setting a cell to selected in the table view without also changing the highlight and text colour of the actual cell? Immediately setting the cell to be unselected still makes the highlight visible for a split second.

    I tried that, but setting the highlighted property doesn't seem to affect it.
    I figured out how what I was doing wrong though. I was setting selection style UITableViewSelectionStyleNone, selecting the cell, then setting the selection style back to whatever it had previously been. This causes the background not to draw highlighted, but the text and accessory type to still draw highlighted.
    In order to fix this, I moved the code to set the cell selection style to whatever it had previously been to the didDeselectRowAtIndexPath method.

  • How to get color in the final row of table view( table control)

    Hi,
    iam having a table control displayed with 10 records as output,in that i need to provide a color for the final row since it is total inorder to show difference from other records.
    Kindly advise me on this.
    Thanks & Regards,
    Nehru.

    Hi Nehru,
    Checkout [THIS|Re: set color for a particular row in table view] thread .
    [This |http://www.sapdesignguild.org/resources/htmlb_guidance/table.html#at] Might also help you.
    Regards,
    Anubhav
    Edited by: Anubhav Jain on Jan 4, 2009 7:34 AM

  • Changing the background color of the row of the selected cell in table view

    How can I change the background color of the table row when user clicks on table cell in table view?
    Edited by: a_brar on May 5, 2012 11:12 PM

    You could apply the following css style (by defining a custom stylsheet with the following lines and loading it into your app).
    The last color sets the background color of the selected row while the table-view has focus (in this case to orange).
    .table-view:focused .table-row-cell:filled:focused:selected {
        -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, orange;
    }There are quite a lot of subtleties in the css styling for the tableview (e.g. different colors for the selected row when the control has focus vs when it doesn't or when the user hovers over a selected row in an unfocussed tableview), which you may want to cater for when chaning the background color of the selected row in a table view. There is also alternate styling for when the tableview is in row selection vs cell selection mode. So you may want to look at customizing further based on the css styles in caspian.css in sdk/rt/lib/jfxrt.jar if you can understand the complex css there.

  • Resize theb image in the Tab Bar and Table View

    Hi,
    I have image of 64x64.
    I want to resize the image to fit it into Table View and also in the Tabbar.
    I don't want to provide separate images for each.
    Is it possible?

    The mozilla.widget.render-mode preference works in beta 6, but this preference has now been removed from the latest development builds and will not work in beta 7 or later.
    Removed by the part 2 patch for [https://bugzilla.mozilla.org/show_bug.cgi?id=596494 Bug 596494] – Update render mode on device removal

  • How to Control the width of the Filter row in Table View

    Hi !
    I have a Table View with filter='application'. The filter works fine but I am not able to control the width of the columns of the tableview .
    On filtering, if there are not items in the table view the columns shrink to the minum width....and  it looks very odd.
    Can you help me how to control the width of the Filter-Row in Table Veiw.
    Thanks and Best Regards,
    Bindiya

    Hi Raja,
    "FIXEDCOLUMN" did not help in the width of the column, but it just showed all the rows merged in the column.
    I have a cloumn called "COUNTRY" and its width is set to "20". The Filter of the column "COUNTRY" is a dropdownlist whos value is update with new values.
    On filtering if there is any row visible then the column width is adjusted to the maxmimum length of the dropdownlist ( this is because of the "EDIT" attribute in column definition ). But if there is no rows visiblel for the selected filter value then the filter row shrinks to the width = "20" and the dropdownlist is not visible completely.
    Need to know how to control the width of the FILTER column.
    Thanks and Best Regards,
    Bindiya

  • Shouldn't using WITH return the same results as if you'd put the results in a table first?

    First off, here's my version info:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for HPUX: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    I just reread the documentation again on the subquery factoring clause of SELECT statement, and I didn't see any restrictions that would apply.
    Can someone help me understand why I'm getting different results?  I'd like to be able to use the statement that creates MAT3, but for some reason it doesn't work.  However, when I break it up and store the last TMP subquery in a table (MAT1), I'm able to get the expected results in MAT2.
    Sorry if the example seems a little esoteric.  I was trying to put something together to help illustrate another problem, so it was convenient to use the same statements to illustrate this problem.
    drop table mat1;
    create table mat1 as
    with skus as (
      select level as sku_id
      from dual
      connect by level <= 1000
      tran_dates as (
      select to_date('20130731', 'yyyymmdd') + level as tran_date
      from dual
      connect by level <= 31
      sku_dates as (
      select s.sku_id,
      t.tran_date,
      case when dbms_random.value * 5 < 4
      then 0
      else 1
      end as has_changes,
      round(dbms_random.value * 10000, 2) as unit_cost
      from skus s
      inner join tran_dates t
      on 1 = 1
    select d.sku_id,
      d.tran_date,
      d.unit_cost
      from sku_dates d
      where d.has_changes = 1
    drop table mat2;
    create table mat2 as
    select m.sku_id,
      m.tran_date,
      m.unit_cost,
      min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
      from mat1 m
    drop table mat3;
    create table mat3 as
    with skus as (
      select level as sku_id
      from dual
      connect by level <= 1000
      tran_dates as (
      select to_date('20130731', 'yyyymmdd') + level as tran_date
      from dual
      connect by level <= 31
      sku_dates as (
      select s.sku_id,
      t.tran_date,
      case when dbms_random.value * 5 < 4
      then 0
      else 1
      end as has_changes,
      round(dbms_random.value * 10000, 2) as unit_cost
      from skus s
      inner join tran_dates t
      on 1 = 1
      tmp as (
      select d.sku_id,
      d.tran_date,
      d.unit_cost
      from sku_dates d
      where d.has_changes = 1
    select m.sku_id,
      m.tran_date,
      m.unit_cost,
      min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
      from tmp m
    select count(*) from mat2;
    select count(*) from mat3;
      from tmp m
    select count(*) from mat2;
    select count(*) from mat3;
    select count(*) from mat2;
      COUNT(*)
         31000
    Executed in 0.046 seconds
    select count(*) from mat3;
      COUNT(*)
             0
    Executed in 0.031 seconds

    I think there's something else going on.
    I made the change you suggested, with a slight modification to retain the same functionality of flagging ~80% of the rows as not having changes.  I then copied that section of my script - included below - and pasted it into my session twice.  Unfortunately, I got different results each time.  I have had a number of strange problems when using the WITH clause, which is one of the reasons I jumped at posting something here when I encountered it again in this context.
    Can you help me understand why this would happen?
    drop table mat3;
    create table mat3 as
    with skus as (
      select level as sku_id
      from dual
      connect by level <= 1000
      tran_dates as (
      select to_date('20130731', 'yyyymmdd') + level as tran_date
      from dual
      connect by level <= 31
      sku_dates as (
      select s.sku_id,
      t.tran_date,
      case when dbms_random.value(1,100) * 5 < 400
      then 0
      else 1
      end as has_changes,
      round(dbms_random.value * 10000, 2) as unit_cost
      from skus s
      inner join tran_dates t
      on 1 = 1
      tmp as (
      select d.sku_id,
      d.tran_date,
      d.unit_cost
      from sku_dates d
      where d.has_changes = 1
    select m.sku_id,
      m.tran_date,
      m.unit_cost,
      min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
      from tmp m
    select count(*) from mat2;
    select count(*) from mat3;
    152249 < mattk > drop table mat3;
    Table dropped
    Executed in 0.016 seconds
    152249 < mattk > create table mat3 as
                             2  with skus as (
                             3   select level as sku_id
                             4   from dual
                             5   connect by level <= 1000
                             6   ),
                             7   tran_dates as (
                             8   select to_date('20130731', 'yyyymmdd') + level as tran_date
                             9   from dual
                            10   connect by level <= 31
                            11   ),
                            12   sku_dates as (
                            13   select s.sku_id,
                            14   t.tran_date,
                            15   case when dbms_random.value(1,100) * 5 < 400
                            16   then 0
                            17   else 1
                            18   end as has_changes,
                            19   round(dbms_random.value * 10000, 2) as unit_cost
                            20   from skus s
                            21   inner join tran_dates t
                            22   on 1 = 1
                            23   ),
                            24   tmp as (
                            25   select d.sku_id,
                            26   d.tran_date,
                            27   d.unit_cost
                            28   from sku_dates d
                            29   where d.has_changes = 1
                            30   )
                            31  select m.sku_id,
                            32   m.tran_date,
                            33   m.unit_cost,
                            34   min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
                            35   from tmp m
                            36  ;
    Table created
    Executed in 0.53 seconds
    152250 < mattk > select count(*) from mat2;
      COUNT(*)
             0
    Executed in 0.047 seconds
    152250 < mattk > select count(*) from mat3;
      COUNT(*)
         31000
    Executed in 0.047 seconds
    152250 < mattk >
    152251 < mattk > drop table mat3;
    Table dropped
    Executed in 0.016 seconds
    152252 < mattk > create table mat3 as
                             2  with skus as (
                             3   select level as sku_id
                             4   from dual
                             5   connect by level <= 1000
                             6   ),
                             7   tran_dates as (
                             8   select to_date('20130731', 'yyyymmdd') + level as tran_date
                             9   from dual
                            10   connect by level <= 31
                            11   ),
                            12   sku_dates as (
                            13   select s.sku_id,
                            14   t.tran_date,
                            15   case when dbms_random.value(1,100) * 5 < 400
                            16   then 0
                            17   else 1
                            18   end as has_changes,
                            19   round(dbms_random.value * 10000, 2) as unit_cost
                            20   from skus s
                            21   inner join tran_dates t
                            22   on 1 = 1
                            23   ),
                            24   tmp as (
                            25   select d.sku_id,
                            26   d.tran_date,
                            27   d.unit_cost
                            28   from sku_dates d
                            29   where d.has_changes = 1
                            30   )
                            31  select m.sku_id,
                            32   m.tran_date,
                            33   m.unit_cost,
                            34   min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
                            35   from tmp m
                            36  ;
    Table created
    Executed in 0.078 seconds
    152252 < mattk > select count(*) from mat2;
      COUNT(*)
             0
    Executed in 0.031 seconds
    152252 < mattk > select count(*) from mat3;
      COUNT(*)
             0
    Executed in 0.047 seconds

  • How to hide the field in sm31 table view

    experts pls help....

    Hi Gopal,
    If you are working with a maintenance view object, use the Attributes and mark the field as Hidden. Re-generate maintenance dialog afterwards.
    If you are working with a table object, then you can simply remove the field from the generated table control. Also remember to remove the field from the FIELD - CHAIN statement in the PAI.
    But, in such a case, remember that you should manually maintain some coding on the screen, to fill up/read/change the value of your hidden field programmatically.
    Best Regards,
    Rekha

  • How can I select the next item in table view?

    Hey,
    I'd like to select the next item ,but I have no idea about this ?do you have any suggestion?
    eg:
    the second item is being selected now,I need to select the third one in my code ,how can I implement this function?

    private IntegerProperty index = new SimpleIntegerProperty();
        public final double getIndex() {
            return index.get();
        public final void setIndex(Integer value) {
            index.set(value);
        public IntegerProperty indexProperty() {
            return index;
        }Get the selected item:
    table.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
                @Override
                public void changed(ObservableValue observable, Object oldvalue, Object newValue) {
                    Person selectedPerson = (Person) newValue;
                    setIndex(data.indexOf(newValue));
            });Select the next index:
    table.getSelectionModel().select(index.get() +1  );

  • I would like to read a file and display the results in a table containing both strings and numbers?

    Hi,
    I just need a simple way of doing this as at the moment, i read one line at the time containing strings and numbers, whenever i convert this line to an array i loose the strings, if i want to display it, it displays as a group of lines while i would like to display it as a table with column headers. The file is an .xls worksheet.
    Any suggestions?
    Thanks
    Me

    Hi,
    Look at attach vi.
    If this is not what you need please clarify.
    With ActiveX you can Open Excel, interact with it (read and write values to cells...
    But if you can read it this way, I think it's easier.
    Hope this helps,
    Paulo
    Attachments:
    XL.zip ‏24 KB

  • How do I collate the results of multiple tables ...

    into a new row in another table?
    I have 12 monthly expense tables, which each have their columns totaled at their bottom via regular sum formulas. I need to create a row in an additional year end table, which 'gets' all those rows values from the twelve mentioned above.
    Please forgive my spreadsheet ignorance, and thank you. As a producer of 40 years, math just isnt a strong suit.

    I think that the ony way without complicated formulas is to start your equation and click on the cells to add up or average, etc... as you want them. You can select a cell in another table to go inside a function by just clicking on them, and your SUM and AVERAGE functions are able to take multiple ranges of numbers as argument, just separate them with commas.
    If you wnat the harder version, just let us know,
    Jason

  • Hi Experts, the result of a table content in se16n?

    Hi Experts,
    in the ALV output of se16n, some columns are in green, what does this stand for? thanks.
    Kind regards
    Dawson

    Hi Sudhakar,
    Could you please give a detail info for this? becasue I haven't found the path you mentioned, normal display -> utilities -> color legend, where is the path? thanks in advance!
    Kind regards
    Dawson

Maybe you are looking for

  • How can i change the color of a field in a table depence of a value

    Hi forum       Is this possible to change the color of a row in a specific field of a table depends of the value of this field,,, for example if the value is equal or greather than 1. Thnks Josué Cruz

  • How do I download pictures from my Canon 5D Mark ll to my iPad

    How do I download pictures from my Canon 5D Mkll to my iPad

  • PDF and Safari

    Everytime I try to get a PDF file loaded from a web site I get the message that the page failed to load and to check Activity. Activity says "plugin cancelled" I have Adobe Reader 7.0.8 installed. In Safari security I have "enable plug ins" checked.

  • Issue on migration from OTM 8 to 9

    Hello, I'm trying to migrate from Oracle Test Manager 8 to 9. I would like to use an old schema built on OTM 8. I've created a new Database Connection using OATS - Database Configuration in order to use my old schema. Anytime I try to log in OATS Adm

  • Parallel Currency Tables

    Hello Guys, I have a question. Which table stores all the associated currency codes assigned to a given company code? Thanks.