cancel
Showing results for 
Search instead for 
Did you mean: 

Listing SAP Users's Emails

Former Member
0 Kudos

Hello

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.

Accepted Solutions (1)

Accepted Solutions (1)

blanca_serrano
Advisor
Advisor
0 Kudos

Hello Kaan,

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'

EXPORTING

USERNAME = gt_bname-bapibname

TABLES

RETURN = gt_return

ADDSMTP = gt_smtp.

write: / gt_bname-bapibname , gt_smtp-e_mail .

ENDLOOP .

*----


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.

Regards,

Blanca

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks very much