Declaration Variable
DATA: xo_timer TYPE REF TO cl_gui_timer.
DATA: xo_event TYPE REF TO xcl_event_receiver.
___________________________________________________________________________
CLASS xcl_event_receiver DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
timer_finished FOR EVENT finished
OF cl_gui_timer.
ENDCLASS.
CLASS xcl_event_receiver IMPLEMENTATION.
METHOD timer_finished.
Do anything....
ENDMETHOD.
ENDCLASS.
___________________________________________________________________________
PBO : Status_0100
MODULE status_0100 OUTPUT.
SET PF-STATUS 'TOOLBAR'.
SET PF-STATUS 'TOOLBAR'.
IF xo_timer IS INITIAL.
CREATE OBJECT xo_timer
EXCEPTIONS
OTHERS = 4.
CHECK sy-subrc EQ 0.
CREATE OBJECT xo_event.
ENDIF.
SET HANDLER xo_event->timer_finished FOR xo_timer.
xo_timer->interval = 1.
CREATE OBJECT xo_timer
EXCEPTIONS
OTHERS = 4.
CHECK sy-subrc EQ 0.
CREATE OBJECT xo_event.
ENDIF.
SET HANDLER xo_event->timer_finished FOR xo_timer.
xo_timer->interval = 1.
"Create Container and ALV...
xo_timer->run( ).
ENDMODULE.
No comments:
Post a Comment