ALV Row Counter or row number

hi,
plz i want to make row counter or row number in alv report , how can i?
ex.
NO  :  Name   :  age
1      :  ahm    :  12
2       : a2        :  25
3        :  a3       : 30
30
waiting answers
thanks

Take an additional field in your ITAB as 'counter'
Make counter = counter + 1, before your APPEND ITAB statement.
But I think better options is in TOP-OF-PAGE, take a value of counter = '<no>'.
DESCRIBE TABLE it_final LINES t_cnt.
  CONDENSE t_cnt.
wa_top-typ = 'S'.
  wa_top-key = 'Total no.of Records: '.
  wa_top-info = t_cnt.
  APPEND wa_top TO it_top.
  CLEAR wa_top.
Edited by: ashleshabhagatshelke on Aug 31, 2010 3:24 AM

Similar Messages

  • Display Row number in ALV List

    Hi All,
          I have 50 records in Internal table . I  am displaying this internal table data in ALV List display. I want to print row number in ALV . Could you please help me how to print.
    Thanks,
    PRSN.

    HI,
      take one more field in the internal table and fill it up with the number when you are filling it with data .
    loop at itab.
    it_final-seqno = sy-tabix.
    append it_final.
    endloop.

  • How to determine count for the number of rows

    Appreciate if any of you could think of a way of determining the count for the number of rows in the subquery without having to run another query.
    SELECT *FROM
    (SELECT rownum, rn, rlp_id, rlp_notes, cad_pid, status, jurisdiction_id, s.state_abbr, rlp_address, rlp_route_id, rlp_route_section, psma_version FROM ipod.relevant_land_parcels r, state s WHERE s.state_pid = r.state_pid(+) AND rlp_route_id = 'SM1' AND status = 'CURRENT')WHERE rn > 200 AND rn < 216
    And I want to import this into.net and C# environment.

    Something like this,.....????
    SQL> select * from emp;
    EMPNO ENAME      JOB         MGR HIREDATE          SAL      COMM DEPTNO
    7369 SMITH      CLERK      7902 17/12/1980     800,00               20
    7499 ALLEN      SALESMAN   7698 20/02/1981    1600,00    300,00     30
    7521 WARD       SALESMAN   7698 22/02/1981    1250,00    500,00     30
    7566 JONES      MANAGER    7839 02/04/1981    2975,00               20
    7654 MARTIN     SALESMAN   7698 28/09/1981    1250,00   1400,00     30
    7698 BLAKE      MANAGER    7839 01/05/1981    2850,00               30
    7782 CLARK      MANAGER    7839 09/06/1981    2450,00               10
    7788 SCOTT      ANALYST    7566 19/04/1987    3000,00               20
    7839 KING       PRESIDENT       17/11/1981    5000,00               10
    7844 TURNER     SALESMAN   7698 08/09/1981    1500,00      0,00     30
    7876 ADAMS      CLERK      7788 23/05/1987    1100,00               20
    7900 JAMES      CLERK      7698 03/12/1981     950,00               30
    7902 FORD       ANALYST    7566 03/12/1981    3000,00               20
    7934 MILLER     CLERK      7782 23/01/1982    1300,00               10
    14 rows selected
    SQL>
    SQL> select max(rw) from
    2 (
    3 select empno , row_number () over (order by empno) rw from emp
    4 where job='CLERK'
    5 )
    6 /
       MAX(RW)
             4Greetings...
    Sim

  • How to get row number of selected entry from OVS search result

    Hi,
    Anyone having any idea on how to get row number of the  selected entry/ how to differentiate rows in OVS search result in ON_OVS method?
    Regards,
    Jatin

    Hi,
    You can get the selected record to <ls_selection> structure in co phase 3.
    From that structure you can get what ever field you want.,
    check the below code for reference,
    << Moderator message - Cut and paste response from F4 help for ALV table field removed. Plagiarism is not allowed in SCN >>
    hope this helps u.,
    Thanks & Regards,
    Kiran
    Edited by: Rob Burbank on Jan 5, 2012 5:24 PM

  • Restricting Row number in pivot table

    Hi,
    As we can restrict the row number in table by putting 'Row Count' can we restrict number of rows in pivot table?
    Regards,
    Deepak

    hi,
    check the above answer as well as this...
    http://oraclebizint.wordpress.com/2008/01/23/oracle-bi-ee-101332-total-number-of-rows-and-pagination/
    but explain us a little bit more..what exactly do you want...
    i hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • Row number in pivot table

    Hi all,
    how can I add row number in pivot table? I tried with count but it is not working.
    Thanks

    Example (pivot):
    Rcount (1 by channel class) -> (ROWS)
    or
    Rcount(year by channel class) -> (ROWS)
    Year -> (ROWS)
    Channel Class -> (COLUMNS)
    Quantity Sold -> (MEASURES)
    ------------------------------QUANTITY SOLD
    Rcount-----Year--------Direct/Indirect/Others
    1 ------------2000 ----------10------40------40
    2 ------------2001 ----------50------20------40
    3 ------------2001 ----------80------50------40
    Regards
    Goran
    http://108obiee.blogspot.com

  • Returns wrong row number with ENTER key in JTable...

    I am having a problem to get exact row number ofJTable when ENTER key is pressed.
    table.getSelectedRow() always retuns one more value when ENTER key is pressed(fired). like
    if i have 5 rows in a table and when my focus is on 1st row and then i press enter key focus moves to next row and it returns 1 instead of 0 for the 1st row.
    I have written a code bellow, please check it out and tell me why it happens. Please click on Add Row button for creating rows in table.
    import javax.swing.*;
       import javax.swing.table.*;
       import java.awt.*;
       import java.awt.event.*;
       import java.util.Vector;
       class TableTest extends JFrame {
         MyTableModel myModel;
         JTable table;
         JButton button;
         JButton buttonQuery;
         int count = 0;
         public TableTest() {
           myModel = new MyTableModel();
           table = new JTable(myModel);
           table.setPreferredScrollableViewportSize(new Dimension(500, 200));
           JScrollPane scrollPane = new JScrollPane(table);
          table.addKeyListener(new KeyAdapter(){
              public void keyTyped(KeyEvent ke)
                if(ke.getKeyChar() == ke.VK_ENTER){
                  System.out.println(table.getSelectedRow());
           getContentPane().add(scrollPane, BorderLayout.CENTER);
           getContentPane().add(button = new JButton("Add Row"),
           BorderLayout.SOUTH);
           getContentPane().add(buttonQuery = new JButton("Query"), BorderLayout.NORTH);
           button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          Object [] aRow = new Object [8];
         String aRow1;
         for (int i=0; i<5; i++) {}
         myModel.addRow(aRow);
       buttonQuery.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
           System.out.println(myModel.getRowCount());
           System.out.println(myModel.getValueAt(1, 3));
       addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
           System.exit(0);
       class MyTableModel extends AbstractTableModel {
       protected final String[] headers =
       { "No", "Vehicle No", "Date of Loss", "Image Type", "Image Description", "Claim Type", "Scan Date", "User Id" };
       Vector data;
       MyTableModel() {
        data = new Vector();
       public int getColumnCount() {
         return headers.length;
       public int getRowCount() {
        return data.size();
       public Object getValueAt(int row, int col) {
       if (row < data.size() && col < 8) {
         Object [] aRow = (Object []) data.elementAt(row);
       return aRow[col];
       } else {
         return null;
       public void addRow(Object [] aRow) {
         data.addElement(aRow);
        fireTableRowsInserted(data.size()-1, data.size()-1);
       public static void main(String[] args) {
       TableTest frame = new TableTest();
       frame.pack();
       frame.setVisible(true);
       }Regards..
    jaya

    Dear Jaya,
    I have a look at your code. And modified a bit as well to really check the getSelectedRow(). Here's the modified code: I think when key event fired, the table row is changed and then is displays the get selected row. You can check this, if you are on the last row, and you press enter, it displays 0, it means first it changes the row and then displays the selected row which is obviously rowNumber+1.
    Hope it helps.
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    class TableTest
        extends JFrame {
      MyTableModel myModel;
      JTable table;
      JButton button;
      JButton buttonQuery;
      JButton buttonSelectedRow;
      int count = 0;
      public TableTest() {
        myModel = new MyTableModel();
        table = new JTable(myModel);
        table.setPreferredScrollableViewportSize
            (new Dimension(500, 200));
        JScrollPane scrollPane = new JScrollPane(table);
        table.addKeyListener(new KeyAdapter() {
          public void keyTyped(KeyEvent ke) {
            if (ke.getKeyChar() == ke.VK_ENTER) {
              System.out.println(table.getSelectedRow());
        getContentPane().add(scrollPane, BorderLayout.CENTER);
        getContentPane().add(button = new JButton("Add Row"), BorderLayout.SOUTH);
        getContentPane().add(buttonQuery = new JButton("Query"), BorderLayout.NORTH);
        getContentPane().add(buttonSelectedRow = new JButton("Get Selected Row Number"), BorderLayout.NORTH);
        button.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            Object[] aRow = new Object[8];
            String
                aRow1;
            for (int i = 0; i < 5; i++) {}
            myModel.addRow(aRow);
        buttonSelectedRow.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            System.out.println("Selected Row is: " + table.getSelectedRow());
        buttonQuery.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            System.out.println(myModel.getRowCount());
            System.out.println(myModel.getValueAt(1, 3));
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
      class MyTableModel
          extends AbstractTableModel {
        protected final String[] headers = {
            "No", "Vehicle No", "Date of Loss", "Image Type", "Image Description",
            "Claim Type", "Scan Date", "User Id"};
        Vector data;
        MyTableModel() {
          data = new Vector();
        public int getColumnCount() {
          return headers.length;
        public int getRowCount() {
          return data.size();
        public Object getValueAt(int row, int col) {
          if (row < data.size() && col < 8) {
            Object[] aRow = (Object[]) data.elementAt(row);
            return aRow[col];
          else {
            return null;
        public void addRow(Object[] aRow) {
          data.addElement(aRow);
          fireTableRowsInserted(data.size() - 1, data.size() - 1);
      public static void main(String[] args) {
        TableTest frame = new TableTest();
        frame.pack();
        frame.setVisible(true);

  • Display Line/Row  number in Grid

    Hi,
    How to display the row number (1,2,3...) in a grid?
    Should I go only by changing the query?
    Or is there any SDK supported way of doing that?
    Please help me with this information.
    Thanks.
    Geetha

    Hi Geetha,
    didn't have time to answer your earlier ...
    you are looking for something like
    SELECT (SELECT COUNT(*)
              FROM OCRD T2
             WHERE T2.CardCode <= T1.CardCode) as RowIndex, T1.*
    FROM OCRD T1
    ORDER BY RowIndex
    this sample will display a row number of the complete ocrd table

  • Row Number() over partition by Order by in OBIEE Physical SQL

    Hi ,
    I created a OBIEE report in Dev using Answers. When I move the same report to Live, the count of rows was more in Live environment when compared to Dev.
    The objects count is same in both Dev and Production.
    WheniI verified the log file, I found that the Physical SQL in test has
    ROW_NUMBER ()
    OVER
    PARTITION BY c1, c4, c5 order by c1,c4,c5) whereas the physical SQL in Production has
    ROW_NUMBER ()
    OVER
    PARTITION BY c1, c4, c5, c8,c9 order by c1,c4,c5,c8,c9)
    How this Partiton is done in OBIEE. I have just copied the report from catalog and moved to production.There is no changes in report.
    Whether there are any settings to control it? HOw OBIEE does this Row Number() Partiton ? How can get this similiar to Test?
    Please help!
    Thanks
    Johnny

    Hi Saichand,
    The links were helpful. But i am not getting how it is working in test and not in live.
    I found one difference while deploying . The column names of the object both in Test and Production had spaces.For E.g: Full Name
    When this column Full Name is pulled to the repsository in test , it automatically put double quotes for the column names in the physical sql when it hits the database.
    But, In production , when I pulled the column the report gave error as Invalid Identifier since OBIEE generated column name as Full Name without double quotes.
    Then I changed the column in Phyiscal Layer repository by having double Quotes for all columns. Afte that report worked fine.
    Whether this has caused any issue in Row Partition.
    Is there any setting to have column name in Double Quotes ?
    Thanks,
    Johnny

  • Adding a button to ALV row (OO ALV)

    Hi,
       I am able to add a button to the ALV row but I am not able to capture which button is pressed. I am defining the button as below :
      l_f_colpos = l_f_colpos + 1.
      l_r_fcat-tabname = 'G_T_GLALV'.
      l_r_fcat-fieldname = 'BUTTON1'.
      l_r_fcat-col_pos = l_f_colpos.
      l_r_fcat-scrtext_m = text-008.
      l_r_fcat-style = cl_gui_alv_grid=>mc_style_button.
      l_r_fcat-just = 'X'.
      APPEND l_r_fcat TO gt_glfcat.
      CLEAR l_r_fcat.
    My requirement is when the user presses the button on the ALV row , I have to display something depending on the row.
    Please give some inputs of how to capture the button which is pressed.
    Thanks in advance,
    Nilanjan Dey

    Hi Nilajan,
    take Reference of folowing program.
    REPORT zalv_toolbar.*type pools declaratins for icon and alv
    TYPE-POOLS : slis,icon.*Structure declaration for tcodes
    TYPES : BEGIN OF ty_table,
            tcode TYPE tcode,
            pgmna TYPE progname,
            END OF ty_table.*Structure for tocde text
    TYPES : BEGIN OF ty_itext,
            tcode TYPE tcode,
            ttext TYPE ttext_stct,
            sprsl TYPE sprsl,
            END OF ty_itext.*Structure for output display
    TYPES : BEGIN OF ty_output,
            tcode TYPE tcode,
            pgmna TYPE progname,
            ttext TYPE ttext_stct,
           END OF ty_output.*internal table and work area declarations
    DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
           it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
           it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
           wa_table TYPE ty_table,
           wa_output TYPE ty_output,
           wa_ittext TYPE ty_itext.*Class definition for ALV toolbar
    CLASS:      lcl_alv_toolbar   DEFINITION DEFERRED.*Declaration for toolbar buttons
    DATA : ty_toolbar TYPE stb_button.* Data declarations for ALVDATA: c_ccont TYPE REF TO cl_gui_custom_container,   "Custom container object
          c_alvgd         TYPE REF TO cl_gui_alv_grid,   "ALV grid object
          it_fcat            TYPE lvc_t_fcat,            "Field catalogue
          it_layout          TYPE lvc_s_layo,            "Layout
          c_alv_toolbar    TYPE REF TO lcl_alv_toolbar,           "Alv toolbar
          c_alv_toolbarmanager TYPE REF TO cl_alv_grid_toolbar_manager.  "Toolbar manager*Initialization event
    INITIALIZATION.*Start of selection event
    START-OF-SELECTION.*Subroutine to get values from tstc table
      PERFORM fetch_data.*subroutine for alv display
      PERFORM alv_output.*---------------------------------------------------------------------*
    *       CLASS lcl_alv_toolbar DEFINITION
    *       ALV event handler
    CLASS lcl_alv_toolbar DEFINITION.
      PUBLIC SECTION.*Constructor
        METHODS: constructor
                   IMPORTING
                     io_alv_grid TYPE REF TO cl_gui_alv_grid,*Event for toolbar
        on_toolbar
           FOR EVENT toolbar
           OF  cl_gui_alv_grid
           IMPORTING
             e_object.ENDCLASS.                    "lcl_alv_toolbar DEFINITION*---------------------------------------------------------------------*
    *       CLASS lcl_alv_toolbar IMPLEMENTATION
    *       ALV event handler
    CLASS lcl_alv_toolbar IMPLEMENTATION.
      METHOD constructor.*   Create ALV toolbar manager instance
        CREATE OBJECT c_alv_toolbarmanager
          EXPORTING
            io_alv_grid      = io_alv_grid.  ENDMETHOD.                    "constructor  METHOD on_toolbar.*   Add customized toolbar buttons.
    *   variable for Toolbar Button    ty_toolbar-icon      =  icon_generate.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button1'.    APPEND ty_toolbar TO e_object->mt_toolbar.    ty_toolbar-icon      =  icon_voice_output.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button2'.
        APPEND ty_toolbar TO e_object->mt_toolbar.    ty_toolbar-icon      =  icon_phone.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button3'.
        APPEND ty_toolbar TO e_object->mt_toolbar.    ty_toolbar-icon      =  icon_mail.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button4'.    APPEND ty_toolbar TO e_object->mt_toolbar.    ty_toolbar-icon      =  icon_voice_input.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button5'.    APPEND ty_toolbar TO e_object->mt_toolbar.**   Call reorganize method of toolbar manager to
    **   display the toolbar    CALL METHOD c_alv_toolbarmanager->reorganize
          EXPORTING
            io_alv_toolbar = e_object.  ENDMETHOD.                    "on_toolbarENDCLASS.                    "lcl_alv_toolbar IMPLEMENTATION*&---------------------------------------------------------------------*
    *&      Form  fetch_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fetch_data .* Select the tcodes upto 200 rows from TSTC  SELECT   tcode
               pgmna
               FROM tstc
               INTO CORRESPONDING FIELDS OF TABLE it_table
               UP TO 200 ROWS
               WHERE dypno NE '0000'.*Select the tcode textx  IF it_table[] IS NOT INITIAL.    SELECT ttext
               tcode
               sprsl
               FROM tstct
               INTO CORRESPONDING FIELDS OF TABLE it_ittext
               FOR ALL ENTRIES IN it_table
               WHERE tcode = it_table-tcode
               AND sprsl = 'E'.  ENDIF.* Apppending the data to the internal table of ALV output  LOOP AT it_table INTO wa_table.
        wa_output-tcode = wa_table-tcode.
        wa_output-pgmna = wa_table-pgmna.*    For texts
        READ TABLE it_ittext INTO wa_ittext WITH KEY tcode = wa_table-tcode.
        wa_output-ttext = wa_ittext-ttext.    APPEND wa_output TO it_output.
        CLEAR wa_output.  ENDLOOP.ENDFORM.                    " fetch_data
    *&      Form  alv_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_output .*Calling the ALV
      CALL SCREEN 0600.ENDFORM.                    " alv_output** Calling the ALV screen with custom container
    *On this statement double click  it takes you to the screen painter SE51.*Enter the attributes
    *Create a Custom container and name it CC_CONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.* PBO of the actual screen , Here we can give a title and customized menus
    *&      Module  STATUS_0600  OUTPUT
    *       text
    MODULE status_0600 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0600  OUTPUT
    * calling the PBO module ALV_GRID.
    *&      Module  ALV_GRID  OUTPUT
    *       text
    MODULE alv_grid OUTPUT.*create object for custom container
      CREATE OBJECT c_ccont
           EXPORTING
              container_name = 'CC_CONT'.*create object of alv grid
      CREATE OBJECT c_alvgd
          EXPORTING
              i_parent = c_ccont.* create ALV event handler
      CREATE OBJECT c_alv_toolbar
        EXPORTING
          io_alv_grid = c_alvgd.* Register event handler
      SET HANDLER c_alv_toolbar->on_toolbar FOR c_alvgd.* Fieldcatalogue for ALV  PERFORM alv_build_fieldcat.* ALV attributes FOR LAYOUT
      PERFORM alv_report_layout.  CHECK NOT c_alvgd IS INITIAL.* Call ALV GRID  CALL METHOD c_alvgd->set_table_for_first_display
        EXPORTING
          is_layout                     = it_layout
        CHANGING
          it_outtab                     = it_output
          it_fieldcatalog               = it_fcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.ENDMODULE.                 " ALV_GRID  OUTPUT*&---------------------------------------------------------------------*
    *&      Form  alv_build_fieldcat
    *       text
    *      <--P_IT_FCAT  text
    *----------------------------------------------------------------------*FORM alv_build_fieldcat.  DATA lv_fldcat TYPE lvc_s_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '1'.
      lv_fldcat-fieldname = 'TCODE'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 8.
      lv_fldcat-scrtext_m = 'TCODE'.  APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '2'.
      lv_fldcat-fieldname = 'PGMNA'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 15.
      lv_fldcat-scrtext_m = 'PROGNAME'.  APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '3'.
      lv_fldcat-fieldname = 'TTEXT'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 60.
      lv_fldcat-scrtext_m = 'Description'.  APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.ENDFORM.                    " alv_build_fieldcat*&---------------------------------------------------------------------*
    *&      Form  alv_report_layout
    *       text
    *      <--P_IT_LAYOUT  text
    *----------------------------------------------------------------------*FORM alv_report_layout.  it_layout-cwidth_opt = 'X'.
      it_layout-zebra = 'X'.ENDFORM.                    " alv_report_layout* PAI module of the screen created. In case we use an interactive ALV or
    *for additional functionalities we can create OK codes
    *and based on the user command we can do the coding.
    *&      Module  USER_COMMAND_0600  INPUT
    *       text
    MODULE user_command_0600 INPUT.
    ENDMODULE.                 " USER_COMMAND_0600  INPUTOutput:
    Regards,
    Pravin

  • How to get row number in the fetch row itself in Sql Query ?

    Hi,
    i am fetching some rows from a sql query . Is there any way to get row number as well in each row while all rows are fetched ?
    like this :
    RowNum data1 data2
    1 abc ere
    2 bnh ioi

    Hello
    Ofcourse you can get the rownum inside a query, just keep in mind that the rownum is the number of order in which the records were fetched from the table, so if you do an order by, the rownum will not be sequential, unless you query the information in a subquery first.
    SELECT rown, col1, col1
    FROM table
    Or
    SELECT rownum, col1, col2
    FROM (SELECT col_1, col_2 FROM table ORDER BY col1)
    Regards
    Johan

  • Find row number of first cell in a relative range that is less than $B$3

    Thanks for any help. I've spent hours searching, trying, and reading iWork Help
    Example:   $B$3 = 3
    Column C
    1:  9
    2:  2
    3:  9
    4:  2
    5:  3
    6:  9
    7:  9
    Find the first occurrence that is less than $B$3 (=3) in the range C3:C6. Return the row # (relative to the range, or actual row number, I don't care)
    Fill Down the formula, so the next cell looks at the range C4:C7
    In this case, I want it to return Row 4 (not 5 or 2)
    Tried this with MATCH (last argument -1 or 1) which almost works, but if it finds an exact match, it returns that row (5) instead of the first one (4)

    The single formula in D2, filled down that column, returns the row number of every row where the value in column C is less than or equal to the value in $B$3.
    The second formula, which I placed in B4, but which can go wherever it's needed, searches a limited range of column D for the minimum value in that range.
    In the example, based on your initial question, the range is three cells.  In B4, it's D2:D4; in B5 it's D3:D5, etc., with Numbers automatically adjusting the cell references as the formula is filled down the column. In each case, the formula returns the minimum value it finds in the three cell range, which is the row number on which the value in column C first meets the condition (less than or equal to $B$3) within that three cell range.
    In the second example, the formula retrieves the same value (the row number) as above, but instead of displaying it, uses it as the row-offset value in an OFFSET statement to return the Date from the row where the row number was collected.
    NOTE: Looking back at it, I see that in my rush to other duties I made an error in this formula, setting the row offset too high. Revise the formula as shown below to get the date from the correct row:
    Existing: =IF(MAX(D2:D4)=0,"",OFFSET($A$1,MIN(D2:D4),0))
    Revised: =IF(MAX(D2:D4)=0,"",OFFSET($A$1,MIN(D2:D4)-1,0))
    You wrote:
    If I'm following the logic, it would require one column (like D in this example) for every set of rows searched (in my example, B5:B15  filled down, so the next search is B6:B16 and so on).
    No. Provided the values of X and Y are constant for each set of searches, you'll need an auxiliary column for each column of values to be searched. One auxiliary column is used to mark the rows in which the value in B meets the condition ">x", the second to mark the rows where the value in C meets the condition "<y".
    The search formula (above) searches a subset of its column and returns the lowest row number where the condition for that column is met,and either displays that number or uses it to return and display a date.
    Regards,
    Barry

  • Hyp FR Error: 5200 : Error executing query.  Exceed max row number 100000

    Hi,
    I am getting the error
    5200 : Error executing query. Exceed max row number 100000
    when I run the report on Financial Reporting. It gives the same error when run on Workspace.
    Have you guys encountered this error before? What are the best ways to tackle it? Help is much appreciated guys.
    -- Adi
    Edit 1 - I tried to simplify the parameters but I still get the same error making me suspect that the issue is not the 100000 row issue.
    Edited by: Aditya26 on Apr 11, 2012 9:02 AM

    Hi Adi,
    This is from My Oracle Support:
    How to Increase Row Limit to Avoid Error "Exceed Max Row Number 100000" [ID 866832.1]
    Modified 23-FEB-2012 Type HOWTO Status PUBLISHED
    In this Document
    Goal
    Solution
    Applies to:
    Hyperion BI+ - Version: 9.3.1.0.00 to 11.1.1.3.00 - Release: 9.3 to 11.1
    Information in this document applies to any platform.
    Goal
    How do you increase the maximum row limit to avoid the error "5200: Error executing query: Exceed max row number 100000"?
    Solution
    1.Edit \Hyperion\common\ADM\<version>\lib\ADM.properties as follows:
    From MAX_ROW_NUMBERS=100000 to MAX_ROW_NUMBERS=500000
    If you are running extremely large reports, you can increase the limit.
    2.Restart Reporting and Analysis services.
    For version 11.1.2.x
    The path of ADM.properties file in these versions should be located under:
    %Oracle_Home%\Middleware\EPMSystem11R1\commo\ADM\11.1.2.0\lib
    Cheers,
    Mehmet

  • Word Links not updating when row number changes in excel

    Hi,
    I have a huge excel file with employee name,code,dob etc as fields.I linked it to word documents using paste special and macros.Everything works fine and word also updates with changes in excel file, but problem arises when in excel , data is added in the
    middle rather than at the end of the file. This changes the row numbers of all the employees.Hence when I  open corresponding word document, some one else's details open. So now i have to edit links in word...office->prepare->edit links, Here i
    have an option called ITEM IN FILES... this is where the problem occurs...It requires mentioning the row no of the corresponding pasted link...but when i change data in excel and row no changes...this should be automatically detected by Word and row number
    should be updated there.Please help me find a way to resolve this.This is what it looks like....
     Data for VC!R1C2:R2C13
    I want R1 and R2 to change automatically if I change rows in excel file.
    Thank you

    Instead of specifying a cell range in the LINK field, name the range in Excel, then use the range name in the LINK field.
    For example, instead of:
    VC!R1C2:R2C13
    you might have:
    VC!MyRange
    in Word.
    That way, the LINK will point to the named range, regardless of how many rows and/or columns are added/deleted before it. Furthermore, if you expand or contract the range (e.g. by adding/deleting columns between the first & last column), the
    named range and, hence the linked range, will likewise expand/contract.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • How to give a checkbox the value "row number" (like [row selector])

    I like to define a checkbox with htmldb_item.checkbox and give the checkbox the value 'row number'.
    It has to be the row number as displayed. Therefore I cannot use rownum or row_number() because the htmldb sorting functionality change the sequence after the row numbers are given.
    How can I give the checkbox this value, or as alternative how can I get the current row (checkbox element) in javascript from the checkbox onclick event.

    Vikas,
    Thanks a lot.
    This works.
    I use this number also to construct javascript and I walk in problems which are also solved now.
    therefore for anyone else who also want to use '#ROWNUM#'. keep in mind that for the sql #ROWNUM# is just a string and should be treated as a string therefore use quotes around it. The #ROWNUM# string is translated after executing the query, when the page is constructed from the result of the query.
    Fred.

Maybe you are looking for