‎2007 Feb 23 6:00 AM
can we restrict the number of records to be displayed in an alv to the required number of records per page.
for ex: if we have 100 records and i want to display 10 records per page. and it shud be in 10 pages.
how can we do this?
‎2007 Feb 23 6:01 AM
‎2007 Feb 23 6:08 AM
‎2007 Feb 23 7:33 AM
have you declared a PF-status. or can you add two buttons to your alv toolbar.
‎2007 Feb 23 7:36 AM
then simply do this
inyour program
DESCRIBE TABLE itab LINES help.
IF help >= maxline.
zdiv = help MOD maxline.
count = 1.
APPEND LINES OF itab FROM 1 TO maxline TO it_out.
start = maxline + 1 .
ENDIF.
PERFORM alv_display.
in your user_command of alv do this
FORM <usr_comman_name> USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'NEXT'.
IF count NE zdiv.
count = count + 1 .
CLEAR it_out[].
end = start + maxline - 1.
APPEND LINES OF itab FROM start TO end TO it_out.
start = end.
PERFORM alv_display.
ELSE.
MESSAGE 'no more entries to be displayed' TYPE 'I' .
ENDIF.
ENDCASE.
ENDFORM.
to go back you can simply use the back button
i.e.F3
‎2007 Feb 23 6:24 AM
Hi,
The output of a ALV is in form of a Screen, which will not match with page size defined in the Line-Count defined, this things can only be defined in the print time if you are going for a grid output. Other wise if you are using the list output try this program BCALV_TEST_LIST_PRINT.
Hope that Helps
Anirban M.
‎2007 Feb 23 7:32 AM
hi,
can you add two buttons in your pf_status to go to the next and the previos page.
reply