CLASS gui_timer Example Author: Rich Heilman
This uses the gui timer, so it will not hold up your dialog process, it will count till the timer runs out and give a message.
Code:
REPORT zrich_0001.
DATA: gui_timer TYPE REF TO cl_gui_timer.
DATA: timeout TYPE i VALUE '3'.
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: on_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS.
CLASS lcl_event_handler IMPLEMENTATION.
METHOD on_finished.
MESSAGE i001(00) WITH 'Hey, its been 3 seconds, im done'.
ENDMETHOD.
ENDCLASS.
PARAMETERS : p_check TYPE c.
AT SELECTION-SCREEN OUTPUT.
CREATE OBJECT gui_timer.
SET HANDLER lcl_event_handler=>on_finished FOR gui_timer.
gui_timer->interval = timeout.
CALL METHOD gui_timer->run.
To increase the time, simply change the value of the TIMEOUT variable to the desire number of seconds.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.