*&---------------------------------------------------------------------*
*& 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
.
阅读(783) | 评论(0) | 转发(0) |