Application Development and Automation 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: 
Read only

ALV scroll event ?

Former Member
0 Likes
1,934

Hello,

I need to display a long list using a ALV display. For each line, there are data to be fetched from multiple tables so this can take quite long to accomplish. To avoid having users to wait while gathering the data for the whole list I would like to be able to gather only data for the lines visible at each time. So if a user scrolls down, I would select the data for the new lines displayed.

So I was wondering if anyone would know if there is an event in the ALV object which allows me to catch which lines are being displayed ? The method get_scroll_info_via_id would allow me to know which lines are displayed in the beginning but if a user scrolls down I have no information about this as an PBO event is not triggered.

So if anyone could advise me or has an alternative approach to this problem I would be very grateful.

Regards,

Sigurjon

1 ACCEPTED SOLUTION
Read only

former_member184313
Participant
0 Likes
1,253

Hi Sigurjon

This is just an idea, no solution

I fear there is no event fired for scrollbars at all. The only way i can think of is to give your user a button to read the next few (hundred) rows and one button to read it all. You could place them in the ALV Toolbar.

A different aporach to prevent long startup time was, to collect all the data in a Z-table during the night and then show this table inside the ALV. This way you have not very actual data, but a very short runtime.

cheers

daniel

Message was edited by: Daniel Sulzer

sorry, Srikanth's reply was not yet there when i wrote mine...

Hello,

I need to display a long list using a ALV display. For each line, there are data to be fetched from multiple tables so this can take quite long to accomplish. To avoid having users to wait while gathering the data for the whole list I would like to be able to gather only data for the lines visible at each time. So if a user scrolls down, I would select the data for the new lines displayed.

So I was wondering if anyone would know if there is an event in the ALV object which allows me to catch which lines are being displayed ? The method get_scroll_info_via_id would allow me to know which lines are displayed in the beginning but if a user scrolls down I have no information about this as an PBO event is not triggered.

So if anyone could advise me or has an alternative approach to this problem I would be very grateful.

Regards,

Sigurjon

3 REPLIES 3
Read only

Former Member
0 Likes
1,253

Any thoughts on how to approach this problem using ALV will be appreciated.

Best regards,

Sigurjó

Read only

Former Member
0 Likes
1,253

Hi,

One solution I can think of is to add your own button to the ALV Toolbar (Like "Show Next Page") and then limit the initial display to certain N number of lines..

And when user clicks on this button, you read next N number of records and then <b>add</b> these entries to the internal table that is used for ALV display and call REFRESH_TABLE_DISPLAY method..

Once you reach the end, just disable the button..

Since you are always adding the lines, if he wants to see previous page he can simply use paging keys or scrollbar...

Hope this helps..

May be you already know..but just..FYI, you can handle TOOLBAR event of ALV Grid to add your own buttons to the ALV Toolbar.. Please take a look at sample program BCALV_GRID_05 just in case you need reference on how to add the button..

Sri

Message was edited by: Srikanth Pinnamaneni

Read only

former_member184313
Participant
0 Likes
1,254

Hi Sigurjon

This is just an idea, no solution

I fear there is no event fired for scrollbars at all. The only way i can think of is to give your user a button to read the next few (hundred) rows and one button to read it all. You could place them in the ALV Toolbar.

A different aporach to prevent long startup time was, to collect all the data in a Z-table during the night and then show this table inside the ALV. This way you have not very actual data, but a very short runtime.

cheers

daniel

Message was edited by: Daniel Sulzer

sorry, Srikanth's reply was not yet there when i wrote mine...