Use this method to dispatch application events (see Event Handling) to the event handlers registered for the events. If you do not call the method within the PAI event of your application program, it is called automatically by the system after the PAI has been processed. The method returns a return code from which you can tell if the call was successful.
CALL METHOD cl_gui_cfw=>dispatch
IMPORTING return_code = return_code.
cl_gui_cfw=>rc_found: The event was successfully directed to a handler method.
cl_gui_cfw=>rc_unknown: The event was not registered in the event list.
cl_gui_cfw=>rc_noevent: No event was triggered in a control. The function code was therefore a normal one (for example, from a menu entry).
cl_gui_cfw=>rc_nodispatch: No handler method could be assigned to the event.
An event can only be dispatched once. After that, it is "spent". Consequently, attempting to dispatch the events a second time does not trigger the handler events again.