cancel
Showing results for 
Search instead for 
Did you mean: 

Catch 'Enter' event in webdynpro abap

Former Member
0 Kudos

In my abap webdynpro application i have selection option, i can not catch the event in Beforeaction when user click 'Enter'?

note: I want to catch the Enter.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ali,

You have to register the 'ON_ENTER' event of the WD component WDR_SELECT_OPTIONS in the view of your component.

Then you can either write your code in the WDBEFOREACTION or the event handler method for the ON_ENTER event.

Regards,

Jaspreet

Former Member
0 Kudos

How to register the ON_ENTER event in the view?

Former Member
0 Kudos

In the view you can define the usage of the WDR_SELECT_OPTION component and its interface controller. Then you can register the ON_ENTER event in the view itself.

You just have to create a method of event handler type and then select the ON_ENTER event from F4.

Former Member
0 Kudos

Thanks Jaspreet, you replay helpful.

I create a method of event handler type and selected the On_Enter evet, but how I catch this event in the WDDOBEFOREACTION ?

Former Member
0 Kudos

Hi Ali,

Sorry for late reply... I don't think it is possible to know the action in the WDDOBEFOREACTION of the using component. Only the actions which are created in the view are caught in the corresponding before action method using the below mentioned code:-

  data lo_api_controller type ref to if_wd_view_controller.

  data lo_action         type ref to if_wd_action.

  lo_api_controller = wd_this->wd_get_api( ).

  lo_action = lo_api_controller->get_current_action( ).

Also, could you let me know your specific requirement?

Regards,

Jaspreet

Former Member
0 Kudos

I try this code to get the action but no work, i gives blank and even the action for the object is initial