Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re : Module Pool Programming

Former Member
0 Likes
530

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

4 REPLIES 4
Read only

Former Member
0 Likes
506

Hi,

Please check if you are assigning the sy-uzeit to your text control..

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
506

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

Read only

Former Member
0 Likes
506

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

Read only

Former Member
0 Likes
506

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