Exercise 3: Registering a System Event
Usage
System events are passed on irrespective of the flow logic of the relevant screen.
In the previous exercise, you have registered event
DLBCLICK as an application event. You now register this event as a system event.Procedure
wa_events-appl_event = SPACE.
Check Your Work
Double-click in the text window. No text is displayed since the flow logic of the screen and the field transport are ignored.
Discussion
For system events, the PAI/PBO modules are not processed. This has the following consequences:
Advantages
Disadvantages
No field transport takes place when the event is triggered. This has the following consequences for accessing screen fields in event handler methods:

This problem does not occur for output-only fields.
This means that as long as you do not access screen fields in read or write mode in an event handler method, this disadvantage has no effect.
Solution
The Control Framework provides method
SET_NEW_OK_CODE . With this method, you can set an application-specific OK_CODE in an event handler method. After the event handler method, the Control Framework processes the PAI event in which you can access current screen fields in read and write mode.Modify your program as follows:
CALL METHOD cl_gui_cfw=>set_new_ok_code
exporting new_code = 'SHOW'.
when 'SHOW'.
event_type = 'Doubleclick' (555).
The PAI event is now processed after the event handler method, and the text is displayed again.