In my article about cl_progress_indicator I've mentioned that sometimes progress showing is more time consuming than the action which is described by it, so you must be careful when using progress indicator in ABAP. I've said also that it's better to cl_progress_indicator instead of FM SAPGUI_PROGRESS_INDICATOR because of built-in function to show progress only once per 10 seconds. But sometimes when using standard SAP FM we can see that progress showing is taking too much time (like SAP_CONVERT_TO_CSV_FORMAT for example), and as we should not do any modification of the system code then we need to use a small trick to get rid of such progress indicators.
If you look into code of SAPGUI_PROGRESS_INDICATOR then you'll notice that showing of progress depends on parameter called SIN :-)
So what you can do is simply SET PARAMETER ID'SIN'FIELD '0'. And you will get rid of progress indicator in not needed places.
I've prepared also a class with single method to do that and a demo program of which result you can see in video bellow. It shows what's the difference when you suppres the progress indicator.
Class is call zab_suppress_progress_ind and you can find it in the NUGG file attached to this article as long as the demo program. The class contains only single method suppress with following implementation:
method suppress. constants: sin_0 type c length 1 value 0. constants: sin type memoryid value 'SIN'. data: sin_oryginal type c length 1.
get parameter id sin field sin_oryginal. check sin_oryginal ne '0'. "no need to set anything
set parameter id sin field sin_0. "A call of which will set up parameter prog_indi_mode in FG SGUI call function 'SAPGUI_PROGRESS_INDICATOR' exporting
percentage = 100 text = 'Dummy'.
set parameter id sin field sin_oryginal. "Return to original mode endmethod. "supress
Demo program to check how the suppressing is working you can find bellow.
data: gt_sbook type standard table of sbook. data: gt_csv type truxs_t_text_data.
parameters: p_supp radiobutton group gr1 ,
p_show radiobutton group gr1 default 'X'.
start-of-selection. select * up to 50000 rows into corresponding fields of table gt_sbook from sbook.
if p_supp eq abap_true.
zab_suppress_progress_ind=>suppress( ). endif.