2007 Nov 13 4:48 AM
Hi experts,
can u tl me how to add clock(time) in footer and i want to refresh for each and every second.
i mean it displays the time.
thanks in advance.
Hi experts,
can u tl me how to add clock(time) in footer and i want to refresh for each and every second.
i mean it displays the time.
thanks in advance.
2007 Nov 13 4:52 AM
HI
CLOCK ON SCREEN. (Thru write statement)
(This sample code will give an insight
to many abapers who are still wondering
about the concept of TIMER IN ABAP
as compared to other programming languages)
(Timer in ABAP was also a mystery to me
some time back ago)
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
2007 Nov 13 4:55 AM
thank you for ur reply,but i don't know abt the OOP's concept.
can u tell me by using nay function modules etc.
2007 Nov 13 5:12 AM
HI,
see this example.
write:/ 'example'.
DO 60 TIMES.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = sy-index
TEXT = sy-index.
WAIT UP TO 1 SECONDS.
ENDDO.
rgds,
bharat.
2007 Nov 13 6:35 AM
Hi Bharat,
thanks for reply,but it is not my exact solution.
i want to display the timer in output of grid display.
i hope u can understand.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |