Application Development 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: 

methods in cl_gui_frontend_services will break the progress indicator

xudonny
Advisor
Advisor
0 Kudos

Hi guys,

I have a list of directories of client to check if it exists.

I use cl_gui_frontend_services=>directory_exist method.

And I want to show the progress indicator.

But the method directory_exist will break the indicator, show the status bar's message is like, flashing. appear, disappear, appear, disappear ...

You can use the codes below to see what happens and can take a comparsion when you comment the method directory_exist .

any suggestions?

thanks a lot.

REPORT z_test.

type-POOLs abap.

DATA: A LIKE SY-UCOMM,

ldf_derectory TYPE string,

ldf_result TYPE abap_bool.

ldf_derectory = 'c:\'.

DO 100 TIMES.

DO 300 TIMES.

GET TIME.

ENDDO.

A(3) = SY-INDEX.

A+3 = '%'.

CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

PERCENTAGE = SY-INDEX

TEXT = A.

CALL METHOD cl_gui_frontend_services=>directory_exist

EXPORTING

directory = ldf_derectory

RECEIVING

result = ldf_result.

ENDDO.

2 REPLIES 2

Former Member
0 Kudos

Hi,

I'm not sure there is anything you can do about the flashing clock icon in this case. This may just be a limitation of the GUI.

Of course, you always have the option of using 0% as the percentage when calling SAPGUI_PROGRESS_INDICATOR. This will eliminate the clock from the progress display, leaving just the percentage number plus the '%' sign.

In other words, you can eliminate the annoying flickering by changing your function call to:


  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      percentage = 0
      text       = a.

Regards,

Jamie

xudonny
Advisor
Advisor
0 Kudos

HI Jamie,

Thank you for your feedback.

Just actually, not only the clock is flickering. but also the message.

Maybe as you said, this is a limitation of the GUI.

greetings,

donny