Skip to Content
avatar image
Former Member

How to use a FILTER in a normal table in ABAP WEB DYNPRO

Hi Experts,

I need to Filter my table in UI using the 'onFilter' event,

BUT I want the first row of the table to be my INPUTS to do the filtering - JUST LIKE IN ALV TABLE,

since i dont want to use an ALV table, i want the same to be done in a transparent table...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 11, 2010 at 09:36 AM


    You can use the filter option in Normal table UI as well and when you switch the filter on you will get the option for input in the first row itself...

    you do not have to do anything for that.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 11, 2010 at 10:50 AM

    Dear pramodh,

    Here u can achieve filter option in transparent table by creating a button(Toggle) in table.

    1.Now you need to apply filter in OnToggle event.

    wd_this->table_control->apply_filter( ).

    2.when the Filter button is pressed IS_FILTER_ON attribute will turn ON and FILTER will be set.

    And Automatically the First row is set for INPUTS.

    The Following Code is required to get Handler for Table and also to SET FILTER.


    DATA: wd_table TYPE REF TO cl_wd_table,

    w_is_filter_on TYPE wdy_boolean.

    wd_context->get_attribute( EXPORTING name = 'IS_FILTER_ON'

    IMPORTING value = w_is_filter_on ).

    wd_table ?= view->get_element( '<give ur table ID>' ).

    wd_this->table_control ?= wd_table->_method_handler.

    IF w_is_filter_on = abap_true.

    wd_table->set_on_filter( 'FILTER' ).


    wd_table->set_on_filter( '' ).



    I believe u know about Table Handler. And i can help if u need.

    Thanks & Regards,

    Rakesh Vanamala.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi everyone,

      You shall create an attribute IS_FILTER_ON of type WDY_BOOLEAN or BOOLEAN in the context of the view or component controller.

      As you can see the code above checks the value of this attribute.

      When you want to apply filter, make this attribute ABAP_TRUE. In this case filter is applied.

      When you want to remove filter, make this attribute ABAP_FALSE. In this case, filter is removed.

      One more thing that u must take care for above code is that the action you create for OnFilter event of table should be named FILTER because in set_on_filter method you are paasing the action name as 'FILTER'.