Skip to Content

CL_GUI_TIMER

Hi,

I have a great problem with the class CL_GUI_TIMER. We want to use this class to refresh a CL_GUI_ALV_GRID after i.e. 10 seconds. Therefore I wrote an eventhandler which reacts on the event FINISHED of the timer by refreshing the grid an starting the timer once again. But when a modal windows was opened then framework seems to block the event (it's a system event) an the timer stops. I've enhanced the timer to react on the event himself but that doesn't help.

Have anybody a solution for this problem?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2004 at 09:37 PM

    The following is untested but I recall doing something like it in the past.

    At the end of your PAI logic:

    CALL FUNCTION 'RZL_SLEEP'

    STARTING NEW TASK 'TIMER'

    PERFORMING timer_finished ON END OF TASK

    ...

    FORM timer_finished USING taskid.

    SET USER-COMMAND 'REFRESH'.

    ENDFORM.

    Obviously you need to handle PAI function code REFRESH. Can't recall whether SET USER-COMMAND works in this context (it is intended for interactive reporting), but if not you should be able to use function module SAPGUI_SET_FUNCTIONCODE.

    Cheers,

    Scott

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 25, 2004 at 01:08 PM

    We had the same problem with the SAP timer. We opened a problem with SAP through OSS but got a response that the Timer was working as designed. Our solution was to create our own timer ActiveX control in Visual Basic. We created our timer to automatically reset itself after it fires its event. This way if the Control Framework is blocked (by a modal window or other processing) you will miss the events that fire during that time, but the timer will keep on firing. You will have to create your own proxy class for the new control. To do this you can study the existing SAP proxy classes. The hardest part is distributing the ActiveX control to all the frontend PCs. To get around this we loaded the Control installer into the Mime repository. If the proxy class can't instantiate the control, we download the installer using the function module DOWNLOAD_WEB_OBJECT and start the installation.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Thomas,

      > We had the same problem with the SAP timer. We

      > opened a problem with SAP through OSS but got a

      > response that the Timer was working as designed. Our

      I'm still waiting on the answer to my ticket. I think I now know the content of the response. 😉

      [workaround]

      Thanks, that's a nice idea.

      Gerwin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.