cancel
Showing results for 
Search instead for 
Did you mean: 

Can a webdynpro event be cleared in runtime?

Former Member
0 Kudos

Hello Experts,

I am trying to write validations around WD application. In event WDDOAFTERACTION I want to call validation method .If validation fails I want to clear the event so that nothing is triggered - similar to clearing sy-ucomm in screen programming.

Can this be done in WD. Inputs / better approaches are appreciated.

Thanks

Joe

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Why place such validations in WDDOAFTERACTION? The place for validations that you want to possibly stop event processing is in WDDOBEFOREACTION. Here any error messages raised will stop the processing of standard event handlers.

http://help.sap.com/saphelp_nw70ehp2/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm

This step is performed independently from the data transport between data container and context. When an input with errors is found during the validation of the user input, a corresponding error message is displayed and the application developer can correct the data.

In general, there are two different types of event handlers (see detailed graphic of the event handling):

● Standard event handlers are only called if no errors were found in the user input during the validation. If errors were found, an event handler of this type is skipped without processing and the runtime continues with the next step.

● Validation-independent event handlers are always called even if errors are found during validation. In this case, the corresponding error messages created during validation are nevertheless displayed.

Answers (0)