From b80a10024b3f4cf95289cf78d52c1bc184428f6d Mon Sep 17 00:00:00 2001 From: mkaesemann <32765685+mkaesemann@users.noreply.github.com> Date: Fri, 6 Jul 2018 15:16:28 +0200 Subject: [PATCH] Moved progress percentage calculation into execution block Moved the progress percentage calculation into the execution block, because we don't need to calculate the percentage if we are not going to display it. --- src/utils/zcl_abapgit_progress.clas.abap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/zcl_abapgit_progress.clas.abap b/src/utils/zcl_abapgit_progress.clas.abap index be23eac73..0cd04d52d 100644 --- a/src/utils/zcl_abapgit_progress.clas.abap +++ b/src/utils/zcl_abapgit_progress.clas.abap @@ -60,8 +60,6 @@ CLASS ZCL_ABAPGIT_PROGRESS IMPLEMENTATION. CONSTANTS: c_wait_secs TYPE i VALUE 2. - lv_pct = calc_pct( iv_current ). - GET TIME. lv_time = sy-uzeit. IF mv_cv_time_next IS INITIAL AND mv_cv_datum_next IS INITIAL. @@ -73,6 +71,8 @@ CLASS ZCL_ABAPGIT_PROGRESS IMPLEMENTATION. IF lv_time >= mv_cv_time_next AND sy-datum = mv_cv_datum_next OR sy-datum > mv_cv_datum_next. + lv_pct = calc_pct( iv_current ). + CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = lv_pct