Skip to Content

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:


/wp-content/uploads/2013/12/1_339713.png

This functionality exists in POWL_TABLE_COMP webdynpro component.

Go to POWL_TABLE_COMP à Navigate to view à Method : DO_HOUSEKEEPING



/wp-content/uploads/2013/12/2_339714.png


Now implement overwrite exist enhancement to this method as follows.

Click on respective button under overwrite column.

/wp-content/uploads/2013/12/3_339715.png

And click on Enhancement button.


/wp-content/uploads/2013/12/4_339716.png


Now create enhancement as below.


/wp-content/uploads/2013/12/5_339717.png



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_visiblenone ).
    
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_visiblevisible ).
    
ENDIF.


Now execute the POWL and we can see the filter line on the table for all queries.


/wp-content/uploads/2013/12/6_339718.png


KEEP SHARING

Venky















To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Gabriel Paolo Isidro

    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?

    (0) 

Leave a Reply