Skip to Content

Filtering Existing ALV Grid

Jul 07, 2017 at 08:16 AM


avatar image
Former Member


I make a simple ALV Grid showing these fields :

Airlines Flight_No Availability

I put two buttons on a toolbar. One is for 'Showing All Flights' and the other one is 'Only Show Flights with available seats'.

At first load, I display all flights.

How to do a filter on the ALV Grid based on the user action ?

If there is not much trouble, would you guys give me examples of the code using both OOP method and non-OOP.

For now, what i have done is :

I just populate the records again and display it with

CALL METHOD g_grid->refresh_table_display.

I am not sure that is the best way, is there any other method that could do the filtering ?

Thank you very much.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sathya Gunasekaran Jul 07, 2017 at 10:13 AM

Hi Hendrick,

In ALV factory method, if you use the functions

lo_functions = lo_alv->get_functions( ).
lo_functions->set_all( ).

The filter option would let you do the filters on selected columns


e0qox.png (2.5 kB)
y6gap.png (3.4 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you for taking so long to say "THANKS".

It is solved now. :)