Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7202922
  • 博文数量: 655
  • 博客积分: 10264
  • 博客等级: 上将
  • 技术积分: 8278
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-04 17:47
个人简介

ABAP顾问

文章分类

全部博文(655)

文章存档

2017年(2)

2014年(8)

2013年(3)

2012年(2)

2011年(18)

2010年(102)

2009年(137)

2008年(274)

2007年(134)

分类:

2007-06-05 16:23:58

REPORT z_barry_test3 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.
阅读(5760) | 评论(5) | 转发(0) |
0

上一篇:SEARCH_ABAP_STRING

下一篇:读取内表的Field Name

给主人留下些什么吧!~~

songfb2009-09-20 10:53:27

我写了个关于ALV自动刷新的例子,可以查看: http://blog.chinaunix.net/u2/86821/showart_2055218.html

songfb2009-08-25 14:39:05

ALV刷新啊?OO的ALV很好实现啊,在屏幕上挂个定时器:CL_GUI_TIMER就好了。

chinaunix网友2009-05-22 21:24:16

能不把你ALV自动刷新例子也摆上来呢?!

qdbarry2009-04-01 09:16:28

有一个,但是不是很成熟:)

chinaunix网友2009-03-30 22:47:05

白老师有ALV自动刷新的程序么?谢谢^_^