2006 Sep 18 6:56 AM
can any one ,PLEASE,suggest any ideas of how to design a timer that keeps on ticking for the specific time which would be given statically.and then towards the last 5 min it should flash a message saying that u are left only with 5 min.....i hope i am clear. amn't i?
Thanx in advance,I promise to reward.
Hi Anurag,
1.
CLOCK ON SCREEN. (Thru write statement)
(This sample code will give an insight
about the concept of TIMER IN ABAP
as compared to other programming languages)
The Code : (Just Copy Paste)
REPORT abc NO STANDARD PAGE HEADING.
DATA : wa(72) TYPE c.
*----
CLASS my DEFINITION.
PUBLIC SECTION.
METHODS : run_handler FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "my DEFINITION
DATA timer TYPE REF TO cl_gui_timer.
DATA myh TYPE REF TO my.
----
CLASS my IMPLEMENTATION
----
*
----
CLASS my IMPLEMENTATION.
METHOD run_handler.
CALL METHOD timer->run.
PERFORM mylist.
ENDMETHOD. "run_handler
ENDCLASS. "my IMPLEMENTATION
*----
*----
Init
INITIALIZATION.
CREATE OBJECT timer.
CREATE OBJECT myh.
SET HANDLER myh->run_handler FOR ALL INSTANCES.
PARAMETERS : a TYPE c.
*----
End of selection
START-OF-SELECTION.
WRITE sy-uzeit TO wa.
WRITE wa.
timer->interval = '0.5'.
CALL METHOD timer->run.
*----
FORM mylist.
WRITE sy-uzeit TO wa.
MODIFY LINE 1 LINE VALUE FROM wa.
ENDFORM. "MYLIST
regards,
amit m.
2006 Sep 18 6:58 AM
Hi Anurag,
1.
CLOCK ON SCREEN. (Thru write statement)
(This sample code will give an insight
about the concept of TIMER IN ABAP
as compared to other programming languages)
The Code : (Just Copy Paste)
REPORT abc NO STANDARD PAGE HEADING.
DATA : wa(72) TYPE c.
*----
CLASS my DEFINITION.
PUBLIC SECTION.
METHODS : run_handler FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "my DEFINITION
DATA timer TYPE REF TO cl_gui_timer.
DATA myh TYPE REF TO my.
----
CLASS my IMPLEMENTATION
----
*
----
CLASS my IMPLEMENTATION.
METHOD run_handler.
CALL METHOD timer->run.
PERFORM mylist.
ENDMETHOD. "run_handler
ENDCLASS. "my IMPLEMENTATION
*----
*----
Init
INITIALIZATION.
CREATE OBJECT timer.
CREATE OBJECT myh.
SET HANDLER myh->run_handler FOR ALL INSTANCES.
PARAMETERS : a TYPE c.
*----
End of selection
START-OF-SELECTION.
WRITE sy-uzeit TO wa.
WRITE wa.
timer->interval = '0.5'.
CALL METHOD timer->run.
*----
FORM mylist.
WRITE sy-uzeit TO wa.
MODIFY LINE 1 LINE VALUE FROM wa.
ENDFORM. "MYLIST
regards,
amit m.
2006 Sep 18 7:00 AM
Hi,
Please refer this BLOG :
/people/rich.heilman2/blog/2005/10/18/a-look-at-clguitimer-in-46c
Also have a look at FM SAPGUI_PROGRESS_INDICATOR .
Best regards,
Prashant
PS : Please reward all helpful answers
2006 Sep 18 7:34 AM
Hi,
for > 4.6 use class CL_GUI_TIMER
for 4.6.C look here::
http://www.apentia-forum.de/viewtopic.php?t=2850&highlight=clguitimer
A.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |