Removing columns heading for a perticular page in ALV list display

Dear All,
For last page of my ALV list display i need to remove columns heading (Strictly for single page only).
Kindly help me with possible solution.
I am triggering page break by  using group attribute in the sort catalogue.(  l_v_sortcat-group     = '* '. )
Best Regards
Ravishekar Thallapally

if u can catch the page number,
while building fieldcat, put the condition
if sy-page = (page number)
ls_fielcact-fieldname = fieldname.
ls_fieldcat-tech = 'X'.
LS_FIELDCAT-NO_OUT = 'x'.
modify lt_fielcat from ls_fieldcat.
but how r u catching page number?? can u pls tell
endif.
Message was edited by: Hymavathi Oruganti

Similar Messages

  • How To avoid column heading for only total line in ALV list Display

    Hi,
    How To avoid column heading for only total line in ALV list Display.

    Hi,
    to change colunm header field catlog is built
    look at the example below
    Changing column text headers
    use this to change, hide, or alter the ALV columns
    CLEAR: gt_fcat.
    READ TABLE gt_fcat WITH KEY fieldname = 'TEXT1' " ***
    *TEXT1 is your field name
       ASSIGNING <gtfcat>.
    IF sy-subrc = 0.
       <gtfcat>-coltext   = 'Date Type'.
       <gtfcat>-no_out    = ' '.
       <gtfcat>-tooltip   = 'Date Type Text from IT0019'.
       <gtfcat>-seltext   = 'IT0019'.
    keep seltext to '' if u want to hide
    ENDIF.
    regards
    austin

  • How to give colors to the top-of-page in ALV List Display

    how to give colors to the top-of-page in ALV List Display....

    Check this blog.........
    It provides your required output...........
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    See the point 7 for complete code...
    Regards,
    Pavan

  • How to print header lines at the top of every page with Alv list display?

    Dear all,
    I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
    The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          is_layout                = ls_layo
          it_fieldcat              = lt_fcat
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = ls_variant
          it_events                = lt_events
        TABLES
          t_outtab                 = lt_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and lt_events as below:
      ls_event-name = 'END_OF_LIST'.
      ls_event-form = 'ALV_END_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'ALV_END_OF_PAGE'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_LIST'.
      ls_event-form = 'ALV_TOP_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'ALV_TOP_OF_PAGE'.
      APPEND ls_event TO lt_events.
    So, how can I print header lines for every page?
    Best Regards,

    Hello Saba,
    Your point might be very close to solution.
    Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
    reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
      CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
        EXPORTING
          it_fieldcat_lvc         = gt_fcat
        IMPORTING
          et_fieldcat_alv         = lt_fcat
        EXCEPTIONS
          it_data_missing         = 1
          it_fieldcat_lvc_missing = 2
          OTHERS                  = 3.
      CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
        EXPORTING
          it_fieldcat = lt_fcat
        IMPORTING
          e_width     = l_width.
    WRITE l_reptx TO l_reptx CENTERED.
      NEW-LINE.
      WRITE: AT (l_width) l_reptx CENTERED.
      SUBTRACT 10 FROM l_width.
      WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary       = lt_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    Do you have other suggestions ?

  • Removing the header and footer in Pages

    I just began to use Pages after purchasing a new ibook. In AppleWorks, headers and footers were never inserted by default. In Pages, how can I remove the header and footer in Pages so I can have more space for the body section of the document?

    I had already set page margins to zero, and I disagree with you: Headers and footers still appear with a height of approximately 1/8 inch.
    SInce I posted my previous message, I have experimented a bit. I was able to (almost but not quite) totally eliminate the header and footer by clicking into the header and footer area and reducing the font size to the absolute minimum. After having done that, the body was basically in-line with 0" on the vertical page ruler.
    Also, in my opinion, whether or not most printers do a full page bleed is irrelevant. I should be able to work with the page body without its being offset from the page ruler if I don't want to employ a header or footer.
    Rusty

  • Column header in all the pages

    Hi all,
    I have designed the Account Statement report for banking application. In this report i want to show all the credit and depit history for the particular account. So that i have grouped this report based on account number.
    In this report i am not using report header and column header for showing the report title and coulmn name. Because i want to show the report title and column header for all the selected accounts. So that i have devided the account number group into two part(header a and header b) and in the first part(header a) i am showing the report title(Deposit Account Statement) and in the second part(header b) is showing the column header(such as txn date, txn description, debit amount and etc...).
    In this design i want to show the column header(header b) alone for all the pages.
    Please help me for this issue.

    Hi,
    If u want to display each item of group header on each page,then check the option repeat group header on each page in group expert.
    And if u want display only one part of group header in each page, then u may create a formula in section expert for suppress and write if groupNumber>1.
    I hope this will work.
    Regards,
    Misra P.

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • How to display a Column Header for the characteristic Text column

    Hi All
    Our users want me to provide for a column header for the characteristic text.
    Here is what I mean
    I am reporting 0plant in the rows as key and Text. In the column on Plant Key the column header says Plant but there is no column header for the plant text.
    Eq:
    Plant                                                        Amount
    IE00         Initiator Plant                               244
    IE01         Initiator Plant NJ                          890
    Our users in the plant text column want a dummy column header to be displayed. SInce they download the data from the BW report to Excel and use pivot reporting. How can I introduce a column header for the texts.
    Thanks
    Karen

    Hi Karen,
    I am not sure if this is possible, although Users can ask anything :).
    In Planning we used to predefine cell headings via Macros and creating dummy cells in between.  I am not sure if a similar scenario can work here.
    By default this is not possible in Reports.  In BEx workbooks, you could probably try with Macros.
    Another easy option is to bring the data in the Cube as another field or create a nav. attribute in the master for text and use it as a nav. attr. in the Cube and put it in your Query row alongside.
    -Aby

  • JTable - One Column Heading for Two Columns

    Can you adjust the default JTable to have one column heading for two columns of data? Is there a simple span command? I've looked at the api for JTable and JTableHeader and didn't see anything, is there something I'm missing? Any help would be appreciated.

    What i am trying to accomplish is have column 'E' span 2 columns.
    This is my code thus far, however it give the error from my pryor message. I am pretty sure it is because I'm using and Object[][] and a String[] instead of Vectors. What corrections do I need to make in order for my goal of:
    [ A ][ B ][ C ][ D ][ E  ][ F ][ G ]
    [ 1 ][ 2 ][ 3 ][ 4 ][5][6][ 7 ][ 8 ]
    Object[][] data = new Object[ROWS][COLUMNS];
    String[] columnNames = {"A","B","C","D","E","E","F","G"};
    table = new JTable(data, columnNames);
    table.setBackground(Color.white);
    table.addKeyListener(this);
    DefaultTableCellRenderer d = new DefaultTableCellRenderer();
    d.setHorizontalAlignment(JLabel.CENTER);
    table.setDefaultRenderer(table.getColumnClass(0),d);
    for (int i = 0; i < table.getColumnCount(); i++){
    TableColumn aColumn = header.getColumnModel().getColumn(i);
    TableCellRenderer renderer = aColumn.getHeaderRenderer();
    if (renderer == null) {
    renderer = new DefaultTableCellRenderer(){
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column){
    JTableHeader header = table.getTableHeader();
    if (header != null) {
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    setHorizontalAlignment(JLabel.CENTER);
    setText((value == null) ? "" : value.toString());
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    return this;
    aColumn.setHeaderRenderer(renderer);

  • How to devide the top of page in alv grid display

    hi all
    in the alv grid display am getting the page number and total number of pages in the left hand side
    but what i need is i need in the right hand side
    how to get that

    Hi,
    PLease refer to the code below:
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    * Form  TOP-OF-PAGE                                                 *
    * ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    * Total No. of Records Selected
      describe table it_ekko 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.
    *            i_logo             = 'Z_LOGO'.
    endform.
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
    *     Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
    *       Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
    *       Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    Thanks,
    Sriram Ponna.

  • TOP OF PAGE in ALV Grid Display in ECC 6.0

    Hi,
    I have an issue with top of page in Alv grid display
    in ECC 6.0. I searched  the forum for this, but
    couldnt fine any solution.
    I am using Reuse_alv_commentary_write to display the header.
    It's working fine in 4.7E but the same code is not working in
    ECC 6.0. The header is shown as  empty.
    I tried to execute some other programs with same FM and
    even standard SAP Prgrms too, even they raise the same issue
    the top of page is empty.
    Please suggest any other FM or approach to use in ECC 6.0 to get the top of page.
    Thanks in advance
    Kaavya.

    hiii
    use following code
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
    *     I_CALLBACK_PF_STATUS_SET          = ' '
    *     I_CALLBACK_USER_COMMAND           = ' '
         I_CALLBACK_TOP_OF_PAGE            = 'F0020_TOP_OF_PAGE'
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
         i_structure_name                  = 'I_OUTPUT'
    *     I_BACKGROUND_ID                   = ' '
    *     I_GRID_TITLE                      =
    *     I_GRID_SETTINGS                   =
    *     IS_LAYOUT                       = wa_layout
         it_fieldcat           = i_fieldcat
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
    *     IT_SORT                           =
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
         i_default                         = 'X'
         i_save                            = 'X'
         is_variant                        = wa_variant
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *     IS_PRINT                          =
    *     IS_REPREP_ID                      =
    *     I_SCREEN_START_COLUMN             = 0
    FORM f0020_top_of_page.
      DATA: i_listheader TYPE slis_t_listheader WITH HEADER LINE,
            w_date like sy-datum.
      move:
        'H'   TO i_listheader-typ,
        '                 Corporation'   TO i_listheader-info.
    *    text-021    TO i_listheader-info.
    *write: 'Camtura Corporations'.
      APPEND i_listheader.
      WRITE sy-datum TO w_date.
      move:
        'S'   TO i_listheader-typ,
        'Execution date'   TO i_listheader-key,
        w_date     TO i_listheader-info.
      APPEND i_listheader.
    regards
    twinkal

  • To get top-of-page in alv list

    How get top-of-page using reuse_alv_list_display ?
    How to get checkbox into that top-of-page ? And how to access that checkbox whether it is checked or not ? And if checked to get into next step of program promptly ?

    hai  Anirban Datta,
    REPORT YBALV_FULLSCREEN_DEMO NO STANDARD PAGE HEADING.
    *"General Data
    TYPE-POOLS: SLIS.
    DATA: BEGIN OF GT_OUTTAB OCCURS 0.
            INCLUDE STRUCTURE SFLIGHT.
    DATA: END OF GT_OUTTAB,
          GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
          G_EXIT_CAUSED_BY_CALLER,
          GS_EXIT_CAUSED_BY_USER TYPE SLIS_EXIT_BY_USER,
          G_REPID LIKE SY-REPID.
    *"Callback
    DATA:
        GT_EVENTS      TYPE SLIS_T_EVENT,
        GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
        G_STATUS_SET   TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET',
        G_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND',
        G_TOP_OF_PAGE  TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
        G_TOP_OF_LIST  TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST',
        G_END_OF_LIST  TYPE SLIS_FORMNAME VALUE 'END_OF_LIST'.
    *"Variants
    DATA: GS_VARIANT LIKE DISVARIANT,
          G_SAVE.
    INITIALIZATION.
    G_REPID = SY-REPID.
    PERFORM LAYOUT_INIT USING GS_LAYOUT.
    PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
    GS_VARIANT-REPORT = G_REPID.
    G_SAVE           = 'A'.
    START-OF-SELECTION.
    *"Data Selection
      PERFORM SELECT_DATA TABLES GT_OUTTAB.
    END-OF-SELECTION.
    *"List Header for Top-Of-Page
    PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
    *"Display List
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
           I_BACKGROUND_ID    = 'ALV_BACKGROUND'
           i_buffer_active    = 'X'
           I_CALLBACK_PROGRAM = G_REPID
           I_STRUCTURE_NAME   = 'SFLIGHT'
           IS_LAYOUT          = GS_LAYOUT
           I_SAVE             = G_SAVE
           IS_VARIANT         = GS_VARIANT
           IT_EVENTS          = GT_EVENTS[]
         I_SCREEN_START_COLUMN    = 0     "Use coordinates for
         I_SCREEN_START_LINE      = 0     "display as dialog box
         I_SCREEN_END_COLUMN      = 0
         I_SCREEN_END_LINE        = 0
      IMPORTING
           E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
           ES_EXIT_CAUSED_BY_USER  = GS_EXIT_CAUSED_BY_USER
      TABLES
           T_OUTTAB = GT_OUTTAB
      EXCEPTIONS
           PROGRAM_ERROR = 1
           OTHERS        = 2.
    IF SY-SUBRC = 0.
      IF G_EXIT_CAUSED_BY_CALLER = 'X'.
    *"  Forced Exit by calling program
    *"  <do_something>.
      ELSE.
    *"  User left list via F3, F12 or F15
        IF GS_EXIT_CAUSED_BY_USER-BACK = 'X'.       "F3
    *"    <do_something>.
        ELSE.
          IF GS_EXIT_CAUSED_BY_USER-EXIT = 'X'.     "F15
    *"      <do_something>.
          ELSE.
            IF GS_EXIT_CAUSED_BY_USER-CANCEL = 'X'. "F12
    *"        <do_something>.
            ELSE.
    *"        should not occur!
    *"        <do_Abnormal_End>.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ELSE.
    *"Fatal error callin ALV
    MESSAGE AXXX(XY) WITH ...
    ENDIF.
    *"Form routines
    FORM SELECT_DATA TABLES RT_OUTTAB LIKE GT_OUTTAB[].
    *"- Selection of data to be displayed
      SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS
                       OF TABLE RT_OUTTAB
                       UP TO 00030 ROWS.
    ENDFORM.
    FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    *"Build layout for list display
      RS_LAYOUT-DETAIL_POPUP      = 'X'.
    ENDFORM.
    FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
    *"Registration of events to happen during list display
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
          EXPORTING
               I_LIST_TYPE = 0
          IMPORTING
               ET_EVENTS   = RT_EVENTS.
      READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO RT_EVENTS.
      ENDIF.
    ENDFORM.
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
               I_LOGO             = 'ENJOYSAP_LOGO'
                IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM .
    FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
                                            SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
    LIST HEADING LINE: TYPE H
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      LS_LINE-INFO = TEXT-100.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
    STATUS LINE: TYPE S
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = TEXT-101.
      LS_LINE-INFO = TEXT-102.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      LS_LINE-KEY  = TEXT-103.
      LS_LINE-INFO = TEXT-104.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
    ACTION LINE: TYPE A
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      LS_LINE-INFO = TEXT-105.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
    ENDFORM.
    Regards.
    Eshwar.

  • Total of page with ALV LIST

    Hi,
    I want to display on TOP of PAGE : X page / Total page with ALV LIST.
    here is my code :
    FORM eventtab_build USING lt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = lt_events.
      READ TABLE lt_events WITH KEY name =  slis_ev_top_of_page
      INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
      READ TABLE lt_events WITH KEY name =  slis_ev_end_of_list
                                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE 'END-OF-LIST' TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    ENDFORM.                    "eventtab_build
    FORM top_of_page.
      DATA: t_header TYPE slis_t_listheader,
      wa_header TYPE slis_listheader.
      DATA : lv_desc(15) TYPE c,
             lv_month(2) TYPE c,
             lv_year(4) TYPE c.
      DATA : pageno(2) TYPE c.
      lv_month = sd_augdt-high+4(2).
      lv_year  = sd_augdt-high(4).
      SELECT SINGLE ltx FROM t247 INTO lv_desc WHERE mnr = lv_month
      AND spras = sy-langu.
      WRITE : /1 sd_bukrs-low.
      SKIP 1.
      WRITE : 50 'RELEVE DES ACHATS LIVRAISONS FACONS'.
      WRITE : /52 '& TRAVAUX EFFECTUES AU MAROC'.
      WRITE : /54 'OUVRANT DROIT AU DEDUCTION'.
      SKIP 1.
      WRITE : /1 'IDENTIFIANT FISCAL :', '1234',135 'REGIME : ENCAISSEMENT'.
      SKIP 1.
      IF NOT dtab-mwskz IS INITIAL.
        WRITE : /54 'Code TVA: ',dtab-mwskz.
      ENDIF.
    WRITE : 135 'Page No :', sy-pagno RIGHT-JUSTIFIED.
      WRITE : /2 'MOIS :',lv_desc,20 lv_year.
      SKIP 1.
      pageno = sy-pagno.
      wa_header-typ = 'H'.
      CONCATENATE 'PAGE NO : ' pageno ' of ' '****' INTO
      wa_header-info SEPARATED BY space.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
         it_list_commentary = gt_list_top_of_page.
        it_list_commentary = t_header.
    ENDFORM.                    "top_of_page
    please, give me a guidance.
    Best regards.

    Hi Please refer this program. You have not written exact problems here. Anyways refer below code:-
    REPORT ZRIL_ALVEVENTS .
    TYPE-POOLS : SLIS.
    DEFINITION OF DATA INTERNAL TABLE
    DATA : IT_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT.
    DEFINITION OF FIELDCATALOG INTERNAL TABLE
    DATA : WA_FCAT TYPE SLIS_FIELDCAT_ALV, "WORK AREA FOR FIELD CATALOG
                 IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DEFINITION FOR EVENT TABLE
    DATA : IT_EVENTS TYPE SLIS_T_EVENT,
                 WA_EVENTS TYPE SLIS_ALV_EVENT. "WORK AREA FOR EVENT"
    DEFINE THE NAME LIST HEADER
      DATA : FORMNAME TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST'.
    DEFINE THE TABLE FOR LIST OF ACTION ON EVENT SPECIFIED IN LIST HEADER
      DATA : IT_ACTION TYPE SLIS_T_LISTHEADER,
      WA_ACTION TYPE SLIS_LISTHEADER. " WORK AREA FOR LIST OF "
    *POPULATE DATA FROM SFLIGHT TABLE
    SELECT * FROM SFLIGHT INTO TABLE IT_SFLIGHT.
    MAKE THE FIELDCATALOG TABLE FOR SFLIGHT
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME =
    I_STRUCTURE_NAME = 'SFLIGHT'
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME =
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = IT_FCAT
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    GET THE LIST OF EVENTS IN EVENT INTERNAL TABLE
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = IT_EVENTS
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    GET THE NAME OF EVENT (TOP-OF-LIST) FROM LIST OF EVENTS IN EVENT TABLE
    READ TABLE IT_EVENTS
    WITH KEY NAME = SLIS_EV_TOP_OF_LIST
    INTO WA_EVENTS.
    IF READ OPERATION SUCCESSFUL
    MOVE NAME OF LIST HEADER INTO WORK AREA OF EVENTS
    AND APPEND THAT WORK AREA TO EVENTS TABLE THAT CONTAINS LIST OF
    EVENTS
    IF SY-SUBRC = 0.
    MOVE FORMNAME TO WA_EVENTS-FORM.
    APPEND WA_EVENTS TO IT_EVENTS.
    ENDIF.
    SPECIFY ONE ACTON ON EVENT IN WORK AREA AND APPEND THAT ACTION TO
    TABLE OF ACTION
    WA_ACTION-TYP = 'H'.
    WA_ACTION-INFO = TEXT-001.
    APPEND WA_ACTION TO IT_ACTION.
    CLEAR WA_ACTION.
    WA_ACTION-TYP = 'S'.
    WA_ACTION-KEY = TEXT-002.
    WA_ACTION-INFO = TEXT-003.
    APPEND WA_ACTION TO IT_ACTION.
    CALL THE SUBROUTINE TO DISPLAY THE LIST
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT =
    IT_FIELDCAT = IT_FCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_SFLIGHT
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FUNCTION MODULE THAT WILL BE CALLED AUTOMATICALLY WHEN THE
    TOP-OF-LIST EVENT IS TRIGGERED.
    FORM TOP_OF_LIST.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_ACTION
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    Regards
    Abhii..
    Edited by: Abhii on Nov 10, 2009 1:00 PM

  • How to give color of particular cell in alv list display for dynamic table

    Dear Experts,
    i want to give color of a particular cell in alv list display (reuse_alv_list_display). Here i am passing data through dynamic table?

    Hi,
    Se this:
    DATA: lt_color    TYPE lvc_t_scol WITH HEADER LINE.
    DATA: BEGIN OF data_tab OCCURS 0.
             tabcolor     TYPE   lvc_t_scol,
          END OF data_tab.
    * Befone ALV call
      alv_layout-coltab_fieldname  = 'TABCOLOR'.
    * For each row in data_tab
    REFRESH: lt_color.
    CLEAR: lt_color.
    lt_color-color-col = 6.
    lt_color-color-int = 1.
    lt_color-fname = FIELD1'.
    APPEND lt_color.
    lt_color-color-col = 2.
    lt_color-color-int = 0.
    lt_color-fname = 'FIELD2'.
    APPEND lt_color.
    data_tab-tabcolor[] = lt_color[].
    append data_tab.
    Best regards,
    Leandro Mengue

  • End of page in alv list output.

    Hi All,
    Can any body help me out for how to show end of page in alv list output.
    Thanks,
    Rakesh Singh

    Refer this link:
    http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
    Regards,
    Ravi

Maybe you are looking for

  • Deprecated API and RFC connection issues in PI 7.1

    Hi all, I am new to this Forum.. I am working in File to Proxy scenario where i am using UDF to implemnt few functions. But i am getting the following Error : Source text of object Message Mapping: MM_FILE_10_943 | urn://fiat.com/mm/if_10_943 has syn

  • External 1TB harddrive failed to mount

    Hi all, after some happy time using my external 1TB WD drive it seems hard times comes. It failed mount, no matter what I try. I really don't know, what else I should do. I don't want to use any recover software, if possible. Please advise any help,

  • How to set default view in Adobe Reader 9?

    I am trying to figure out how to set adobe reader so that when you open a document you automatically get the page view on the right side come up and the document in full mode.  I have researched registry edits and also the customize wizard with no lu

  • Question about the cache

    So I never really worried or cleared the cache in the past year on this computer. I occasionally cleared the cookies from time to time, but I never let Firefox clear cache or cookies due to me wanting to have some passwords saved on some sites and au

  • IMovie/iPhoto questions

    I want to create either a video or a photo slide show of some newspaper headlines to load on my website. Could someone explain how to do this? Is there a way that I could get these articles off of newspaper archive to iMove or iPhoto?