Chinaunix首页 | 论坛 | 博客

afu

  • 博客访问: 15151
  • 博文数量: 4
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 50
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-05 17:09
文章分类

全部博文(4)

文章存档

2011年(1)

2008年(3)

我的朋友
最近访客

分类:

2008-03-07 10:02:37




*&---------------------------------------------------------------------*
*& Report  ZZMESSAGE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZZMESSAGE message-id za.
data: list like uinfo occurs 0 with header line.
data: mess like sm04dic-popupmsg.
parameters: p_mandt  like  sy-mandt default sy-mandt,  “ 接收者Client
           p_user like USR02-BNAME,   “ 接收者
           p_mess1(40),
           p_mess2(40),
           p_mess3(25),
           p_sender  like USR02-BNAME default sy-uname,  ” 发送者
           p_time type i default '1'.                    ”发送次数(<=3)


at selection-screen.
perform check.

start-of-selection.

concatenate p_sender '对你说:' p_mess1
  p_mess2 p_mess3 into mess.
condense mess.
 if  p_time > 3 .
   p_time = 3 .
 endif.
do p_time times.
   CALL function 'TH_POPUP'
        EXPORTING
             CLIENT  = p_mandt
             USER    = p_user
             MESSAGE = mess.
enddo.
*---------------------------------------------------------------------
*
*       FORM check
*
*---------------------------------------------------------------------
*
*       ........
*
*---------------------------------------------------------------------
*
FORM check.
CALL function 'TH_USER_LIST'
      TABLES
           LIST = list.
read table list with key bname = p_user mandt = p_mandt.
if sy-subrc <>  0.
   read table list with key bname = p_user.
   message e001 with 'the user not on this client, but in'
    list-mandt.
endif.
ENDFORM.                    " check
.
阅读(741) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~