cancel
Showing results for 
Search instead for 
Did you mean: 

How do I open an ALV with the filter row already displaying?

Former Member
0 Kudos

Hi,

Does anyone know how to have the filter line already displaying on initialization of an ALV grid? I would like to have the filter line on when I open the ALV rather than have the user having to press the filter option on the tollbar.

Thanks for any suggestions.

Tara

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

data lo_settings type ref to cl_salv_wd_function_std.

lo_settings = lr_model->if_salv_wd_function_settings~get_function_std( if_salv_wd_c_std_functions=>filter_delete ).

lo_settings->set_visible( ).

lo_settings = lr_model->if_salv_wd_function_settings~get_function_std( if_salv_wd_c_std_functions=>filter ).

lo_settings->set_visible( cl_wd_uielement=>e_visible-none ).

call method lr_model->if_salv_wd_std_functions~set_filter_complex_allowed

exporting

value = abap_true.

call method lr_model->if_salv_wd_std_functions~set_filter_filterline_allowed

exporting

value = abap_true.

Former Member
0 Kudos

Thank you. That worked very well.

Former Member
0 Kudos

Hi abhimanyu,

I am in requirement of providinga filter line by default. I have seen your thread which is related to my requirement, but in that, can u briefly explain about lr_model.

I am new to this webdynpro.

Thanks & Regards,

Akshay.

Former Member
0 Kudos

Hi Abhimanyu,

Thanks a lot. Ur code worked very well. Now my next issue is , user filters data based on some conditions ok. so after that if he wants to delete all those stuff from filter line using any button, suppose.

how to make that one possible.

can u provide me that code?

Thanks & Regards,

Akshay.

Answers (0)