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

Continuous time display

Former Member
0 Likes
730

Hi

I want to display continuously changing time on the screen

If we use sy-uzeit it only displays current time . How to display active clock on screen.

3 REPLIES 3
Read only

Former Member
0 Likes
644

Hi,

just copy paste this code....

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

reward points

reena

Read only

0 Likes
644

thanks for the reply

But this code is only showing current time & time is not changing continuously

Read only

0 Likes
644

hi thr,

instead of 1 write 3 in the modify section..........

FORM mylist.

WRITE sy-uzeit TO wa.

<b>MODIFY LINE 3 LINE VALUE FROM wa.</b>

ENDFORM. "MYLIST

Bye.