cancel
Showing results for 
Search instead for 
Did you mean: 

ALV - Close the filter line automatically

Former Member
0 Kudos

Hi all,

I need to imitate the "delete filter" event.

I've succeeded in removing all filter values from all fields using:

   cl_salv_wd_model_table_util=>IF_SALV_WD_TABLE_UTIL_FIELDS~DELETE_FILTER_RULES( lo_value ).

Now I need to close the filter line.

Please advise,

Aviad

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aviad,

You can use the method IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED of class CL_SALV_WD_CONFIG_TABLE to hide the filter line.

Create an instance of the ALV using the following code: (assuming the alv usage is ZALV)

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

lo_cmp_usage =   wd_this->wd_cpuse_zalv( ).IF lo_cmp_usage->has_active_component( ) IS INITIAL.
  lo_cmp_usage->create_component( ).
ENDIF.

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

DATA lv_config TYPE REF TO cl_salv_wd_config_table.

lo_interfacecontroller = wd_this->wd_cpifc_zalv( ).
lv_config = lo_interfacecontroller->get_model(  ).

Use the method on lv_config to set the value.

Hope it helps.

Regards,

Sayan

Former Member
0 Kudos

Hi,

That would hide the filter line completely.

All I need is to close the line.

Aviad