Listing SAP Users's Emails
I want to create a list which contains SAP Users's user name, telephone number and email addresses. I can get email addresses from USR21 / ADR6 but it lists as personel number and SUIM lists only phone numbers and user names.
Is there any transaction/table which I can find all information which I need in one place?
I know I can find that info in SU01 but I can't make a list for 300-350 users by using that transaction.
To get all the user information you need, you can create a report containing a loop over table USR02 and call for every user the function module BAPI_USER_GET_DETAIL. The result of this call are all detail data
for the user and you can decide which fields you want to use.
To give you an impression I attach a short demo program. The sample is about the SMTP-adress list all non adress user data.
REPORT Z_LIST_USERS .
TABLES: usr02 .
DATA: gt_bname TYPE TABLE OF BAPIBNAME WITH HEADER LINE ,
gt_return TYPE TABLE OF BAPIRET2 ,
gt_smtp TYPE TABLE OF BAPIADSMTP WITH HEADER LINE .
SELECT-OPTIONS users FOR USR02-BNAME .
SELECT bname FROM USR02 INTO TABLE gt_bname WHERE bname IN users .
LOOP AT gt_bname .
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
USERNAME = gt_bname-bapibname
RETURN = gt_return
ADDSMTP = gt_smtp.
write: / gt_bname-bapibname , gt_smtp-e_mail .
So you can try to implement this short ABAP-code in your system as a demo, but you should ask onsite for more support about the tools in the environment of user administration.
Hopefull that helps you to obtain your detailed user list.