1.'TH_POPUP'
system message2.'TH_USER_LIST'
用户列表,可以取道每个user 在干吗..
3. 'BAPI_USER_GET_DETAIL'
举例说明REPORT ZSM 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,
p_user like sy-uname,
p_mess1(40),
p_mess2(40),
p_mess3(25),
p_sender like sy-uname default sy-uname,
p_time type i default '1'.
data: list like uinfo occurs 0 with header line.
data: mess like sm04dic-popupmsg.
parameters: p_mandt like sy-mandt default sy-mandt,
p_user like sy-uname,
p_mess1(40),
p_mess2(40),
p_mess3(25),
p_sender like sy-uname default sy-uname,
p_time type i default '1'.
at selection-screen.
perform check.
start-of-selection.
concatenate p_sender 'test111' p_mess1
p_mess2 p_mess3 into mess.
condense mess.
do p_time times.
CALL function 'TH_POPUP'
EXPORTING
CLIENT = p_mandt
USER = p_user
MESSAGE = mess.
enddo.
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
p_mess2 p_mess3 into mess.
condense mess.
do p_time times.
CALL function 'TH_POPUP'
EXPORTING
CLIENT = p_mandt
USER = p_user
MESSAGE = mess.
enddo.
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