Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 0.82 KB | None | 0 0
  1. FORM progress_bar USING p_value
  2.                         p_tabix
  3.                         p_nlines.
  4.   DATA: w_text(40),
  5.         w_percentage TYPE p,
  6.         w_percent_char(3).
  7.   w_percentage = ( p_tabix / tot_rec ) * 100.
  8.   w_percent_char = w_percentage.
  9.   SHIFT w_percent_char LEFT DELETING LEADING ' '.
  10.   CONCATENATE p_value w_percent_char '% Complete' INTO w_text SEPARATED BY space.
  11. * This check needs to be in otherwise when looping around big tables
  12. * SAP will re-display indicator too many times causing report to run
  13. * very slow. (No need to re-display same percentage anyway)
  14.   IF w_percentage GT gd_percent OR p_tabix EQ 1.
  15.     CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
  16.       EXPORTING
  17.         percentage = w_percentage
  18.         text       = w_text.
  19.     gd_percent = w_percentage.
  20.   ENDIF.
  21. ENDFORM.                    " PROGRESS_BAR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement