This code provides user awareness about progress percentages.
Result:

Code:
report zanil .
* SAP Progress BAR Example
data : lt_bkpf type table of bkpf .
data : ls_bkpf type bkpf .
data : lv_lines type i .
data : lv_per type i .
data : dynamic_per type p .
data : lv_dy_per(3) .
data : lv_text(40) .
start–of–selection.
select * from bkpf into table lt_bkpf .
describe table lt_bkpf lines lv_lines .
loop at lt_bkpf into ls_bkpf.
wait up to 1 seconds.
clear dynamic_per.
dynamic_per = 100 * ( sy–tabix / lv_lines ).
lv_dy_per = dynamic_per.
shift lv_dy_per left deleting leading ‘ ‘.
concatenate lv_dy_per ‘% Completed’ into lv_text.
if dynamic_per gt lv_per or sy–tabix eq 1.
call function ‘SAPGUI_PROGRESS_INDICATOR’
exporting
percentage = dynamic_per
text = lv_text.
lv_per = dynamic_per.
endif.
endloop.
