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

FM SAPGUI_PROGRESS_INDICATOR is affecting the performance?

oliver_am
Active Participant
0 Likes
4,765

Hi all,
I have a report that select a lot of data from database.

When I'm procesing the data I put a call to FM

SAPGUI_PROGRESS_INDICATOR to display the progress.

I'm using transaction SAT to measure the performance and I've seen this:

Is possible that the call to ths FM is affecting the performance a lot?

Or I misinterpreted the result of this?

The result list is ordered by Gross time downwards.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

larshp
Active Contributor
2,306

It does affect performance, it has to message the frontend about the progress. So dont call it too often, or make sure there is some processing between each step.

Possible fixes:

a: add IF count MOD 1000 = 0. then show progress,

b: use CL_PROGRESS_INDICATOR, it has a built in check to make sure progress is not shown too often

Hi all,
I have a report that select a lot of data from database.

When I'm procesing the data I put a call to FM

SAPGUI_PROGRESS_INDICATOR to display the progress.

I'm using transaction SAT to measure the performance and I've seen this:

Is possible that the call to ths FM is affecting the performance a lot?

Or I misinterpreted the result of this?

The result list is ordered by Gross time downwards.

Thanks in advance.

3 REPLIES 3
Read only

larshp
Active Contributor
2,307

It does affect performance, it has to message the frontend about the progress. So dont call it too often, or make sure there is some processing between each step.

Possible fixes:

a: add IF count MOD 1000 = 0. then show progress,

b: use CL_PROGRESS_INDICATOR, it has a built in check to make sure progress is not shown too often

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,306

That's right.

More information can be found in these notes:

Read only

oliver_am
Active Participant
0 Likes
2,306

Ok, thanks I've changed the code to call the FM only 20 times, each 5 %.

lv_cont_20 = lines( lt_table ) / 20.

lv_cont = lv_cont_20.

LOOP AT lt_table.

IF sy-tabix = lv_cont.

ADD lv_cont_20 TO lv_cont.

CALL METHOD cl_progress_indicator=>progress_indicate
EXPORTING
i_text = lv_text
i_processed = sy-tabix
i_total = lines( lt_table ).
ENDIF.

"...
ENDLOOP.