2006 Sep 08 7:08 AM
Hi,
I need the table where the userid's of the users currently logged into the client. Any pointers on this
Hi,
I need the table where the userid's of the users currently logged into the client. Any pointers on this
2006 Sep 08 7:09 AM
CHECK...<b>USR02</b>
ALSO CHECK SM04 and double click on the user id, it will tell you those details
2006 Sep 08 7:11 AM
You can do something like this :
data :
BEGIN OF t_user OCCURS 0,
counter TYPE i,
selection TYPE c,
mandt LIKE sy-mandt,
bname LIKE sy-uname,
name_first LIKE v_adrp_cp-name_first,
name_last LIKE v_adrp_cp-name_last,
department LIKE v_adrp_cp-department,
tel_number LIKE v_adrp_cp-tel_number,
END OF t_user,
l_client LIKE sy-mandt,
l_userid LIKE uinfo-bname,
l_opcode TYPE x,
l_funct_code(1) TYPE c,
l_test(200) TYPE c.
l_opcode = 2.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD l_opcode
ID 'TAB' FIELD usr_tabl-sys.
CLEAR t_user. REFRESH t_user.
LOOP AT usr_tabl.
t_user-mandt = usr_tabl-mandt.
t_user-bname = usr_tabl-bname.
APPEND t_user.
ENDLOOP.
SORT t_user.
DELETE ADJACENT DUPLICATES FROM t_user.
LOOP AT t_user.
t_user-counter = sy-tabix.
SELECT v~name_first
v~name_last
v~department
v~tel_number
INTO (t_user-name_first,
t_user-name_last,
t_user-department,
t_user-tel_number)
FROM usr21 AS u
JOIN v_adrp_cp AS v
ON upersnumber = vpersnumber AND
uaddrnumber = vaddrnumber
WHERE u~bname = t_user-bname.
ENDSELECT.
MODIFY t_user.
ENDLOOP.
SORT t_user BY name_last name_first.
table t_user now contains all the user details
2006 Sep 08 7:11 AM
2006 Sep 08 7:11 AM
hi,
1. use the FM TH_SYSTEMWIDE_USER_LIST
2. Not only the user list,
u will also get the
terminal, various tcodes,
they are currently using.
for any clarifiaction pls mail me.
pls reward points, if this helped u.
regards,
anversha.
2006 Sep 08 7:12 AM
Hi Pankaj,
u can use the FM TH_SYSTEMWIDE_USER_LIST ,also u can use the table USR02.
regards,
nagaraj
2006 Sep 08 7:12 AM
Hi,
there's a function module called TH_USER_LIST in R/3 you can use for this. It'll return the list of users logged in.
Regards,
Ram
Pls reward points if helpful.
2006 Sep 08 7:17 AM
2006 Sep 08 7:36 AM
Hllo Pankaj,
In table <b>USR41</b> itself you can find the user id of the users who are currently logged in.
The field is <b>BNAME</b>.
Thanks,
Krishnakumar