Enable filter line on ALV table on POWL application.
Summary:
Enable filter Line on table by default on POWL application.
Requirement:
In the standard behavior POWL will show filter on table after you click on filter link on the right hand top side of the table. With the same link we can show or hide the filter option on table.
But if we have a requirement to show the filter option on table by default, here is the solution for POWL or other webdynpro supported applications.
Solution: Steps to implement the solution:
This functionality exists in POWL_TABLE_COMP webdynpro component.
Go to POWL_TABLE_COMP à Navigate to view à Method : DO_HOUSEKEEPING
Now implement overwrite exist enhancement to this method as follows.
Click on respective button under overwrite column.
And click on Enhancement button.
Now create enhancement as below.
Every time you do modification always recommended to use the same enhancement for the one functionality chance.
Now go to overwrite page and copy of all code from the original method. And go to overwrite method and copy all the code.
Now trace/debug for exact location to implement your functionality. In this case copy the below code after line no: 42.
lr_alv_model->if_salv_wd_std_functions~set_filter_filterline_allowed( abap_true ).
lr_alv_model->if_salv_wd_std_functions~set_filter_complex_allowed( abap_true ).
IF first_time IS NOT INITIAL.
cl_salv_wd_model_table_util=>if_salv_wd_table_util_funcs~set_functions_visible(
r_model = lr_alv_model
VALUE = cl_wd_uielement=>e_visible–none ).
ELSE.
cl_salv_wd_model_table_util=>if_salv_wd_table_util_funcs~set_functions_visible(
r_model = lr_alv_model
VALUE = cl_wd_uielement=>e_visible–visible ).
ENDIF.
Now execute the POWL and we can see the filter line on the table for all queries.
KEEP SHARING
Venky
Hi Venky,
Thanks for useful blog. Keep posting.
Thanks
KH
Hi,
Thank you for this blog, actually implemented this, but i want to take it much farther by providing the default value to be filtered... for example there is a column date, so what i need is to default it to current year.. i've got the solution already but the thing is.. in ESS..
Appraisal - Others it is working, but in Appraisal - Self it doesnt. When i debug right both are going through the same code and creating my filter but upon output it doesn't work for Appraisal-Self... am i missing something here?