cancel
Showing results for 
Search instead for 
Did you mean: 

WDR_SELECT_OPTIONS => Search on Enter Key?

daniel_humberg
Contributor
0 Kudos

I embedded a select options component (WDR_SELECT_OPTIONS) into a self made search screen.

I would like to trigger the search when the user presses enter, but somehow, I am not able to implement that.

The search is normally triggered by a button that triggers an action.

Since I am using the selection option component, I am not able to use the ON_ENTER event for the input fields to trigger the search action.

What can I do to handle the ENTER key?

Accepted Solutions (1)

Accepted Solutions (1)

Madhu2004
Active Contributor
0 Kudos

HI,

If I understand you correctly use want to trigger an action on clicking enter in the select options fileds defined using WDR_SELECT_OPTIONS.

You can use the interface event ON_ENTER of wdr_select_options and create implementation for the event.

Regards,

Madhu

daniel_humberg
Contributor
0 Kudos

Thx Madhu, that's what I was looking for.

Former Member
0 Kudos

> You can use the interface event ON_ENTER of wdr_select_options and create implementation for the event.

I'm stuck with this same problem and i can't find this event.

Or maybe i'm searching it in the wrong direction but i searched in the IF_WD_SELECT_OPTIONS interface and the IWCI_WDR_SELECT_OPTIONS interface. Nothing found

edit: nvm i solved the problem.

regards,

michael

Edited by: decafmeyerm on Oct 21, 2010 11:45 AM

Answers (4)

Answers (4)

ChrisPaine
Active Contributor
0 Kudos

>I embedded a select options component (WDR_SELECT_OPTIONS) into a self made search screen.

nice - so I imaging you want to trigger this screen to appear as a popup window?

>Since I am using the selection option component, I am not able to use the ON_ENTER event for the input fields to trigger the search action.

this is not quite right...

Firstly you're triggering an action not an event from the UI element - so from your input field that you want to trigger your special search screen, create a new action - it does not need to be called ON_ENTER, call it "MR_FLIBBLE_LIKES_BEER", it is irrelevant what you call it. This action can then call your search screen.

You can call the event handler that handles the event coming back from the selection options anything - it does not need to be called ON_ENTER, call it "MRS_PONGO_IS_NICE", again it is irrelevant, as long as it specifies which particular event and component usage it is handling.

Hopefully that is a bit clearer.

If this is not case of this isn't clear enough, please do reply.

Chris

daniel_humberg
Contributor
0 Kudos

Hi Manogna,

how can I find out in WDDOMODIFYVIEW that the enter key was pressed?

Regards, Daniel

(the other link did not really help me, but maybe i was not smart enough?)

former_member1151507
Participant
0 Kudos

Hi Daniel,

It may not be possible to find out whether ENTER is pressed or not in Web dynpro.

If your requirement is to allow the user to seach directly by pressing enter, it may not be possible using Select-options. You have to use a search button if you want to use select-options only.

Otherwise use InputFiled in place of select-options as it has OnEnter event. But here we can not provide multiple selection.

Regards,

Manogna

ChrisPaine
Active Contributor
0 Kudos

>(the other link did not really help me, but maybe i was not smart enough?)

It's not that surprising that the other link did not help,

onEnter is the only action possible from an input field.

>how can I find out in WDDOMODIFYVIEW that the enter key was pressed?

You can't find out if the enter key was pressed in WDDOMODIFYVIEW.

former_member233090
Active Contributor
0 Kudos

Hi Daniel,

check out the forum and look at the post given by SANKET SETHI .

hope that example helps you out.

Bhavana

former_member1151507
Participant
0 Kudos

Hi,

You can write the code to trigger the search action in WDDOMODIFYVIEW, b'coz if we press enter in any inputfield WDDOMODIFYVIEW will be called.

Regards,

Manogna

ChrisPaine
Active Contributor
0 Kudos

>You can write the code to trigger the search action in WDDOMODIFYVIEW, b'coz if we press enter in any inputfield WDDOMODIFYVIEW will be called.

yes, but also if we did ANYTHING else also! This is not a sensible solution!

also please - do not use "txt speak" such as "b'coz" in your messages, the forum rules of engagement are quite clear that this is not acceptable.

Thank you!