Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Listing SAP Users's Emails

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.

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question