function zwiki_active_users.
*"----------------------------------------------------------------------
*"*"Interface local:
*" TABLES
*" T_USERS STRUCTURE ZWIKI_USERS
*" T_RETURN STRUCTURE BAPIRET2 OPTIONAL
*"----------------------------------------------------------------------
types: begin of ty_names,
bname type xubname,
name_text type ad_namtext,
end of ty_names.
data: lt_list type table of usrinfo,
lt_ulist type table of uinfo,
lt_names type table of ty_names,
ls_names type ty_names,
ls_list type usrinfo,
ls_users type zwiki_users,
ls_return type bapiret2.
call function 'TH_USER_LIST'
tables
list = lt_ulist
usrlist = lt_list
exceptions
auth_misssing = 1
others = 2.
if sy-subrc eq 0.
"Get the User Names...
select usr21~bname adrp~name_text
into table lt_names
from usr21 join adrp on usr21~persnumber = adrp~persnumber and
adrp~date_from = '00010101' and
adrp~nation = ''
for all entries in lt_list
where usr21~bname = lt_list-bname.
if sy-subrc eq 0.
loop at lt_names into ls_names.
ls_users-uname = ls_names-bname.
ls_users-fullname = ls_names-name_text.
append ls_users to t_users.
endloop.
endif.
else.
ls_return-type = 'E'.
ls_return-message = 'You do not rule!'.
append ls_return to t_return.
endif.
endfunction.
function zwiki_send_message.
*"----------------------------------------------------------------------
*"*"Interface local:
*" IMPORTING
*" VALUE(I_USER) TYPE ZWIKI_USERS
*" TABLES
*" T_RETURN STRUCTURE BAPIRET2 OPTIONAL
*"----------------------------------------------------------------------
data: ls_return type bapiret2.
call function 'TH_POPUP'
exporting
client = sy-mandt
user = i_user-uname
message = i_user-message
exceptions
user_not_found = 1
others = 2.
if sy-subrc ne 0.
ls_return-type = 'E'.
ls_return-message = 'You do not rule!'.
append ls_return to t_return.
endif.
endfunction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |