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

Using CL_GUI_TIMER class, event FINISHED lost

Former Member
0 Likes
951

Hello All,

I am using Timer class CL_GUI_TIMER for refreshing my ALV Grid report every 5 minutes.

In the report there are hotspots for some of the fields, so user will click them such that other columns values are clauculted & again displayed in ALV Grid.

I face a strange issue, when user clicks any hotspot and at the same time if event 'FINISHED' is also triggered ( assume both happens at the same time i.e User cicking the hotspot, code in 'AT USER COMMAND' is being executed, & event is also raised), the event is lost in my report.

Since this event is lost, refreshing the report is permanently stopped.

Please suggest any solution, such that event 'FINISHED' is always received by the report.

Thanks,

Sridhar

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
696

Try to start the timer in PBO

MODULE timer OUTPUT.

    IF timer IS INITIAL.

      CREATE OBJECT: timer,

                     event_timer.

      SET HANDLER event_timer->on_finished FOR time_timer.

    ENDIF.

*   CALL METHOD timer->cancel. " not required

    timer->interval = value.

    CALL METHOD timer->run.

ENDMODULE.                 " TIMER OUTPUT

Regards,

Raymond

Read only

0 Likes
696

Hello Raymond,

Thanks for your reply.

This is report , so no PBO, this reports needs to be refreshed every 5 minutes, so evertime I should not

CALL METHOD timer->cancel & then set

timer->interval = value. 

CALL METHOD timer->run, if @ all PBO is present.

Thanks,

Sridhar

Read only

0 Likes
696

Yes you could try to execute the code at the end of the AT USER-COMMAND

Regards,

Raymond

Read only

0 Likes
696

This a good idea, I thought about it earlier by my timer is every time cancelled, started for each hotspot clicked, I thought there may be better way to handle this...

Anyway thanks for understanding the issue.

Finally using AT USER COMMAND, as i dont find any other solutions, thanks you all