Skip to Content
Aug 29, 2007 at 01:07 PM

Error messages and cancel navigation - questions about concept


Hello experts,

I have a very simple Web Dynpro component:


- First view has an input field that is linked to a date field in the context and a button to navigate to the second view

- Second view has a button to navigate back to the first view

- There are no individual field validations implemented

If I now enter a date in a wrong format and press the button, the program navigates to the second view and displays an error message in the Message Area (comes from the WD4A framework). And in this second view the navigation is cancelled and I can't get back to the first view to correct the date.

Is this the correct behaviour? This does not make any sense to me. I would have expected that the navigation is cancelled in the first view so that it is not possible to leave the screen with the faulty data.

Referring to the book "Web Dynpro for ABAP" by Ulli Hoffman the validation of type definitions is the very first step in the phase model of the request/response cycle. But it seems as if navigation comes first and validation of type definitions comes second.

Is there a way to start the standard field validation earlier (for example in the wddobeforeaction method) so that navigation is stopped in the first view until the user enters a correct date?

Thanks, Karsten