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.
This commit is contained in:
mkaesemann 2018-07-06 15:16:28 +02:00 committed by GitHub
parent 7ec692389e
commit b80a10024b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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