ABAP OO Class Methods

ON_EVENT SAP Method - Handling of an Event







Below is documentation, parameters and attributes of ABAP Method ON_EVENT within SAP class BI_EVENT_HANDLER. There is also a number of example ABAP code snipts to help you implement this method.

This method is available within SAP systems depending on your version and release level and you can view further information by entering the class name BI_EVENT_HANDLER into relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in. Also check out the contributions below to view or add related hints, tips, example screen shots and any other information.


SAP Class method belongs too

BI_EVENT_HANDLER

Method Name

ON_EVENT

Method Type

Instance Method:   This is an Instance Method so needs to be instantiated first before you can access any of the methods. I.e. you need to create a local variable of TYPE ref to the class.






Importing Parameters:

Below is a list of importing parameters associated with this method, including its name, description and data type


EVENT " Event TYPE SIBFEVENT
EVENT_CONTAINER " Event Parameter TYPE REF TO IF_SWF_IFS_PARAMETER_CONTAINER
RECTYPE " Receiver type TYPE SWFERECTYP
SENDER " Triggering Object TYPE SIBFLPORB

Exporting Parameters:


RESULT " Return Values of Event Handler TYPE SWFREVRSLT

Exceptions:


CX_BO_ERROR - Error in the Event Handling
CX_BO_TEMPORARY - Temporary Error in the Event Handling



Example ABAP coding


DATA:
ld_EVENT TYPE SIBFEVENT ,
ld_EVENT_CONTAINER TYPE REF TO IF_SWF_IFS_PARAMETER_CONTAINER ,
ld_RECTYPE TYPE SWFERECTYP ,
ld_SENDER TYPE SIBFLPORB ,
ld_RESULT TYPE SWFREVRSLT.

" ld_EVENT = "
" ld_EVENT_CONTAINER = "
" ld_RECTYPE = "
" ld_SENDER = "

DATA: lo_HANDLER TYPE REF TO BI_EVENT_HANDLER .
CALL METHOD lo_HANDLER->ON_EVENT(
EXPORTING
EVENT = ld_EVENT
EVENT_CONTAINER = ld_EVENT_CONTAINER
RECTYPE = ld_RECTYPE
SENDER = ld_SENDER
IMPORTING
RESULT = ld_RESULT
EXCEPTIONS
CX_BO_ERROR = 1
CX_BO_TEMPORARY = 2 ).