‎2009 Jun 23 6:51 AM
Hi all.... I had displayed a text control and assigned 'sy-uzeit' field to it.
Working fine... I mean displaying the time. But I want to synchronize the time with the machine time.
What I mean is I should see the change of time in my text control....
viz: seconds changing , minutes changing, and hours changing in the out-put
‎2009 Jun 23 6:55 AM
Hi,
Please check if you are assigning the sy-uzeit to your text control..
‎2009 Jun 23 6:57 AM
Hi,
Take the type for that text control as TIMS by double clicking the text control and go to attributes..
Hope this helps you.
Regards,
Tarun
‎2009 Jun 23 6:59 AM
Hi,
If you want to check the time changing on your output screen as in a clock the may be it wud not be possible but if you want to capture the system time at the moment you are priniting the system time, pass sy-uzeit to the variable i.e. table control.
Hope this helps!!!
Regds,
Lalit
‎2009 Jun 23 7:03 AM
Hi Kiran,
In this regard if you want to see the Changing time I think you need to use the class cl_gui_timer .
I hope this will help you.
I am giving you a small piece of code which will help you to better understand.
And you can use the same concept.
REPORT ZTEST_TIME.
daTA: rf_gui_timer TYPE REF TO cl_gui_timer.
*write:sy-uzeit.
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
DATA:col TYPE i VALUE '12',
len TYPE i VALUE '52'.
CLASS-METHODS: on_finished FOR EVENT finished OF cl_gui_timer
IMPORTING sender.
ENDCLASS. "lcl_event_handler DEFINITION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD: on_finished.
back.
write:sy-uzeit.
sender->run( ).
ENDMETHOD. "on_finished
endclass.
sTART-OF-SELECTION.
CREATE OBJECT rf_gui_timer.
SET HANDLER lcl_event_handler=>on_finished FOR rf_gui_timer.
rf_gui_timer->interval = 1.
rf_gui_timer->run( ).
write:sy-uzeit.
Edited by: Sandipan Das on Jun 23, 2009 8:18 AM
Edited by: Sandipan Das on Jun 23, 2009 8:19 AM