cancel
Showing results for 
Search instead for 
Did you mean: 

Table UI Element Filter and sorting Functionality

Former Member
0 Kudos

Hello All,

When I search for the filter and sorting functionality in ABAP webdynpro Table UI Element(Not ALV). I didnot find any usefull answer....Can anyone help me on the below question?

I am trying to figure out how we can do the Filtering and sorting functionality for the table UI element. I know there are two evens for the table ONFILTER and ONSORT.

Do we need to explicitely code the logic??? In ALV Table filtering is handling automatically.....

In some threads I saw they are using apply_filter method for the onfilter event for the table . I am not sure how we can do this in Webdynpro for ABAP. In BSP Table view itself will do the Filtering logic.

Thanks in advance.]

Greetson

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

please check this <a href="/people/mohammed.anzys/blog/2007/07/22/webdynpro-abap-quick-tips-10table-column-sorting-in-four-steps for sorting functionalities

also see <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/frameset.htm">documentation</a>

the both eventhandlers should be implemented with

table_handler->apply_filter(). or table_handler->apply_sort().

grtz,

Koen

Answers (1)

Answers (1)

Former Member
0 Kudos

hi greetson......

you can use the event 'onfilter' that is available for the table ui element. you can define the logic for that.

---regards,

alex b justin

Former Member
0 Kudos

I know this .... I want to know is there a way that will automatically take care of both the filter and sorting logic... like what we have in BSP table view... for the filter functionality.

Thanks for your help....

Greetson

Former Member
0 Kudos

Hi,

there is no out of the box solution, without coding

grtz,

Koen

Former Member
0 Kudos

Hello Koren,

Your below answer solved the issue :

"Hi,

please check this weblog for sorting functionalities

also see documentation

the both eventhandlers should be implemented with

table_handler->apply_filter(). or table_handler->apply_sort().

grtz,

Koen "

I had rewared the points for you.

IN Justin's answer he wants us to write the logic for the filter and sorting on the filter events........ He didn't tell in detail as like you......

Thanks for your help.

Greetson

Former Member
0 Kudos

hello,

Below is the logic that I had implemented :

method WDDOMODIFYVIEW .

***Code in WDDOMODIFY*****************

data wd_table type ref to cl_wd_table.

check first_time = abap_true.

  • Name of the table UI element to be provided

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

wd_this->table_control ?= wd_table->_method_handler.

*Name of the key attribute of the context node to which the table binding is done to be provided

wd_this->table_control->set_key_attribute_name( 'CONNECTID' ).

endmethod.

method ONACTIONFILTER_DATA .

wd_this->table_control->apply_filter( ).

endmethod.

Thanks for your help.

Thanks,

Greetson

Message was edited by:

Greetson Shunmugasundaram