Skip to Content
avatar image
Former Member

Use filtered ALV table data in OOP

Is there an easy way of retrieving the ALV data that is displayed when there are also filters used on that ALV?

The ALV is an object of CL_GUI_ALV_GRID. When showing it to the user, there is a filter placed on it by default. The user also has a button that processes the data in the ALV. How can I make sure the process only works with the data that is displayed, even if the user places his own filters on the ALV?

e.g: An ALV gets created from an itab that has 10 rows, but because there is also a filter passed on the ALV, only 8 rows are showing. When pressing a button, I only want to work with the 8 rows currently showing to the user.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 19, 2017 at 10:54 AM

    Use method get_filtered_entries.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 19, 2017 at 02:22 PM

    Using method GET_FILTERED_ENTRIES you can get filtered values of the ALV. Exporting parameter ET_FILTERED_ENTRIES holds the filtered rows.

    Add comment
    10|10000 characters needed characters exceeded