Skip to Content
0

Progress Indicator being removed

Apr 19, 2017 at 12:24 PM

91

avatar image

I have an application where the user is required to read an external document displayed in an HTML Viewer. I've scratched my head over how to determine if they have read it and have come to the conclusion that you can't as such. What I am now doing is disabling all functionality apart from scrolling in the HTML viewer and waiting 2 minutes, displaying a progress indicator every 1.2 seconds or so. ( ie 100 * 1.2 = 120 2 minutes plus a full stopwatch).

However, when I use the cl_gui_Timer class it appears to generate a PAI during the timer finished event and instantly clears the progress indicator from the screen. When I change that to a remote call to ENQUE_SLEEP when the at end of task method is called (which calls the cl_Progress_Indicator=>Progress_Indicate method I get a short dump RPERF_ILLEGAL_STATEMENT telling me that the function SAPGUI_PROGRESS_INDICATOR was probably called in a field or conversion exit (???) (SPI Is called by the method above).

So, does anyone know of another technique to get a timer displayed on the screen which does not result in a short dump or a PAI ??

Thanks,

Regards

Rich

ps: Trying to select a primary tag is not working - all matching tags are displayed as lines....

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sandra Rossi Apr 20, 2017 at 12:36 PM
0
PARAMETERS counter TYPE i.

CLASS lcl_app DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS on_timer_finished FOR EVENT finished OF cl_gui_timer.
    CLASS-DATA mcounter TYPE i.
ENDCLASS."

DATA go_app TYPE REF TO lcl_app.
DATA go_timer TYPE REF TO cl_gui_timer.

AT SELECTION-SCREEN OUTPUT.
  counter = lcl_app=>mcounter.

INITIALIZATION.
  DATA start_time TYPE timestampl.
  GET TIME STAMP FIELD start_time.

  CREATE OBJECT go_app.
  CREATE OBJECT go_timer.
  SET HANDLER go_app->on_timer_finished FOR go_timer.
  go_timer->interval = 1. "seconds
  go_timer->run( ).

AT SELECTION-SCREEN ON EXIT-COMMAND.
  SET HANDLER go_app->on_timer_finished FOR go_timer ACTIVATION ''.
  FREE go_timer.
  FREE go_app.

CLASS lcl_app IMPLEMENTATION.
  METHOD on_timer_finished.
    mcounter = mcounter + 1.
    go_timer->run( ).
    cl_gui_cfw=>set_new_ok_code( new_code = '=' ). " ENTER (trigger PAI)
  ENDMETHOD."
ENDCLASS."
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Sandra,

Thanks for that. I ended up doing something along these lines as well, even trying to use FM PROGRESS_POPUP.

Regards,

Rich

0