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: 

Filtering Existing ALV Grid

0 Kudos
148

Hi,

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.

1 ACCEPTED SOLUTION

sathyags
Active Participant
60

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

Sathya

2 REPLIES 2

sathyags
Active Participant
61

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

Sathya

0 Kudos
60

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

It is solved now. 🙂