cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger ALV Filter function from dropdown field selection

Former Member
0 Kudos

Hello,

Currently when using the ALV table component, its possible to trigger the filter by using the standard filter input line, entering a value and pressing <ENTER>.

However, now we have bound some fixed valuesets to a couple of fields in the table and changed the cell editor of those columns to dropdown by key. As a result, the filter line for these columns also changes to dropdown by key, limited to those fixed values. This is a nice feature however selecting a value in the dropdown does not seem to trigger an action to the back-end.

When the user selects a value nothing happens untill he presses the "filter-button" or triggers the filter function from another input field.

Is it somehow possible to intercept the fact that the user has selected a value in the dropdown, or that he pressed enter while the dropdown is still highlighted ? In this way we could explicitly call the filter function when we catch the user selection.

Thanks in advance.

Best regards

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member193460
Contributor
0 Kudos

Hi Nicolas,

     Were you able to fulfill your requirement ?

Former Member
0 Kudos

Thanks for the suggestion.

However I tried catching the event using both ON_CLICK and ON_CELL_ACTION (by switching the system) but neither action seems to be triggered by selecting a value in the dropdown. Perhaps this is because the dropdown is located in the filter area and not in the table data. When selecting a value, there is no loading on the frontend (Same effect as a regular field on which no action is registered).

gill367
Active Contributor
0 Kudos

Dropdown in the filter will not trigger any event.

you have to click on the filter icon.

i tried even putting breakdown in domodifyview method but it is not triggering any event

so i guess capturing is not possible.

thanks

sarbjeet singh

Former Member
0 Kudos

Hi,

when you work only with drop downs, the events may trigger if you subscribe, But may not work when the filters are applied..Unless explicit ENETR on filter row or when filter row is click..something may trigger.

Have you subscribed to ON STD FUNTION BEFORE/AFTER in ALV. When you apply the filter, these events will be triggered..

Regards,

Lekha.

Edited by: Lekha on Feb 16, 2011 4:02 PM

Former Member
0 Kudos

This is a nice feature however selecting a value in the dropdown does not seem to trigger an action to the back-end.

How did you conclude that it is not triggering any event ? have you subscribed for the event on_cell_action ? see the link below

[https://cw.sdn.sap.com/cw/docs/DOC-20307|https://cw.sdn.sap.com/cw/docs/DOC-20307]

according to this, you should get the event.