Show TOC

Event HandlerLocate this document in the navigation structure

Use

Event handlers allow the separation of static and dynamic code in a page. The layout processing deals with the static data, while the event handlers deal with the dynamic data.

The following predefined event handlers are available in the SAP system:

Event Handler

Event Handler

OnCreate

OnCreate is called once when the page is first created (stateful mode), and performs a once-off data initialization or object creation.

OnRequest

OnRequest is called whenever a request is made for a particular page and is used to restore the internal data structures from the request. This is important when working in stateless mode.

OnInitialization

This event handler is mainly used for data retrieval. For example, it allows data required for displaying the BSP to be read from the database. It can also execute any program.

OnInputProcessing

This event handler checks and processes user input. It can also define navigation, that is, whether the user should be taken to the same page or another when the BSP is called.

OnManipulation

This event handler checks and processes user input. It can also define navigation, that is, whether the user should be taken to the same page or another when the BSP is called.

OnDestroy

This event handler is available for special functions.

Note

The ABAP syntax checks that apply in the context of ABAP Objects also apply to event handlers.

Read and modify access to page attributes is available in all handlers. Global objects are also available.

Note

Global objects and their signatures for individual event handlers are displayed if you choose in the Web Application Builder.

The use of the individual event handlers is explained in more detail in the individual sections of the documentation.

More Information