How to give no of lines per page in alv report

hi
could anybody tell me
how to give no of lines per page in alv report
i need bottom of page too
if possible plz send the code too
it ll be very helpful to me
thanx
kals.

Hi,
This is possible, using some of the events in the ALV.
You could use AFTER_LINE_OUTPUT event and call you form after say, a certain line count is reached on the list output.
  MOVE 'AFTER_LINE_OUTPUT' TO gw_event-name.
  MOVE 'AFTER_LINE_OUTPUT' TO gw_event-form.
  APPEND gw_event TO gt_events.
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            it_events                = gt_events[]
and define the form for each event as follows - this would be a dynamic call by the ALV.
*&      Form  after_line_output
*       Form for the After Line Output Event in the internal table
*      --> rs_lineinfo
FORM after_line_output USING rs_lineinfo TYPE slis_lineinfo.
  IF sy-linno eq v_linno.          "Defaulted value for line count
    perform write_footer.
    NEW-PAGE.
  ENDIF.
ENDFORM.                    " after_line_output
For lines per page:
rs_lineinfo-tabindex would give you the index of the current line in the list, which you could use to read the t_outtab table, and reduce the line count of items displayed on the earlier page.
There are a few other events too, like BEFORE_LINE_OUTPUT and END_OF_LIST which you can use as required and print the data.
Regards,
Anil.

Similar Messages

  • How to display values in top of page in ALV report

    Hai,
      This is my billing report program, i developed that object by using ALV but i could not able to use Top-of-page. please any one correct my code,
    *& Report  ZE0232_ALV_BILLING                                          *
    report  ze0232_alv_billing.
    type-pools: slis.
    data: repid like sy-repid.
    data: fieldcatalog type slis_t_fieldcat_alv,
          wa_fieldcatalog type slis_fieldcat_alv.
    data : ievent type slis_t_event,
    wevent type slis_alv_event.
    data: sal_text like tvkot-vtext,
          DIS_TEXT LIKE TVTWT-VTEXT,
          DIV_TEXT LIKE TSPAT-VTEXT.
    tables: vbrk.
    data: begin of i_vbrk occurs 0,
          vbeln like vbrk-vbeln,
          fkdat like vbrk-fkdat,
          erdat like vbrk-erdat,
          kunrg like vbrk-kunrg,
          name1 like kna1-name1,
          netwr like vbrk-netwr,
          stext like tvkot-vtext,
          dtext like tvtwt-vtext,
          divtext like tspat-vtext,
          end of i_vbrk.
    selection-screen begin of block billing with frame.
    parameters: salesorg like vbrk-vkorg.
    select-options: dischanl for vbrk-vtweg,
                    division for vbrk-spart,
                    bildat for vbrk-fkdat.
    selection-screen end of block billing.
    select vbeln fkdat erdat kunrg netwr from vbrk into corresponding fields of table i_vbrk where vkorg = salesorg
                                                                                    and vtweg in dischanl
                                                                                    and spart in division
                                                                                    and fkdat in bildat.
    select vtext from tvkot into sal_text where vkorg = salesorg and spras = 'EN'.
    endselect.
    select vtext from TVTWT into DIS_text where VTWEG IN dischanl and spras = 'EN'.
    endselect.
    select vtext from TSPAT into DIV_text where SPART IN DIVISION and spras = 'EN'.
    endselect.
    loop at i_vbrk.
      move: sal_text to i_vbrk-stext,
            DIS_TEXT TO I_VBRK-DTEXT,
            DIV_TEXT TO I_VBRK-DIVTEXT.
      modify i_vbrk.
    endloop.
    perform get_fieldcatalog.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
        i_callback_program                = repid
      I_GRID_TITLE                      =
        i_callback_top_of_page            = 'TOPS'
        it_fieldcat                       = fieldcatalog
      tables
        t_outtab                          = i_vbrk
    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.
    *&      Form  GET_FIELDCATALOG
          text
    <b>form tops.
      write :/ 'Hai Welcome'.
    endform.                    "tops</b>&----
    *&      Form  get_fieldcatalog
          text
    form get_fieldcatalog.
      wa_fieldcatalog-col_pos = '1'.
      wa_fieldcatalog-fieldname = 'VBELN'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'SALES DOCUMENT'.
    WA_fieldcatalog-rollname  = 'VBELN'.
      wa_fieldcatalog-hotspot   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-fieldname = 'FKDAT'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'BILL DATE'.
    WA_fieldcatalog-rollname  = 'VBELN'.
    WA_fieldcatalog-hotspot   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '3'.
      wa_fieldcatalog-fieldname = 'ERDAT'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'CREATED DATE'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '4'.
      wa_fieldcatalog-fieldname = 'KUNRG'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'CUSTOMER NO'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '5'.
      wa_fieldcatalog-fieldname = 'NAME1'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'CUSTOMER NAME'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '6'.
      wa_fieldcatalog-fieldname = 'NETWR'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'NET VALUE'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '7'.
      wa_fieldcatalog-fieldname = 'STEXT'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'SALES ORG'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '8'.
      wa_fieldcatalog-fieldname = 'DTEXT'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'DIS.CHANNEL'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
      wa_fieldcatalog-col_pos = '9'.
      wa_fieldcatalog-fieldname = 'DIVTEXT'.
      wa_fieldcatalog-tabname   = 'I_VBAK'.
      wa_fieldcatalog-seltext_m = 'DIVISION'.
      append wa_fieldcatalog to fieldcatalog.
      clear wa_fieldcatalog.
    endform.                    "GET_FIELDCATALOG

    HI see this report
    you can know how to write TOP-OF_PAGE code
    and insert LOGO also
    *& Report  ZTEST_ALV_LOGO
    REPORT  ztest_alv_logo.
    TYPE-POOLS : slis.
    *ALV Formatting tables /structures
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: gt_events   TYPE slis_t_event.
    DATA: gs_layout   TYPE slis_layout_alv.
    DATA: gt_page     TYPE slis_t_listheader.
    DATA: gs_page     TYPE slis_listheader.
    DATA: v_repid     LIKE sy-repid.
    *ALV Formatting work area
    DATA: w_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_events   TYPE slis_alv_event.
    DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
    INITIALIZATION.
      PERFORM build_events.
      PERFORM build_page_header.
    START-OF-SELECTION.
    *perform build_comment.     "top_of_page - in initialization at present
      SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
    *perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
    *USING = Row, Column, Field name, display length, table name, heading
    *OR
      PERFORM build_fieldcat.
      gs_layout-zebra = 'X'.
    *top of page event does not work without I_callback_program
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program                = v_repid
          i_structure_name                  = 'BSID'
       i_background_id                   = 'ALV_BACKGROUND'
          i_grid_title                      = 'This is the grid title'
      I_GRID_SETTINGS                   =
          is_layout                         = gs_layout
          it_fieldcat                       = gt_fieldcat[]
          it_events                         = gt_events[]
        TABLES
          t_outtab                          = gt_bsid.
    Form..............:  populate_for_fm
    Description.......:  Populates fields for function module used in ALV
    FORM populate_for_fm USING p_row
                               p_col
                               p_fieldname
                               p_len
                               p_table
                               p_desc.
      w_fieldcat-row_pos      = p_row.          "Row Position
      w_fieldcat-col_pos      = p_col.          "Column Position
      w_fieldcat-fieldname    = p_fieldname.    "Field name
      w_fieldcat-outputlen    = p_len.          "Column Lenth
      w_fieldcat-tabname      = p_table.        "Table name
      w_fieldcat-reptext_ddic = p_desc.         "Field Description
      w_fieldcat-input        = '1'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " populate_for_fm
    *&      Form  build_events
    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_user_command
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_user_command TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_top_of_page
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_top_of_page TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " build_events
    *&      Form  USER_COMMAND
    When user command is called it uses 2 parameters. The itab
    passed to the ALV is in whatever order it currently is on screen.
    Therefore, you can read table itab index rs_selfield-tabindex to get
    all data from the table. You can also check r_ucomm and code
    accordingly.
    FORM user_command USING  r_ucomm     LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      READ TABLE gt_bsid INDEX rs_selfield-tabindex.
    error checking etc.
      SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
    ENDFORM.                    "user_command
    *&      Form  top_of_page
    Your own company logo can go here if it has been saved (OAOR)
    If the logo is larger than the size of the headings in gt_page,
    the window will not show full logo and will have a scroll bar. Thus,
    it is a good idea to have a standard ALV header if you are going to
    use logos in your top of page.
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_page
          i_logo             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "top_of_page
    *&      Form  build_fieldcat
    *Many and varied fields are available here. Have a look at documentation
    *for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
    FORM build_fieldcat.
      w_fieldcat-fieldname  = 'BUDAT'.
      w_fieldcat-seltext_m  = 'Dte pst'.
      w_fieldcat-ddictxt(1) = 'M'.
      w_fieldcat-edit = 'x'.
    Can change the position of fields if you do not want them in order
    of the DDIC or itab
    w_fieldcat-row_pos = '1'.
    w_fieldcat-col_pos = '10'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " build_fieldcat
    *&      Form  build_page_header
          gt_page is used in top of page (ALV subroutine - NOT event)
          *H = Header, S = Selection, A = Action
    FORM build_page_header.
    For Headers, Key is not printed and is irrelevant. Will not cause
    a syntax error, but is not used.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 2'.
      APPEND gs_page TO gt_page.
    For Selections, the Key is printed (bold). It can be anything up to 20
    bytes. It gets printed in order of code here, not by key value.
      gs_page-typ  = 'S'.
      gs_page-key  = 'And the winner is:'.
      gs_page-info = 'Selection 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'S'.
      gs_page-key  = 'Runner up:'.
      gs_page-info = 'Selection 2'.
      APPEND gs_page TO gt_page.
    For Action, Key is also irrelevant.
      gs_page-typ  = 'A'.
      gs_page-info = 'Action goes here'.
      APPEND gs_page TO gt_page.
    ENDFORM.                    " build_page_header
    <b>Reward if useful</b>

  • How to give the no of lines per a page in alv report

    hi
    could u plz inform me
    how to give the no of lines per page in alv report
    in ordinary report we can give line-count na
    how can we give in alvs.
    thanx
    kals.

    Hi Kalyan,
    There is another Forum(Abap Development) where u can post abap related stuffs and u can also get quick answers there..
    Cheers...
    Santosh

  • How to get Fixed lines per page  ? really Urgent !!!

    I am facing problem with the fixed lines per page. The Footer block(Subtotal) is moving up leaving space at the bottom when the number of items is less.
    I have a two groups : one for KIT ITEMS and other for KIT COMPONENTS. When i am generating report for only KIT ITEMS i am getting fixed footer by using
    <xsl:variable name="no_of_lines_per_page" select="number(30)"/>
    <[email protected]:Q1?>
    <xsl:variable xdofo:ctx="incontext" name="inner_group" select=".//Q2"/>
    <?for-each:$inner_group?><?if:(position()-1) mod $no_of_lines_per_page=0?>
    <xsl:variable name="first_rec" xdofo:ctx="incontext" select="position()"/>
    but when i try generate the report in combination with KIT COMPONENTS together, i am not able to fix the number of lines per page. The Footer is going into next page. Now i have Q2 and Q3 where Q2 is Parent Kit Item and Q3 is Child Kit Components.
    How can i get fixed lines per page for Q3 with respect to Q2 ?
    I would really appreciate if anyone can reply me fast.

    Hi Thanks for the link.I used the code which is there in this link. It is working for the items coming from Q2( Kit Parent Items) , but I want fixed number of lines combine for both Kit parent and its kit components( i.e Q2 and Q3 ). Could you please tell me , code to get fixed number of lines for this. It is really very urgent.

  • Report error using landscape style, lines per page errors.

    Hi
    A Custom report(use character units in designer,11 X 8.5, stadard settings...) developed(reports 2.5 on apps 11), which was working fine previously using standard landscape. The report produces exactly 56 lines physically per page.
    Now, in applications ,landscape print style is properties changed, number of rows changed from 66 to 57.
    Now report gives error:
    'M_XXXX_GRPFR' is not fully enclosed by its enclosing object 'Body'. M_XXXX_GRPFR is the outer most frame in my report layout.
    (I tried increasing page size, etc, no use, same error)
    Now, I don't understand why it is giving error, as, it prints only 56 physical lines per page when I see the output file generated.
    Is that landscape is defined as 57 rows, but it is not exactly 57 physical lines? Because when I took out some stuff from report layout, which now produces only 45 physical lines, it is working fine.
    But, I have all 57 phyiscal lines in the report that I want it to work, any suggestions?
    Thanks
    Rathan.
    null

    Hi,
    Try this, i might work for you.
    <?for-each:Q1?>
    Here, place KIT ITEM Data table
    Below that:
    <xsl:variable name="no_of_lines_per_page" select="number(30)"/>
    <xsl:variable xdofo:ctx="incontext" name="invLines" select=".//Q2"/>
    <?for-each:$invLines?><?if:(position()-1) mod $lpp=0?> <xsl:variable name="start" xdofo:ctx="incontext" select="position()"/>
    [here KIT COMPONENTS tabel will start]
    [In table first cell again start for-each group like below]
    <?for-each:$invLines?><?if:position()>=$start and position()<$start+$lpp?> ---this is in table first cell
    [in rest of cells, put your columns xml tags]
    <?end if?><?end for-each?> - in last cell.
    this is end of Q2 table.
    After that put a page break
    <xsl:if xdofo:ctx="inblock" test="$start+$lpp<=count($invLines)"><xsl:attribute name="break-before">page</xsl:attribute></xsl:if> -- page break outside the Q2 table.
    Now close the invlines for-each group
    <?end if?><?end for-each?>
    Close the Q1 for-each group.
    <?end for-each?>

  • Control Lines per Page

    I need some information on how to control the number of lines that print on a page. I have designed a purchase order .rtf template. I can only print so many po lines per page and still leave room for a footer to print at the bottom of each page. Thanks for any help...

    See this
    Can you limit returned rows in a loop?
    See this thread ,
    you can do
    1. page-break
    2. sub-totalling
    3. control number of rows displayed in a page
    Re: Can you limit returned rows in a loop?

  • 25 lines per page?

    How do I set up pages to have exactly 25 lines per page?
    Thanks in advance!
    Jessica

    Welcome to Apple Discussions
    Create a page that looks just the way you want it, with 25 lines in the typeface and point size you want to use. Adjust the top and bottom margins to fit those 25 lines. Save as template. Always use that template and do not change type size or line spacing.
    Walt

  • How can I print multiple photos per page?  It was simple in earlier versions of iPhoto.

    How can I print multiple photos per page?  It was simple in earlier versions of iPhoto.

    Do you want to print several different photos per page or multiples of the same photo?
    If you want to print several different photos,select them all at once and press command-P for "Print".  Pick the Custom Layout and adjust the photo size suitably.
    If you want multiples of the same photo, duplicate the photo several times and select all copies at once, then press command-P.

  • Deskjet 5525 printing random characters, one line per page when printing both sides of page

    Hi. I have a deskjet 5525 wireless all in one printer. 
    I have installed all of the necessary hardware and have updated it. We have two computers running windows 7, 64 bit. I have not been able to update the firmware on the printer because the HP Device Updater program that does it cannot communicate with the printer via usb cable or wireless on two different computers I have tried.
    When trying to print two sided documents, it will print ok for about two pages, but then, it will start printing on line per page of random characters, blurred lines of text, gargabe basically.
    This is the second printer as the vendor replace the first one with the same problem. You would say, oh a software problem, but I have reinstalled the HP Deskjet 5520 series SW a couple of times, reinstalled the printer, but the problem continues. 
    An old HP deskjet 3845 worked for us pretty well on the same computers.
    Please help.

    Hi Onemangosta,
    I would like to help with the garbled text you are experiencing. I have found a great document for you to use and I can also help you with the firmware update.
    Troubleshoot text that might be gibberish, nonsense, or look garbled or scrambled
    In order to update the firmware on your printer ensure the printer is on the wireless network and touch the Web Services icon (this icon is the 1st of the 4 that run across the top of the front panel - looks like 2 little cell phones). Scroll through the Web Services menu, find and select Product Updates, select Check for Product Updates.
    If the printer is already up to date the front panel will say so, if it is not, the download and install will begin. It is possible you were unable to do the update form the computer because the printer does not need an update. The HP Device Updater will only see a printer that requires the update.
    Hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • HT202879 How can I make labels 30 per page?

    How can I make labels 30 per page?

    Using what application on what Mac running what version of OS X?

  • How to limit the no of records per page in crystal reports 2008

    I have to limit the number of records =10 per page in crystal reports 2008.
    Any help appreciated.

    Hi,
    1. Open the report in Design View
    2. Right click on the Details section and select Section Expert
    3. Make sure the Details section is selected in the Section Expert dialog box. goto paging tab
    Check the box that says u201CNew Page Afteru201D
    4. Click the formula editor button to the right of the checkbox.
    5. Enter the following formula
    if Remainder (RecordNumber, 10) = 0 then true else false
    6. Click Save and Close and then click OK.
    If you run the report it should break after each 10 rows.
    @Sri
    Edited by: Sri kamesh on Jun 22, 2011 1:50 PM

  • 12 Vertical panels per page in oracle report 10g

    Hi,
    I need to create a report which is having 12 constant pages (12 logical pages). So i changed the Vertical panels per page of the reports main section to 12 (50 is max supported by oracle). And in the paper layout i have to drag the main repeating frame to 12th page (i.e from 1st page to 12th page). but it shows 10 pages in reports paper layout without margin. If i on the edit margin then it shows 12 pages. But if i on the edit margin i can able to drap the my frame. So any way to do that.
    Pls help me to short out this.
    Regrads
    Balaji.M

    Hi
    Thanks for your suggestion.
    However we have conluded the answer with my manager' help.
    Here is how :
    After spending many hours, finally we didi as below :
    Develop Data model with relevent query.
    Develop report laoyout using reportg wizard with 'No Template'(do not make manual layout).
    Now select the very first outer frame and extend this frame to three or four pages as per requirement.
    (Do not change any other layout coordinae values)
    Now run the report, the report will give expected output.
    -----------------

  • How to declare top of page in alv report

    hi guru
    how to declare top of page in alv report
    thanks
    subhasis

    Hi,
    check this simple program.
    REPORT ZBHALV_LIST.
    TABLES:MARA.
    SELECT-OPTIONS: MATNR FOR MARA-MATNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    ERSDA LIKE MARA-ERSDA,
    MTART LIKE MARA-MTART,
    MBRSH LIKE MARA-MBRSH,
    END OF ITAB.
    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE MATNR
    IN MATNR.
    TYPE-POOLS SLIS.
    DATA:FCAT TYPE slis_t_fieldcat_alv.
    DATA:LAYOUT TYPE slis_layout_alv.
    DATA:EVE TYPE slis_t_event WITH HEADER LINE.
    DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SORT-UP = 'X'.
    SORT-SPOS = 1.
    SORT-FIELDNAME = 'ERSDA'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    SORT-SPOS = 2.
    SORT-FIELDNAME = 'MTART'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    EVE-NAME = 'TOP_OF_PAGE'.
    EVE-FORM = 'TOPOFPAGE'.
    APPEND EVE.
    EVE-NAME = 'TOP_OF_LIST'.
    EVE-FORM = 'TOPOFLIST'.
    APPEND EVE.
    EVE-NAME = 'END_OF_LIST'.
    EVE-FORM = 'ENDOFLIST'.
    APPEND EVE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-no_hline = 'X'.
    LAYOUT-NO_VLINE = 'X'.
    LAYOUT-window_titlebar = 'MATERIAL DETAILS'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = SY-REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = 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.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    IT_SORT = SORT[]
    IT_EVENTS = EVE[]
    TABLES
    T_OUTTAB = ITAB .
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM TOPOFPAGE.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM TOPOFLIST.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS-LISTTOP'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM ENDOFLIST.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS-LISTEND'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    Regards,
    Priyanka.

  • How to display multi line headings in procedural alv report

    Hi experts,
    How to display multi line heading in alv( procedural alv report) report.
    some columns single line and some columns multi line in the same report.
    ex: 
                  solvent consumed          solvent recovered
                   fresh |   recovery             recovery | spent                            batch no                         storage
    I am using procedural alv .pls give me idea.

    Hi Ram,
    Check the sample report [how to display multi line headings in procedural alv report|http://sample-code-abap.blogspot.com/2008/01/printing-multiple-line-header-and.html]
    Thanks,
    Duy

  • How doi print Any variable at the end of page in ALV report?

    Hi,
    Anyone can tell me that How do i print Any variable at the end of page in ALV report?
    Exmale: at the ende of alv report i want to print total no of employee who has taken house loan or education loan.

    Hi,
    Go through these links
    Thread in sdn regarding FOOTER IN ALV
    [ALV  FOOTER;
    Wiki in sdn regarding HEADER AND FOOTER IN ALV
    [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Objects%20-%20ALV%20Model%20-%20Using%20Header%20and%20Footer]
    Header and Footer in ALV
    [http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm]
    Hope this helps.
    Thank you,
    Pavan.

Maybe you are looking for

  • EAR Packaging with utility jars

    In my application , the EJB's as well as servlets user log4j.jar ( logging utility). I have included the log4j.jar in WEB-INF/classes folder of the war file. Do I have to include the log4j.jar in the ejb-jar file also ? Do I have to explode the log4j

  • PDFMaker hangs in Excel

    I am running MacOS10.3.9,and CS2. I am trying to create a pdf from an excel file, not password protected, and as a sample, only a couple of cells. I created and saved the doc, set up distiller to the settings I wanted, activated the doc, opened proje

  • What is the Pass % for SAP   Netweaver  C_TADM51_70  Certification this Yea

    Hi, can someone Help me to know What is the Pass % for SAP   Netweaver  C_TADM51_70  Certification @ teched this Year. We need to achieve the pass Critieria in Individual Sections or We need to Achieve the Pass Critieria / Marks in Overall all sectio

  • Apple Script - Simple Navigation thru Preferences

    Howdy, I'm trying to us Apple Script to simply change my Network Location. I thought it would be easy, I must be missing something. Here is the code I've written so far that works... tell application "System Preferences" activate set current pane to

  • Muse update

    Why my Muse update goes up to 35% and no further? How can I cancel it and try again? I'm using a PC.