cancel
Showing results for 
Search instead for 
Did you mean: 

Validation in WDDOBEFOREACTION?

Former Member
0 Kudos

Hi All,

I understand that validation of user input is suppsoed to be implemented in method WDDOBEFOREACTION.

So far so good... I have implemented this method as follows:

CASE lo_action->name.
    WHEN 'SAVE' OR 'SAVE_EXIT'.

         wd_comp_controller->check_before_save( ) . " I need to cancel further processing if this fails

  ENDCASE.

My understanding of the framework is the following:

In case an error message with cancel_navigation = abap_true has been thrown, the framework stops further processing of this action.

However, the framework doesn't stop. It executes the action SAVE although I have trown an error message with cancel_navigation = abap_true.

I would like to know how this is supposed to work? What do I have to do to stop executing my action SAVE in case of errors?

Thanks,

Johannes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I think it is also to do with the type of event handlers (validation independent , standard ).

See the Phase model description in this link.[http://help.sap.com/erp2005_ehp_04/helpdata/EN/45/c87f413e70010de10000000a1550b0/frameset.htm|http://help.sap.com/erp2005_ehp_04/helpdata/EN/45/c87f413e70010de10000000a1550b0/frameset.htm]

saravanan_narayanan
Active Contributor
0 Kudos

Hello Johannes,

I think if you generate normal error message then navigation wont be cancellled. you need to use either report_attribute_error_message or report_fatal_error_message.. check it out.

BR, Saravanan

former_member252769
Active Participant
0 Kudos

Hi Johannes

To stop the further processing, you can use the "report_fatal_error_message" from the message options and declare.

Hope it works.

Regards

Brillion