Skip to Content
avatar image
Former Member

Filtering Existing ALV Grid

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    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

    Sathya

    Add comment
    10|10000 characters needed characters exceeded