on 01-12-2011 6:52 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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.
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.