在abap编程中经常用到progress indicator,现在偶把这个函数详细说明一下,再做两个实例看看。
函数名:SAPGUI_PROGRESS_INDICATOR
FUNCTION GROUP:SGUI
参数:IMPORT:PERCENTAGE 进度百分数
:TEXT 描述
使用实例1:显示进度
REPORT Z_DEMO1.
DATA: A LIKE SY-UCOMM.
DO 100 TIMES.
DO 300 TIMES. “做个时间延迟
GET TIME.
ENDDO.
A(3) = SY-INDEX.A+3 = '%'. “取得进度的百分数
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = SY-INDEX
TEXT = A.
ENDDO.
使用实例2:显示滑动字符流
REPORT Z_DEMO2 .
DATA: MESSAGE(30) VALUE ' Waiting for an answer'.
DO 100 TIMES.
DO 300 TIMES.
GET TIME.
ENDDO.
SHIFT MESSAGE CIRCULAR RIGHT.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = ''
TEXT = MESSAGE.
ENDDO.