cancel
Showing results for 
Search instead for 
Did you mean: 

Filter option for table

Former Member
0 Kudos

Hi All,

I tried to create a sample program for applying filter to sflight table in webdynpro.

I am trying to follow the DEMO_TABLE example but am getting into trouble.

I also saw a toolbar being used in this example. Is it necessary?

Can any plz give the simple (necessary steps alone) steps to use filter for the table.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Toolbar is not necessarily required, in the demo using the toolbar button it is just explaining how you can turn off the filter row.

To use filters follow the steps.

1. create a node with cardinality 1..1, with the attributes on which you want the column to be filtered.

2. In the Layout bind the tablecolumn's filterValue property with the context attributes created in step 1

3. In Attributes tab of the view create an attribuet of type IF_WD_TABLE_METHOD_HNDL, to hold the method handler

4. fill the method handler in WDDOMODIFYVIEW using

data: l_table type ref to cl_wd_table.

  • Get reference of the table view element

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

  • Get reference to the Filter & Sorting API

wd_this->table_method_hndl ?= l_table->_method_handler.

5. onFilter of the table assign action in the event handler code as follows

wd_this->table_method_hndl->apply_filter( ).

Former Member
0 Kudos

Where is the toolbar used..

Former Member
0 Kudos

Hi Lekha,

In the DEMO_TABLE under the view SORT_AND_FILTER_VIEW toolbar is used.

Can anyone explain the steps. It would be very helpful

Former Member
0 Kudos

Try to follow this link for FILTER in table..

Where are you going wrong..

in that view specified, you have to implement all teh methods and teh code of that view..when you check the layout

under the TABLE a toolbar is added with a action attached to it..

For sort and filter also there are actions attached to it..

Just follow the layout and tryto use the methods...

Edited by: Lekha on Dec 8, 2009 12:13 PM

Former Member
0 Kudos

Hi,

Just follow the layout of that view, under TABLE, table columns and thier action...The coding as is you can copy..

then you can get it..