cancel
Showing results for 
Search instead for 
Did you mean: 

get_current_action returns null for WDR_SELECT_OPTIONS

ged_hurst
Participant
0 Kudos

Hi,

my screen renders the component WDR_SELECT_OPTIONS.

In the method WDDOBEFOREACTION I've coded this:


  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( ).

  IF lo_action IS BOUND.
    CASE lo_action->name.
      WHEN '...'.
    ENDCASE.
  ENDIF.

In here

lo_action

is bound most of the times.

However, if the UI contains a data type error (for instance: a date input field belonging to WDR_SELECT_OPTIONS is filled up with a string thus resulting in a validation error) and an action is triggered on this date field (for instance ENTER is pressed) when WDDOBEFOREACTION is executed the action lo_action is not bound.

However I need to know which action was triggered. Is there any other way to do so?

Accepted Solutions (0)

Answers (1)

Answers (1)

ged_hurst
Participant
0 Kudos

HI,

I've actually realized that the action being null is not related to the fact that I entered a string in a date field.

The thing is that whenever I press enter on a field in a select options (ON Enter event is declared and the method is correctly called), the action is null in WDDOBEFORENAVIGATION.

Is there a way to capture this event in WDDOBEFORENAVIGATION?

Thanks