Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to give no of lines per page in alv report

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi,

the number of lines per page is variable on the screen because it depends on screen resolution, gui settings and enlargement of window.

When printing, it is determined by the printer and print format used.

What di you want to achieve? - please explain.

Regards,

Clemens

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi,

the number of lines per page is variable on the screen because it depends on screen resolution, gui settings and enlargement of window.

When printing, it is determined by the printer and print format used.

What di you want to achieve? - please explain.

Regards,

Clemens

Former Member
0 Kudos

hi

thanx for ur reply

actually i need some n lines for every page and i want to put bottom of page for each page

if posssible send the code

it ll be very helpful to me

thanx

kals.

anilnal
Explorer
0 Kudos

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.

Former Member
0 Kudos

thanx for ur reply

is it possible to send the entire code

it is very helpful to me

i need it

thanx

kals.