Events and error handling in ABAP Objects
Page 1 of 1
Events and error handling in ABAP Objects
System variable check(sy_subrc) for event handling.
If sy-subrc = 0 then all event handler methods have been properly registered
SY-SUBRC = 4: then you tried to register the same combination of triggering event, event
handling method, and handler more than once.
If sy-subrc = 8: then you tried to deregister an event handler that was not registered.
Non-cacheable runtime error during event handling.
SET_HANDLER_DISP_OVERFLOW: Unable to register any more handlers.
SET_HANDLER_E_NO_FOR: Handlers of instance methods need the FOR addition.
SET_HANDLER_FOR_CE: Event handler registered for a static event.
SET_HANDLER_FOR_NULL: An event may not be triggered using NULL.
Note
If an instance triggers an event, the registration is implicitly deleted if the automatic
memory management (garbage collection) deletes the triggering instance.
When you register instance methods as event handlers, note that the registration refers to the current instance and not to the reference variable that is used for registration. Even when the reference variable takes another value after SET HANDLER, the registration of the object remains unchanged. This also affects to the lifetime of objects - an object exists for as long as it is registered as an event handler, even if no more reference variables point to it. The object is either explicitly deregistered using the ACTIVATION addition, or implicitly when the triggering instance no longer exists.
If sy-subrc = 0 then all event handler methods have been properly registered
SY-SUBRC = 4: then you tried to register the same combination of triggering event, event
handling method, and handler more than once.
If sy-subrc = 8: then you tried to deregister an event handler that was not registered.
Non-cacheable runtime error during event handling.
SET_HANDLER_DISP_OVERFLOW: Unable to register any more handlers.
SET_HANDLER_E_NO_FOR: Handlers of instance methods need the FOR addition.
SET_HANDLER_FOR_CE: Event handler registered for a static event.
SET_HANDLER_FOR_NULL: An event may not be triggered using NULL.
Note
If an instance triggers an event, the registration is implicitly deleted if the automatic
memory management (garbage collection) deletes the triggering instance.
When you register instance methods as event handlers, note that the registration refers to the current instance and not to the reference variable that is used for registration. Even when the reference variable takes another value after SET HANDLER, the registration of the object remains unchanged. This also affects to the lifetime of objects - an object exists for as long as it is registered as an event handler, even if no more reference variables point to it. The object is either explicitly deregistered using the ACTIVATION addition, or implicitly when the triggering instance no longer exists.
Uma_ABAP- Posts : 56
Join date : 2012-03-31
Similar topics
» Events and error handling in ABAP Objects
» Fundamentals of events in ABAP Objects
» Creating multiple Objects in ABAP Objects
» Difference between Procedural ABAP and ABAP Objects
» Introduction to class in ABAP Objects
» Fundamentals of events in ABAP Objects
» Creating multiple Objects in ABAP Objects
» Difference between Procedural ABAP and ABAP Objects
» Introduction to class in ABAP Objects
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Aug 20, 2012 4:37 pm by Admin
» Difference between Type and Like
Thu Jun 07, 2012 2:40 pm by Admin
» How to handle table control fields in Module Pool program?
Wed May 09, 2012 2:41 am by govind
» Three tables inner join in SAP
Thu May 03, 2012 4:47 pm by Uma_ABAP
» Creating table type in ABAP
Sat Apr 28, 2012 9:03 pm by Uma_ABAP
» Creating user defined types and structures in ABAP
Sat Apr 28, 2012 8:55 pm by Uma_ABAP
» Creating Dynamic Internal Table and Dynamic Field catalog in SAP-ABAP
Fri Apr 27, 2012 11:00 am by Admin
» Copy Custom PF-Status from Standard program to Custom Program in ALV
Thu Apr 26, 2012 9:52 pm by Uma_ABAP
» Calculate/find number of working days between two dates in SAP
Tue Apr 24, 2012 2:06 pm by Uma_ABAP