2017 Jul 11 5:20 PM
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.
2017 Jul 11 5:29 PM
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.
2017 Jul 11 5:29 PM
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
2017 Jul 11 5:46 PM
That's right.
More information can be found in these notes:
2017 Jul 12 8:24 AM
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |