Quantcast
Channel: Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 141

Enable filter line on ALV table on POWL application.

$
0
0

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:


1.png

This functionality exists in POWL_TABLE_COMP webdynpro component.

 

Go to POWL_TABLE_COMP à Navigate to view à Method : DO_HOUSEKEEPING



2.png


Now implement overwrite exist enhancement to this method as follows.

 

Click on respective button under overwrite column.

 

3.png

And click on Enhancement button.


4.png


Now create enhancement as below.


5.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_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.


6.png


KEEP SHARING

Venky
















Viewing all articles
Browse latest Browse all 141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>