cancel
Showing results for 
Search instead for 
Did you mean: 

Table filter

0 Kudos

Hi, I have created a filter on one of my fields in a table ui element in my view. I have also created a context attribute that I bind to the table element. I fill that context attribute with values so that the user can choose a value to filter on. In order to get the input field of the selection value open for input I am switching the filter function on /off. So far it's working. But my question is, when the user selects a value in the dropdown list, where should I create the action to handle the filter?

I suppose I have to add my own code that really filter the valus in my table? What is the method IF_WD_TABLE_METHOD_HNDL~APPLY_FILTER doing?

I found th component DEMO_TABLE but unfortunaltely I can not find the action FILTER anywhere, anyone that could help?

Thanks a lot, regards Lena

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lena

If you put a DropDown UI in the table, you must use the action assigned to this DD.

In the properties of this DD, there is an action called 'OnSelect'. Use this

to create a new action. Each time the user selects an item

you can find out what item he selects by probing the current

element of the node this DD is attached to.

regards

yuval

0 Kudos

Hi Yuval!

Thank's for trying to help 🙂

Today I started again trying to solve problem with short dumps I get.

In the do_init method of the view I fill a value set and bind it to a context node. In the table (which should not be editable) I have created an input field for the selection field.   In the table field property 'FilterValue' for the table column I bind the field to the context attribute with which I have filled a set of values. I have a toggle button to set the filter on or off (that opens a line below the header line so that the user can choose in the dropdown list. But when selecting a value in the dropdown list I get a short dump with a message saying it seems that Action &OBJECT_ID& does not exist. It seems that I have forgotten to create an action for the selection. But I do not understand where to create this action. Do you have an idea? Thank you and regards Lena 

0 Kudos

Solved it! best regards Lena

Former Member
0 Kudos

Hi Lena

This is great. I assume you found the action.

Please close this thread.

Regards

Yuval

Q

JanarthananE
Contributor
0 Kudos

Hi,

IF_WD_TABLE_METHOD_HNDL~APPLY_FILTER table utility functions r lik


1. data-source must be bound to node without subnotes.

2.Only static attributes may be attached to this node.

3.The filter function does not work for hierarchical tables.

here follow the below link for functionality of filter table

http://help.sap.com/saphelp_nwes72/helpdata/en/56/b1e5f79e814d5e99d91272a4ac52d6/content.htm

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/content.htm


and as per my understanding there s no logic of  filter action in webdynpro , you can write a action code according to your requirements using  context element, and bind with node. u can also try with onLeadSelection option to execute the action.

Also u can refer the following threads for better understanding

http://scn.sap.com/thread/1757458

http://scn.sap.com/thread/1766136

http://scn.sap.com/thread/795805

Hope its useful to u,

Regards

Jana