cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro ABAP filter table inside a popin

0 Kudos

Hi all,

i have a problem with a popin in which a table is shown. I want to make the table shown in the popin sortable and to filter. i know how to do it with a normal table (outside the popin), bit not how to bind the filter correct to the table shown in the popin.

i hope somebody can help. Thanks for answers...

Felix

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Felix ,

Small change in above solution ,

Create an attribute with name v_name ( declare a attribute of type if_wd_view in your view )

then in modify view write the below code,

WD_This->v-name = view ,

all above code remains same and pass the TAB_N ..i.e your popin table name on toggle method and write below code,

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

  WD_THIS->TABLE_METHOD_HANDLE ?= wd_table1->_METHOD_HANDLER.

  WD_THIS->TABLE_METHOD_HANDLE->SET_KEY_ATTRIBUTE_NAME( 'MATNR' ).


First time when you run code the parent filter will run , once you click on popin the popin toggle method runs so the popin filter will work , but at the time of popin filter the parent filter will not work so you need to refresh the application and run again. 


But it will solve the popin filter problem , this i have posted late but it may help other new joiners .


Regards,

Vikram 


Former Member
0 Kudos

Hi Vikram,

thank you for your "late" answer. The Solutions you mention is correct and is working fine. Anyway i solved it somehow the same way a time ago.

Thank you anyway.

regards

Felix

PS: I will try to give Points if possible

0 Kudos

Thank You Alex.

0 Kudos

Thank you Felix

0 Kudos

Hi Felix ,

I may be too late to answer  because i was searching for same answer and i got the solution and i have implemented the same , so below is the answer,

In webdynpro view ( Where you have your table and its popin ) ,

please write the below code in your WDDOMODIFY view ,

  DATA wd_table TYPE REF TO cl_wd_table.

  DATA wd_table1 TYPE REF TO cl_wd_table.

  CHECK first_time is  NOT INITIAL.

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

  WD_THIS->TABLE_METHOD_HANDLE ?= wd_table->_METHOD_HANDLER.

  WD_THIS->TABLE_METHOD_HANDLE->SET_KEY_ATTRIBUTE_NAME( 'MATNR' ).


  wd_table1 ?= view->get_element( 'TAB_N' ).

  WD_THIS->TABLE_METHOD_HANDLE ?= wd_table1->_METHOD_HANDLER.

  WD_THIS->TABLE_METHOD_HANDLE->SET_KEY_ATTRIBUTE_NAME( 'MATNR' ).


In above code TAB_SEARCH is a parent Table so ion similar way take a new table view with your popin table name , in above example its TAB_N ..( this two names are from your webdynpro design name , where you bind your data source )


It will work 🙂

Former Member
0 Kudos

hi,

Please refer the standard component - DEMO_TABLE. Sorting and filtering are explained there .

I am not sure if there is any restrictions as such to use sort or filter in popin.

Basically you need to have a attribute of type IF_WD_TABLE_METHOD_HNDL.

in the wddomodifyview, get the table UI element and bind that to the above handler.

create a empty action sort for the UI sort action.

0 Kudos

Hi Baskaran,

thank you for the reply. I tried it the way you described it before but without any effect. For shure i see the filter in the table in the popin, and if i enter a filter-value the action is prcessed, but without an effect.

What i am missing is the correct linkage of the apply_filter methd to the choosen popin table ( like path variable "root_element.2.table" or something like that).

Any other good ideas or did i missed or missunderstood something in your answer?

Felix

Edited by: Felix Baumann on Jan 13, 2011 9:21 AM

Former Member
0 Kudos

Hi Felix,

Have you cross check your coding accordingly with the sort_and_filter_view of demo_table.

Have you supplied on the columns the filtervalue ?

0 Kudos

Yes, i have checked all this and i have done all this stuff. I can send you a Mail with a screenshot, maybe after this my problem might be clearer... ok?

Felix

Former Member
0 Kudos

yes,that is fine

0 Kudos

Done (send to your gmail-account). As explanaition: I have acontext (0:n) with other Tables Contexts in it (again 0:n) and a filter as Context in the Main Context (sorry sounds very very confusing). So the filter is individual for each context an the popin Tables are individual for each context.

Sorry i missed this importing detail.

Felix

Former Member
0 Kudos

Hi felix,

I have seen that and thanks for the explanation as well. I agree with you that it is complex. I am not able to point out where the problem is.

Filter should work !! Somewhere it is not receiving the filter values. My suggestion is to go on debug to see how the filter handler working.

Sorry that i am not able to help you.