ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 自动刷新List数据

自动刷新List数据

原创 Linux操作系统 作者:salonwang01 时间:2009-05-13 17:17:23 0 删除 编辑

REPORT  Z_TEST_AUTOLIST NO STANDARD PAGE HEADING.

TABLES: tstc,tstct.
DATA: ok_code(20).
DATA: BEGIN OF itab OCCURS 10.
        INCLUDE STRUCTURE uinfo2.
DATA: END OF itab.
START-OF-SELECTION.
  PERFORM. triger.
  WRITE:/ '.....'.
AT USER-COMMAND.
  CASE ok_code.
    WHEN 'TRIG'.
      WRITE:/ sy-uzeit. "Time
      PERFORM. getdata.
      PERFORM. write.
      PERFORM. triger.
  ENDCASE.
*---------------------------------------------------------------------*
*       FORM. WHEN_FINISHED                                            *
*---------------------------------------------------------------------*
FORM. on_finished USING taskname.
*  RECEIVE RESULTS FROM FUNCTION 'RFC_PING_AND_WAIT'.
  SET USER-COMMAND 'TRIG'.
  ok_code = 'TRIG'.
*  sy-ucomm = 'TRIG'.
ENDFORM.                    "when_finished
*---------------------------------------------------------------------*
*       FORM. getdata                                                  *
*---------------------------------------------------------------------*
FORM. getdata.
  CLEAR itab.
  REFRESH itab.
  CALL FUNCTION 'TH_LONG_USR_INFO'
       EXPORTING
            user      = '*'
       TABLES
            user_info = itab.
  SORT itab BY client user terminal tcode.
ENDFORM.
*---------------------------------------------------------------------*
*       FORM. write                                                    *
*---------------------------------------------------------------------*
FORM. write.
  LOOP AT itab .
    SELECT SINGLE ttext FROM tstct INTO tstct-ttext
                        WHERE sprsl = sy-langu       AND
                              tcode = itab-tcode.
    TRANSLATE tstct-ttext TO UPPER CASE.
    WRITE:/ itab-session,
            itab-client,
            itab-user,
            itab-terminal,
            itab-tcode,
            itab-time,
            itab-lang,
            tstct-ttext.
  ENDLOOP.
  sy-lsind = 0.
ENDFORM.
*---------------------------------------------------------------------*
*       FORM. triger                                                   *
*---------------------------------------------------------------------*
FORM. triger.
  CALL FUNCTION 'RFC_PING_AND_WAIT'
    STARTING NEW TASK '001'
    PERFORMING on_finished ON END OF TASK
  EXPORTING
    seconds            = 4
    busy_waiting       = ' ' .
ENDFORM.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9394055/viewspace-596519/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 自动刷新ALV数据
下一篇: 订单BOM
请登录后发表评论 登录
全部评论

注册时间:2009-05-13

  • 博文量
    4
  • 访问量
    5615