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 Filter Issue

Former Member
0 Likes
3,353

Hello Experts,

I have created an ALV report, which have two custom buttons to select and de-select the values in the ALV display. When I filter the ALV with any fields and then select all button in ALV, then it is selecting all the rows in the ALV irrespective of the filtered values.

How can I check which values are filtered and ignore these filtered values and select only the rows which are displayed in the ALV after filtering.

Please help and thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,032

DATA: lobj_grid  TYPE REF TO cl_gui_alv_grid.

data: lt_filtered TYPE LVC_T_FIDX.

  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
      e_grid = lobj_grid.

  CALL METHOD lobj_grid->GET_FILTERED_ENTRIES
     IMPORTING
       ET_FILTERED_ENTRIES = lt_filtered.

lt_filtered values contains tabix values which were filtered.

Hello Experts,

I have created an ALV report, which have two custom buttons to select and de-select the values in the ALV display. When I filter the ALV with any fields and then select all button in ALV, then it is selecting all the rows in the ALV irrespective of the filtered values.

How can I check which values are filtered and ignore these filtered values and select only the rows which are displayed in the ALV after filtering.

Please help and thanks in advance.

3 REPLIES 3
Read only

rajkumarnarasimman
Active Contributor
0 Likes
2,032

Hi Shravan,

I hope using filter event in ALV Grid display, we can highlight the selected row. I didn't tried the below, but by using the below steps, i hope it will work.

  1. Add a separate field in the final structure (ty_final) which represents the row color(color).
  2. Add the code inside the event, If filter is triggered, change the color of the selected row during runtime.

Regards

Rajkumar Narasimman

Read only

Former Member
2,032

Hi,

By Using the Ref_TABNAME and REF_FIELDNAME in the fieldcatalog, the filtering works.

Read only

Former Member
0 Likes
2,033

DATA: lobj_grid  TYPE REF TO cl_gui_alv_grid.

data: lt_filtered TYPE LVC_T_FIDX.

  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
      e_grid = lobj_grid.

  CALL METHOD lobj_grid->GET_FILTERED_ENTRIES
     IMPORTING
       ET_FILTERED_ENTRIES = lt_filtered.

lt_filtered values contains tabix values which were filtered.