- Call commit work whenever you want to reset the counter of running time for your transaction (especially if you haven't done any update into database tables)
- If commit work doesn't work or you don't want to use it at the moment then you could use FM TH_REDISPATCH with the check_runtime parameter equal to 0.
- You could also you FM SAPGUI_PROGRESS_INDICATOR for the same purpose but keep in mind that showing indicator too often can slower your program.
Although it's nice to know this possibility my advice is to not to use it very often as the less time you have for program run the more optimized code you can provide, so it's really something that you use if you do not have other choice and you agreed that with your system admins.
report zab_reset_runtime.
data: gt_vbak type standard table of vbak.
do.
select * up to 1000 rows from vbak
into corresponding fields of table gt_vbak.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
* PERCENTAGE = 0
text = sy-index
.
if sy-index eq 1000.
exit.
endif.
enddo.
"or
do.
select * up to 1000 rows from vbak
into corresponding fields of table gt_vbak.
commit work.
if sy-index eq 1000.
exit.
endif.
enddo.
"or
do.
select * up to 1000 rows from vbak
into corresponding fields of table gt_vbak.
call function 'TH_REDISPATCH'
exporting
check_runtime = 0.
if sy-index eq 1000.
exit.
endif.
enddo.