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: 

OOPS ALV grid with previous and next buttons

former_member415039
Participant
0 Kudos

Hi All,

As a part of requirement we have to select 100 rows to be displayed in OOPS ALV grid. After performing some actions on the rows , we have to display the next hundred rows for fresh processing. Plan is to use custom 'PREVIOUS' and 'NEXT' buttons on the grid toolbar .Could suggest a idea/tip to get 100 records as default and when 'NEXT' button is clicked to get other 100 and also to show the previous selected 100 records when the 'PREVIOUS' button is clicked. How to keep track of old 100 records ?

Thanking in advance,

Regards,

Ram

6 REPLIES 6

Sandra_Rossi
Active Contributor
0 Kudos

That would help if you explain why you must display by groups of 100 rows + do you display them sorted by a unique key + what kind of action you perform on the rows (update a status in database?) + what ABAP release you have (some recent features might be used).

former_member415039
Participant
0 Kudos

Hi Sandra,

Thank you for the reply. Yes we do display them by sorted by unique key. Update the row with document status that is linked to a business object( ex. VBRK) via archive link. ABAP release is 7.20

0 Kudos

7.20... 7.02 you mean?

Sandra_Rossi
Active Contributor
0 Kudos

If you sort the ALV by a unique key, then pressing the NEXT button may load the rows after the last unique key of the current page, replace the ALV internal table, and refresh the screen.

0 Kudos

Hi Sandra,

Ok..will do as suggested

DoanManhQuynh
Active Contributor
0 Kudos

If you already load all data into internal table, your can get 100 rows per time to lets say a display internal table and pass it to ALV, you can keep track it with index or key of table. it might a little complicate to control the display (depend on your requirement). If you want to select 100 rows per time from database and display in ALV, I think it impossible.