TOTAL OF RECORDS

As make the total Of records in "resultset"?
Ex:
rset.next() FOR NEXT RECORD
rset.????() FOR TOTAL DE RECORDS
THANKS

Hi
As far as my knowledge goes there is no such method in ResultSet or ResultSetMetaData which can give the total number of records selected.
What usually i do is loop
1>through the result set incrementing a variable which can give me the count of the number of times the it looped and ultimatley the number of records in the result set..
2>Exceute a Select count(*) for <the same condition>..before saying select * for <condition>
If there is any methiod..i would be eager to know about it.
regards
arathi.

Similar Messages

  • How to create a loop to run total of records for before and after unconstant date

    Post Author: Ann2
    CA Forum: Formula
    Here is the data sample:
    ID period code date
    1  00  I    01/01/1999
    1 00   Z   01/02/1999
    1 00  G   12/05/1999
    1 00  M   01/01/2000
    There are many students with many periods and many codes. I need to save a date when code = 'G' and count separateley records per student/period 2 times - before and equal that date and after that date, so in the end for period 00 I will have 2 values: 3 (before) and 1(after).
    There are periods from 00 to 08. I am counting students abscencies before and after warning letter was sent (code G).
    The result data should look : 00 01 02 03 04 05 06  07  08              00 01 02 03 04 05 06  07  08     Total
                                                3  0   0   0   0   0   0   0   0                 1 0    0   0   0   0   0   0   0        4
    Please help me.
    Thank you.
    Ann2

    Post Author: Ann2
    CA Forum: Formula
    Thank you for your answer, but I do care about the date the 'G' happened, because I need to reset count.
    The logic behind is this:if a student absent for more than 8 times per period - the letter will be sent out to the parents , that will be code 'G' with period '-1' (it may happen that there will never be code 'G' , but I need to track all absencies). Once the letter is sent, the count starts over (the count starts over the next day after code 'G'). The absencies which happened before or the date the letter sent should count toward 'previous'  abscenices, all other - absenices after the letter.
    So basically I need total per period and total per period before or the day with code 'G'.  Running total with reset with formula code = 'G' does not work.
    I created a formula field which has global date (when code 'G' happenned) and it says if globaldate >= periodDate then date (1900,01,01) else (2100,01,01) and that formula is ok, but I can not use it in running total or can not create group on it and insert total.
    Please help me with this. Thank you.
    Ann2

  • Count total of records in a cursor

    How I can to Know the total of rows in a cursor whithout pass over all them

    do a simple count(1) for the same query as in cursor...
    select count(1) into Varible
    Clauses of ur cursor;
    e.g;
    declare
    cursor c1 is select * from emp;
    a c1%rowtype;
    cnt number;
    begin
    select count(1) into cnt from emp;
    --YOUR CURSOR GOES HERE
    end;
    Riaz

  • Report with Top 5 Customers per year for last 5 years (total  25 records)

    Hello
    Can anyone help?
    How to display top 5 customers per year for last 5 years in a report
    E.g.
    Year Customer name Revenue
    2009 A1 5000
    A2 4000
    A3 3000
    A4 2000
    A5 1500
    2008 B1 3000
    B2 1200
    B3 800
    Regards,
    SMA

    Hi
    see this...
    http://oraclebi.soundvoid.net/2008/09/using-the-top-n-filter/
    And close your all threads if they answered...

  • Total records in IT0000 company code wise - SE16N

    Hello All,
    I need to check the total number of records in IT0000 for employees belonging to a particular company codes or personnel area. But there shouldn't be any duplicate entry for a personnel number in the total records.
    In SE16N I am able to get an entire list but not company code wise. Is there any way I can generate the  total no records in each infotype, on the basis of company code or personnel areas?
    Regards,
    Ally

    1 - If you have activated Complementary Measures, you should look at table PA0302 instead of table PA0000.
    2 - As mentioned by Pedro, se16n will not allow you to get what you require in a single step.  An Ad Hoc Query could probably allow you to create the report you want.
    3 - Should you be able to get lists of employee numbers "on the basis of company code or personnel areas" (possibly using se16n to look at table PA0001), then you could use those lists to explore the different infotypes (tables PA0000, PA0002, PA0006, etc...) using se16n, but unless you restrict the output to the records with End Date = 31.12.9999 , you will end up with many records for each employee.

  • Records available in T-Code 'PR05' is not getting populated in ESS

    Hi Experts,
    I am facing one issue in Travel management portal.
    In T-Code 'PR05',I could see 3 records for a particular employee.But in portal I could see only two of them.
    Records are of with start dates on year 2012,2013 and 2014.Apart from 2012 record,other records are getting displayed.
    Any restrictions on number days?
    Please help me to solve this issue.
    Thanks in advance,
    Arun.

    Hi Ankur,
    Thanks a lot for your valuable time and suggestion.
    I had kept it as 'ALL' in the query,eventhough the records are not getting displayed.
    I have found that in table PTRV_HEAD,there are totally five records for the same pernr.
    The dates of that records are :
    28.11.2012 - 18.10.2013
    26.11.2012 - 27.11.2012
    01.05.2014 - 03.05.2014
    21.10.2013 - 23.10.2013
    14.11.2012 - 16.11.2012.
    Out of these 5 records,
    PR05 is showing 3 records : 01.05.2014 - 03.05.2014, 21.10.2013 - 23.10.2013 , 28.11.2012 - 18.10.2013
    Portal showing 2 records :  01.05.2014 - 03.05.2014, 21.10.2013 - 23.10.2013
    Missing records :  14.11.2012 - 16.11.2012, 26.11.2012 - 27.11.2012
    Is there any configurations/settings has been done for this?
    Awaiting your reply.
    Thanks,
    Arun.

  • Calculating the total in alv and displaying the date

    Hi,
    I am trying to calculate the totals of netwr and fkimg in a report but the following coding cannot giv me the right answer so if there is anyone with the solution for this problem may you please help me out and how can i display the date on my report......here is my coding:
    REPORT  Z_DAILY_STOCK_NEW.
    TYPE-POOLS: SLIS.
                       TABLES
    TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
               ALV FIELDS
    DATA: it_fieldcat TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_cnt LIKE sy-tabix.
         total ref to data.
        t_alv LIKE TABLE OF s_error WITH HEADER LINE.
    DATA: gr_layout TYPE slis_layout_alv,
          gr_tab_group TYPE slis_t_sp_group_alv,
          gr_repid LIKE sy-repid,
          gr_events TYPE slis_t_event,
          gr_print  TYPE slis_print_alv,
          gr_user   TYPE slis_formname VALUE 'USER_COMMAND'.
             SELECTION SCREEN
    SELECT-OPTIONS:
      s_werks FOR vbrp-werks,
      s_auart FOR vbak-auart.
             DEFINITION OF AN INTERNAL TABLE
    DATA: begin of i_stocktab occurs 0,
             kunag LIKE vbrk-kunag,
             name1 LIKE kna1-name1,
             ort01 LIKE kna1-ort01,
             inco1 LIKE vbrk-inco1,
             vkgrp LIKE vbrp-vkgrp,
             fkimg LIKE vbrp-fkimg,
             netwr LIKE vbrk-netwr,
          end of i_stocktab.
             START OF SELECTION
       SELECT vbrkkunag kna1name1 kna1ort01 vbrkinco1 vbrp~vkgrp
              vbrpfkimg vbrknetwr
              FROM kna1 inner join vbrk on kna1kunnr EQ vbrkkunrg
                        inner join vbak on kna1kunnr EQ vbakkunnr
                        inner join vbrp on vbrkvbeln EQ vbrpvbeln
              INTO i_stocktab
              WHERE vbrp~werks IN s_werks
              AND   vbak~auart IN s_auart.
              APPEND i_stocktab.
       ENDSELECT.
    *DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM build_event.
    PERFORM build_print.
    PERFORM calc_total.
    PERFORM display_alv_report.
    FORM build_fieldcatalog.
      w_cnt = 1.
      it_fieldcat-fieldname = 'KUNAG'.
      it_fieldcat-seltext_m = 'Soldtp'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-key       = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NAME1'.
      it_fieldcat-seltext_m = 'Name'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'ORT01'.
      it_fieldcat-seltext_m = 'City'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'INC01'.
      it_fieldcat-seltext_m = 'Incoterms'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'VKGRP'.
      it_fieldcat-seltext_m = 'Sales Group'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'FKIMG'.
      it_fieldcat-seltext_m = 'Invoiced Qty'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
    *it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NETWR'.
      it_fieldcat-seltext_m = 'Invoiced Value'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
    it_fieldcat-do_sum    = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    ENDFORM.
    FORM build_layout.
        gr_layout-no_input           = 'X'.
        gr_layout-colwidth_optimize  = 'X'.
        gr_layout-totals_text        = 'Totals: '(201).
        gr_layout-detail_popup       = 'X'.
    ENDFORM.
    FORM build_event.
      DATA i_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
         EXPORTING
           i_list_type = 0
         IMPORTING
           et_events   = gr_events[].
       READ TABLE gr_events WITH KEY name = slis_ev_user_command
                            INTO i_event.
       if sy-subrc = 0.
         MOVE gr_user TO i_event-form.
         APPEND i_event TO gr_events.
       endif.
    ENDFORM.
    *FORM calc_total.
    LOOP AT it_fieldcat into wa_fieldcat
    WHERE fieldname EQ 'FKIMG' OR
           fieldname EQ 'NETWR'.
           wa_fieldcat-do_sum   = 'X'.
           wa_fieldcat-datatype = 'QUAT'.
    modify it_fieldcat from wa_fieldcat.
    ENDLOOP.
    *ENDFORM.
    FORM build_print.
         gr_print-reserve_lines = '2'.
         gr_print-no_coverpage  = 'X'.
    ENDFORM.
    FORM calc_total.
    DATA: total type ref to data,
          subtotal1 type ref to data.
      field-symbols <fkimg> like sflight.
      field-symbols <netwr> like sflight.
      call method grid1-> get_subtotals
         importing
            ep_collect00 = subtotal
            ep_collect01 = total.
      assign total to <fkimg>.
      assign total to <netwr>.
    ENDFORM.
    *&          FUNCTION ALV DISPLAY
    FORM display_alv_report.
    gr_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
       I_CALLBACK_PROGRAM                = gr_repid
       I_CALLBACK_USER_COMMAND           = slis_ev_user_command
       I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE' " see FORM
       IS_LAYOUT                         = gr_layout
       IT_FIELDCAT                       = it_fieldcat[]
       IT_SPECIAL_GROUPS                 = gr_tab_group
       I_SAVE                            = 'X'
       IT_EVENTS                         = gr_events
       IS_PRINT                          = gr_print
      TABLES
        t_outtab                          = i_stocktab
      EXCEPTIONS
        PROGRAM_ERROR                     = 1
        OTHERS                            = 2.
    IF sy-subrc <> 0.
    ENDIF.
    ENDFORM.
    FORM top-of-page.
    *ALV Header deaclarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc TYPE c.
    *Title
       wa_header-typ  = 'H'.
       wa_header-info = 'Report for daily Stock Returns'.
       APPEND wa_header TO t_header.
       CLEAR wa_header.
    *Total No. Records Selected
    DESCRIBE TABLE i_stocktab LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records Selected:' ld_linesc
                              INTO t_line SEPARATED BY space.
      wa_header-typ = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
             it_list_commentary = t_header.
    ENDFORM.

    Try This
    REPORT z_daily_stock_new.
    TYPE-POOLS: slis.
    * TABLES
    TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
    * ALV FIELDS
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_cnt LIKE sy-tabix.
    * total ref to data.
    * t_alv LIKE TABLE OF s_error WITH HEADER LINE.
    DATA: gr_layout TYPE slis_layout_alv,
    gr_tab_group TYPE slis_t_sp_group_alv,
    gr_repid LIKE sy-repid,
    gr_events TYPE slis_t_event,
    gr_print TYPE slis_print_alv,
    gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
    * SELECTION SCREEN
    SELECT-OPTIONS:
    s_werks FOR vbrp-werks,
    s_auart FOR vbak-auart.
    * DEFINITION OF AN INTERNAL TABLE
    DATA: BEGIN OF i_stocktab OCCURS 0,
    kunag LIKE vbrk-kunag,
    name1 LIKE kna1-name1,
    ort01 LIKE kna1-ort01,
    inco1 LIKE vbrk-inco1,
    vkgrp LIKE vbrp-vkgrp,
    fkimg LIKE vbrp-fkimg,
    netwr LIKE vbrk-netwr,
    END OF i_stocktab.
    * START OF SELECTION
    SELECT vbrk~kunag kna1~name1 kna1~ort01 vbrk~inco1 vbrp~vkgrp
    vbrp~fkimg vbrk~netwr
    FROM kna1 INNER JOIN vbrk ON kna1~kunnr EQ vbrk~kunrg
    INNER JOIN vbak ON kna1~kunnr EQ vbak~kunnr
    INNER JOIN vbrp ON vbrk~vbeln EQ vbrp~vbeln
    INTO i_stocktab
    WHERE vbrp~werks IN s_werks
    AND vbak~auart IN s_auart.
      APPEND i_stocktab.
    ENDSELECT.
    *DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM build_event.
    PERFORM build_print.
    PERFORM calc_total.
    PERFORM display_alv_report.
    *       FORM build_fieldcatalog                                       *
    FORM build_fieldcatalog.
      w_cnt = 1.
      it_fieldcat-fieldname = 'KUNAG'.
      it_fieldcat-seltext_m = 'Soldtp'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-key = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NAME1'.
      it_fieldcat-seltext_m = 'Name'.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'ORT01'.
      it_fieldcat-seltext_m = 'City'.
      it_fieldcat-col_pos = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    *  w_cnt = w_cnt + 1.
    *  it_fieldcat-fieldname = 'INC01'.
    *  it_fieldcat-seltext_m = 'Incoterms'.
    *  it_fieldcat-emphasize = 'X'.
    *  APPEND it_fieldcat TO it_fieldcat.
    *  CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'VKGRP'.
      it_fieldcat-seltext_m = 'Sales Group'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'FKIMG'.
      it_fieldcat-seltext_m = 'Invoiced Qty'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-ref_tabname  = 'VBRP' .
      it_fieldcat-ref_fieldname = 'FKIMG' .
      it_fieldcat-do_sum = 'X' .
    * *it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      clear it_fieldcat .
      it_fieldcat-fieldname = 'NETWR'.
      it_fieldcat-seltext_m = 'Invoiced Value'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-ref_tabname  = 'VBRP' .
      it_fieldcat-ref_fieldname = 'NETWR' .
      it_fieldcat-do_sum = 'X' .
    * it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    ENDFORM.
    *       FORM build_layout                                             *
    FORM build_layout.
      gr_layout-no_input = 'X'.
      gr_layout-colwidth_optimize = 'X'.
      gr_layout-totals_text = 'Totals: '(201).
      gr_layout-detail_popup = 'X'.
    ENDFORM.
    *       FORM build_event                                              *
    FORM build_event.
      DATA i_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = gr_events[].
      READ TABLE gr_events WITH KEY name = slis_ev_user_command
      INTO i_event.
      IF sy-subrc = 0.
        MOVE gr_user TO i_event-form.
        APPEND i_event TO gr_events.
      ENDIF.
    ENDFORM.
    *FORM calc_total.
    * LOOP AT it_fieldcat into wa_fieldcat
    * WHERE fieldname EQ 'FKIMG' OR
    * fieldname EQ 'NETWR'.
    * wa_fieldcat-do_sum = 'X'.
    * wa_fieldcat-datatype = 'QUAT'.
    * modify it_fieldcat from wa_fieldcat.
    * ENDLOOP.
    *ENDFORM.
    FORM build_print.
      gr_print-reserve_lines = '2'.
      gr_print-no_coverpage = 'X'.
    ENDFORM.
    *       FORM calc_total                                               *
    FORM calc_total.
      DATA: total TYPE REF TO data,
      subtotal1 TYPE REF TO data.
    *  FIELD-SYMBOLS <fkimg> LIKE sflight.
    *  FIELD-SYMBOLS <netwr> LIKE sflight.
    *  CALL METHOD grid1-> get_subtotals
    *  IMPORTING
    *  ep_collect00 = subtotal
    *  ep_collect01 = total.
    *  ASSIGN total TO <fkimg>.
    *  ASSIGN total TO <netwr>.
    ENDFORM.
    *& FUNCTION ALV DISPLAY
    FORM display_alv_report.
      gr_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gr_repid
                i_callback_user_command = slis_ev_user_command
                i_callback_top_of_page  = 'TOP-OF-PAGE'  " see FORM
                is_layout               = gr_layout
                it_fieldcat             = it_fieldcat[]
                it_special_groups       = gr_tab_group
                i_save                  = 'X'
                it_events               = gr_events
                is_print                = gr_print
           TABLES
                t_outtab                = i_stocktab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.
    *       FORM top-of-page                                              *
    FORM top-of-page.
    *ALV Header deaclarations
      DATA: t_header TYPE slis_t_listheader,
      wa_header TYPE slis_listheader,
      t_line LIKE wa_header-info,
      ld_lines TYPE i,
      ld_linesc TYPE c.
    *Title
      wa_header-typ = 'H'.
      wa_header-info = 'Report for daily Stock Returns'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    *Total No. Records Selected
      DESCRIBE TABLE i_stocktab LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records Selected:' ld_linesc
      INTO t_line SEPARATED BY space.
      wa_header-typ = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = t_header.
    ENDFORM.

  • Displaying some records at a time

    does anyone know how to display only 10 records at one time from the database followed by the next button to display next 10 etc?

    can anyone check this:
    what does this mean?
    String sql_2=request.getParameter("sql_2");
    anything missing?
    <%@ page language="Java" import = "java.sql.*" %>
    <jsp:useBean id="myBean" scope ="session" class="bean.DataConnectionBean" />
    <html>
    <body bgcolor="#CCFFFF">
    <%
    String sql; //SQL string
    int rowPerPage=10; //Record size of one page
    int rowTotal; //Total records
    int pageTotal; //Total pages
    int pageIndex; //Pages waiting for display, from 1
    pageIndex = Integer.parseInt( request.getParameter("page") );
    rowTotal=Integer.parseInt( request.getParameter("rowTotal") );
    String sql_2=request.getParameter("sql_2");
    String sql_1= "select " +
    "vin, " +
    "ga_no, " +
    "ga_build_date, " +
    "deliver_date, " +
    "model, " +
    "year_code, " +
    "engine_no, " +
    "initial_mileage " +
    "from vehiclemaster " +
    "where ";
    sql=sql_1+sql_2;
    myBean.connect();
    ResultSet rs=myBean.executeQuery(sql);
    pageTotal = (rowTotal+rowPerPage-1) / rowPerPage; // Get total pages
    if(pageIndex>pageTotal) pageIndex = pageTotal;
    %>
    <table border="0" cellpadding="2" cellspacing="0">
    <tr>
    <td align="left">
    <div align="left">Total <%=rowTotal%> Records</div>
    </td>
    </tr>
    </table>
    <table border="0" width="844">
    <tr bgcolor="#669966">
    <th>VIN</th>
    <th>GA#</th>
    <th>build date</th>
    <th>deliver date</th>
    <th>model</th>
    <th>model year code</th>
    <th>engine#</th>
    <th>initial mileage</th>
    </tr>
    <%
    int absolute=(pageIndex-1) * rowPerPage;
    for(int k=0; k<absolute; k++) rs.next();
    int i = 0;
    String LineColor;
    while( rs.next() && i<rowPerPage && (absolute+i)<rowTotal ){
    String col1=( ( ( col1=rs.getString(1) ) == null || rs.wasNull() ) ? "" : col1 );
    String col2=( ( ( col2=rs.getString(2) ) == null || rs.wasNull() ) ? "" : col2 );
    String col3=( ( ( col3=rs.getString(3) ) == null || rs.wasNull() ) ? "" : col3 );
    String col4=( ( ( col4=rs.getString(4) ) == null || rs.wasNull() ) ? "" : col4 );
    String col5=( ( ( col5=rs.getString(5) ) == null || rs.wasNull() ) ? "" : col5 );
    String col6=( ( ( col6=rs.getString(6) ) == null || rs.wasNull() ) ? "" : col6 );
    String col7=( ( ( col7=rs.getString(7) ) == null || rs.wasNull() ) ? "" : col7 );
    String col8=( ( ( col8=rs.getString(8) ) == null || rs.wasNull() ) ? "" : col8 );
    if (i % 2 == 0) LineColor="#DBECFD";
    else LineColor="#C6E1FD";
    %>
    <TR bgcolor="<%= LineColor %>">
    <TD><%=col1%></TD>
    <TD><%=col2%></TD>
    <TD><%=col3%></TD>
    <TD><%=col4%></TD>
    <TD><%=col5%></TD>
    <TD><%=col6%></TD>
    <TD><%=col7%></TD>
    <TD><%=col8%></TD>
    </TR>
    <%i++;
    }%>
    </table>
    <div align="center">
    <table border="0" align="left">
    <tr>
    <td align="left">
    <div align="left">Page <%=pageIndex%> / <%=pageTotal%> 
    <%if(pageIndex<pageTotal){%>
    <a href="QueryVehicleResult.jsp?sql_2=<%=sql_2%>&rowTotal=<%=rowTotal %>&page=<%=pageIndex+1%>"><img src="images/next.gif" border="0">
    </a>
    <%}%>
    <%if(pageIndex>1){%>
    <a href="QueryVehicleResult.jsp?sql_2=<%=sql_2%>&rowTotal=<%=rowTotal %>&page=<%=pageIndex-1%>"><img src="images/prev.gif" border="0">
    </a>
    <%}%>
    </div>
    </td>
    </tr>
    </table>
    </div>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </body>
    </html>
    <%
    rs.close();
    myBean.close();
    %>

  • CO-PA Account Based - Summarization built but no records!

    Our CO-PA AB extractor has not been functional for a while in test. Production is fine. To remedy, the R/3 folks have rebuilt the summarization levels. Ran for 3 days but finished OK. The status is now "Active". In the details screen the K8XXXXX tables - Key and Totals - have records. The Build panel has a record count but the Update panel has 0 records. RSA3 to check the extractor brings back nothing  - times out. Running an infopackage - first replicating the datasource and reactivating TRs - still no records. Has anyone run into this before? Is there another step? Or another setting after the summarization runs that we have missed? Do records need to built for the Update panel - is that done through KEDU? Any help would be much appreciated. Thanks. Don

    Ravi - Thanks. The R/3 system (F) that feeds the dev BW enviroment is not modifiable so I would have to get it opened for this but it brings up an issue. Our company has R/3 D and Q systems but we are not connected to them for data. Extractor enhancement is done in D then moved quickly thru Q and then to F for testing. (Yes, the R/3 transport person is always complaining). There are some minor enhancements to this extractor that are waiting to move to F for testing - once we get data. I assume re-generating the datasource will have no impact on the transport moving through with those enhancements. Please let me know if that needs clarification. Thanks again.

  • Display the total number of rows for the report in OBIEE 11g

    Hi, In obiee 11g, the pagination will be 1-25. Is there any possiblity in obiee to show the total rows count next to pagination. Ex: if the result contains 120 rows. it should display after the pagination
    Records 1-25. Total of Records : 120
    Is there any way we can display the total number of rows for the report.
    Kindly help me.. Its very urgent requirement.
    MAny Thank in advacne

    Check this http://obiee100.blogspot.com/2011/07/display-total-number-of-records-in.html
    and
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10544/appsql.htm#CHDCDIDA
    You have to go something like as suggested in previous link.
    Mark as correct/helpful

  • Regarding Tcode S_ALR_87013018 List:Total Plan/Actual/Commitments

    Hi All,
    I have to write a Z Report which will be substitute of the transaction S_ALR_87013018(List:Total Plan/Actual/Commitments.) and need to add 2 new columns in the output of the current transaction.
    I am stuck up for the logic of retrieving the following columns in the output list by providing the value of internal order/order group on the selection screen :-
    1) Overall plan---The overall summary plan value for the life of the order.
    2) Actual----
    Total expenditures recorded against an internal order.
    3) Commitment-Total commitment recorded against an internal order.
    Please provide me the logic and table names from where I can retrieve these values on the basis of internal order numbers.
    Your responses are appreciated.
    Regards,
    Amitanshu

    Hi,
    As far as I can see all three columns you have mentioned are included in standard report. So why donu2019t you simply copy report 6OPL-001 to your own report via TA GRR1.
    Btw, you should also create your own report group as it is not advisable to include customer specific reports in SAP standard report groups.
    With best regards
    Karl

  • How to get sub and grand total

    Dear all, I have a report which combines the two totals together and and makes one formula. This formula then is filtered according to Group2 (Reason Code).
    Group 1 is the same Reason Code however with Specified names. Group2 is the same reason code however with ascending order.
    My question is how to make the sub total and grand total of this formula.
    Detailed Information:
    1: Total One - DistinctCount(Order_no),GroupName2 -- In this Total, the records are counted when Linetype = F
    2: Total Two - DistinctCount(Order_no),GroupName2 -- In this Total, the records are counted when Linetype = S
    Formula
    Whileprintingrecords;
    Numbervar x:=0;
    Numbervar y:=0;
    Numbervar z:=0;
    x:={#FOCTC};
    y:={#CREDITTC};
    z:=x+y;
    z;
    Now this formula is placed in the footer of the Group2 (Reason Code).
    What I would like to do is to have a Group2 Sub Total and Finally Grand Total.
    I have tried the Following however it doesn't seem to be working.
    I created another formula exactly like above and placed it into the same Group footer however removed the "Numbervar o:=0;" (The numbervar z:=0; in the above case however when I created another formula I created named the variable "o" instead of "z") so that it does not reset it.
    Then I placed another formula into the Report Footer with the following code
    Whileprintingrecords;
    Numbervar o;
    Any ideas?
    Many thanks
    Regards
    Jehanzeb

    Ok sorted, I used another formula like this.
    Whileprintingrecords;
    Numbervar TJGs;
    Numbervar TotalJobs=0;
    Numbervar CAvg=0;
    TotalJobs := {@TotalFOCCR}; 
    CAvg:= TotalJobs;
    TJGs:=TJGs + CAvg;
    CAvg
    It sorted the issue.

  • SQL*Loader- Records Rejected - Error on table ORA-01722: invalid number

    Getting the following errors :
    Please tell me where I am going wrong?
    Attached is the log file and snippets of datafile along with the control file !!
    Also please direct me how can i upload 4900 records at one go?
    SQL*Loader: Release 11.1.0.7.0 - Production on Fri Oct 14 03:06:06 2011
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Control File: sample.ctl
    Data File: Cities.csv
    Bad File: Cities.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table CITY, loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    ID FIRST * , CHARACTER
    NAME NEXT 35 , ' CHARACTER
    COUNTRYCODE NEXT 3 , ' CHARACTER
    POPULATION NEXT * WHT CHARACTER
    Record 1: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 4: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 5: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 6: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 7: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 8: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 9: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 10: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 11: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 12: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 13: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 14: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 15: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 16: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 17: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 18: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 19: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 20: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 21: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 22: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 23: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 24: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 25: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 26: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 27: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 28: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 29: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 30: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 31: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 32: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 33: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 34: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 35: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 36: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 37: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 38: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 39: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 40: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 41: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 42: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 43: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 44: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 45: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 46: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 47: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 48: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 49: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 50: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 51: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table CITY:
    0 Rows successfully loaded.
    51 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 35840 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 64
    Total logical records rejected: 51
    Total logical records discarded: 0
    Run began on Fri Oct 14 03:06:06 2011
    Run ended on Fri Oct 14 03:06:12 2011
    Elapsed time was: 00:00:06.18
    CPU time was: 00:00:00.03
    my control file (sample.ctl):
    load data infile 'Cities.csv'
    into table city
    fields terminated by ','
    (id integer external,
    name char(35) enclosed by "'",
    countrycode char(3) enclosed by "'",
    population integer external terminated by '\n'
    my datafile (Cities.csv) (it contains 4900 records, but I am showing here just 4 records for ease)
    3830,'Virginia Beach','USA',425257
    3831,'Atlanta','USA',416474
    3832,'Sacramento','USA',407018
    3833,'Oakland','USA',399484
    Thanks in advance!!

    Look that when I change a little bit your datafile as follows
    1,'Kabul','AFG',1780000
    2,'Qandahar','AFG','237500'
    3,'Herat','AFG','186800'  I got the same error (2 last rows rejected for the same error invalid number)
    mhouri > select * from cities;
            ID NAME                                COU POPULATION
             1 Kabul                               AFG    1780000
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Oct 14 10:38:06 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   cities.ctl
    Data File:      cities.dat
      Bad File:     cities.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table CITIES, loaded from every logical record.
    Insert option in effect for this table: INSERT
       Column Name                  Position   Len  Term Encl Datatype
    ID                                  FIRST     *   ,       CHARACTER           
    NAME                                 NEXT    35   ,    '  CHARACTER           
    COUNTRYCODE                          NEXT     3   ,    '  CHARACTER           
    POPULATION                           NEXT     *  WHT      CHARACTER           
    Record 4: Rejected - Error on table CITIES, column ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 2: Rejected - Error on table CITIES, column POPULATION.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table CITIES, column POPULATION.
    ORA-01722: invalid number
    Table CITIES:
      1 Row successfully loaded.
      3 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  35840 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             4
    Total logical records rejected:         3
    Total logical records discarded:        0
    Run began on Fri Oct 14 10:38:06 2011
    Run ended on Fri Oct 14 10:38:06 2011
    Elapsed time was:     00:00:00.23
    CPU time was:         00:00:00.09Population value within the data file should be a number
    Best regards
    Mohamed Houri

  • Number of records in DSO

    Can anyone tell me how to find out the total of records that get loaded to DSO? When I clicked view data, didn't find any button to display the number of records in this DSO.

    go to se11 ..give your DSO technical name...and hit F4 you should get 2 entries..
    say your DSO is ZDMDTRNS then you get to see
    /BIC/AZDMDTRNS00               ODS Object ZDMDTRNS : Active Records
    /BIC/AZDMDTRNS40               DataStore Object ZDMDTRNS : Update

  • Color the subtotal record in LV list display

    hi all,
    I have a requirement where I have to provide different color to subtotal levels.
    as of now I have total, sub total and sub sub total levels in my display. So the problem is that though total record is coming in diffrernt color but the sub total and sub sub total level records are displayed in same color. this is creating problem for user to differentiate between them.
    kindly let me know if smone has worked on same kind of requirement.

    Hi,
    Check this link
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Reward if this helps,
    Satish

Maybe you are looking for

  • Error message VF 217 when creating downpayment request in VF01

    Dear Experts, We use milestone billing. I did all the necessary settings in customizing. Here is an example for a billing plan billing date    date description   billing rule   date category billing type 28.02.2010  0009                      5       

  • How to get the attribute...?

    well im trying to create JTable from a vector which will contain random Objects from random classes haveing random number of attributes for example: class x{ int id; String name; String surname; class y { String title; String author; etc. like i said

  • Pre-written text not appearing

    When I'd like to make a new search or change a web page's address for example, clicking on the search bar or text input location takes me to where i can write or input my own text (onscreen keyboard) but the pre-written text or previous search isn't

  • Problem syncing image files after OS5 upgrade.

    Lost all my image files with upgrade. Do not use Touch for Music, movies, podcasts - just images and a few apps. Tried restore to factory settings so now also lost my apps! I am trying to sync using Itunes>Photos>All folders but after about 15 mins j

  • HT203167 How can I combine 2 Itunes accounts

    How can I combine two i tunes accounts?