cancel
Showing results for 
Search instead for 
Did you mean: 

Default filter on

Former Member
0 Kudos

Dear Experts,

Can anyone let me know how to make filter on by default in normal table . I've created a filter using this Link.

But when i click on filter button available in table, the filter row is getting enable. My requirement is by default i need to make the filter on .Pls let me know how to achieve this functionality.

Thanks

KH

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

for more info: you can take the help of following document.

Filtering in table UI element | Webdynpro ABAP

Former Member
0 Kudos

Hello Chandra,

My Requirement is like this as shown in snap shot

1) Initially the filter is off as shown below

2) When i click of the filter button availabe , It is appending initial row for filtering values.

So, now my requirement is i need to show default filter row even without click of filter button .Pls let me know how to achieve this functionlity.

Thanks

KH


Former Member
0 Kudos

Don't create any extra button or attribute like "IS_FILTER_ON'.

Just create 2 node (1. For table,  2. For Filter)

one attribute:  TABLE_HNDL type ref IF_WD_TABLE_METHOD_HNDL (in attribute tab of view)

"" Write this code in modify view...

DATA: lr_table TYPE REF TO cl_wd_table.

lr_table ?= view->get_element( 'TABLE' ).

wd_this->TABLE_HNDL ?= lr_table->_method_handler.

  lr_table_prod->set_on_filter( '<Filter_Method_name>' ).

"" this code in Filter method(Created with table).

  wd_this->TABLE_HNDL->apply_filter( ).

It should work directly. Its working for me too.

<Filter_Method_name> - Method name assign with onFilter property.

Former Member
0 Kudos

"" Write this code in modify view...

DATA: lr_table TYPE REF TO cl_wd_table.

lr_table ?= view->get_element( 'TABLE' ).

wd_this->TABLE_HNDL ?= lr_table->_method_handler.

"" this code in Filter method.

  wd_this->TABLE_HNDL->apply_filter( ).