cancel
Showing results for 
Search instead for 
Did you mean: 

User command in drop down in select options

Former Member
0 Kudos

Hi. I am able to build a drop down in select options via the method add_parameter_field, and setting option I_AS_DROPDOWN as true.

Now I want to trigger a user command when any value in the drop down is selected. Is it possible? I cannot find any method / means to do it.

Thanks in adv.

Accepted Solutions (1)

Accepted Solutions (1)

blent_evli
Explorer
0 Kudos

Dear Colleage,

Please Check this link;

[How to Add a Dropdown to a View in a Standard WebDynpro for ABAP Component using the New Enhancement Framework|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/609baac0-ff58-2c10-7aa3-d23e1ceda594?quicklink=index&overridelayout=true]

Bulent.

Former Member
0 Kudos

Thanks for this blog, but it does not answer my question.

I want to have a User command in a drop down which is created via SELECT OPTIONS component.

Thanks again.

blent_evli
Explorer
0 Kudos

Dear Aishi,

Try this code on your Dropdownindex object. Events->onSelecet(ONACTIONSELECT).

method ONACTIONSELECT .

wd_context->set_attribute( name = 'DROPDOWN_BY_IDX_1_INFO' value = index ).

if index = 1.

wd_this->onactionon_action1( EXPORTING wdevent = wdevent ). " action1 action

endif. index = 2.

wd_this->onactionon_action2( EXPORTING wdevent = wdevent ). " action2 action

endif.

endmethod.

Bulent

Former Member
0 Kudos

I think you are not following the question. The option that you are saying comes in a normal Drop Down by Index/Key UI Element. Not in a drop down created via Select Options.

Or, if I am missing the point, please let me know. After adding the drop down via Add_parameter_field, how do I set the user command to it?

Former Member
0 Kudos

Hi,

This is not possible.

I know this is not as good as a handler for DD selection but maybe you can change from DD to input field. Then have the OVS supply the entries in the DD. Now you can have a method for the event ON_OVS raised by the SO component controller.

... or keep the DD but evaluate the selection on event ON_ENTER fired by the SO component.

Regards,

George

Former Member
0 Kudos

Hi,

I have never worked on such requirement on Select option. But have you tried out the Method GET_VALUE_OF_PARAMETER_FIELD of class CL_WDR_SELECT_OPTIONS.

It will return the value of a parameter field by giving the ID. Have a try and share your experience with us.

Hope it works.

Former Member
0 Kudos

Hi Sanket,

It is not a problem to read the SO values.

The original question was to trigger an action (server round trip) when the user makes a selection in a select option drop-down (not a regular drop down).

Regards,

George

Answers (0)