Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error message - cancel navigation

Could someone tell me what the parameter 'CANCEL_NAVIGATION' is supposed to do on the method IF_WD_MESSAGE_MANAGER-REPORT_ERROR_MESSAGE? I thought that it would halt the application at that point, but it apparently doesn't. Am I missing something?

Former Member
replied

I've had the same issue of parameter CANCEL_NAVIGATION not working.

The workaround i've used to avoid executing certain action handlers (actually to stop their execution) when errors occured goes as this:

- Perform any validations in method (or methods called by) WDDOBEFOREACTION, generating any messages in case of errors.

- In the event handlers you want to stop in case of errors, place the following coding at the top:

  DATA: lr_view_api TYPE REF TO IF_WD_VIEW_CONTROLLER.
  DATA: lr_msg_man  TYPE REF TO if_wd_message_manager.

* Check no messages were issued on validations before going on
  lr_view_api = wd_this->wd_get_api( ).
  lr_msg_man = lr_view_api->get_message_manager( ).
  CHECK lr_msg_man->is_empty( ) = abap_true.

* Continue with normal coding...

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question