Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

User E-mail address

Former Member
0 Likes
1,599

Hi ,

Can anybody tell me the table from which i can select the user's E-mail address, with the help of the user id in the "where" clause of the "select" statement.

Regards

Naren Rathinavelu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,462

hi,

Use FM ISR_GET_USER_DETAILS. You will get that.

Regards,

Chandra.

Note: Please reward if helpful.

11 REPLIES 11
Read only

venkata_ramisetti
Active Contributor
0 Likes
1,462

Hi,

YOu can find in table ADR6.

USR21: TO GET ADDRESS NUMBER OF USER ID

ADR6: TO GET EMAIL ADDRESS OF THE ADDRESS NUMBER

Thanks,

Ramakrishna

Message was edited by: Ramakrishna Prasad Ramisetti

Read only

0 Likes
1,462

Hi,

thanks for the response, what i have is a user id with me not a personale number, how shall i get the e-mail address using my user id, please help.

Regards

Narendiran Rathinavelu

Read only

0 Likes
1,462

Hi,

Alternatively, you can use this FM

CALL FUNCTION 'FTR_CORR_CHECK_EMAIL_SAP_USER'

EXPORTING

i_user = user

IMPORTING

e_email_address = email

EXCEPTIONS

mail_address = 1

determination_error = 2

OTHERS = 3.

Eddy

Read only

0 Likes
1,462

Hi Naren,

Use function module

EFG_GEN_GET_USER_EMAIL

CALL FUNCTION 'EFG_GEN_GET_USER_EMAIL'

EXPORTING

i_uname = l_dummy_user

IMPORTING

e_email_address = g_mail

EXCEPTIONS

not_qualified = 1

user_not_found = 2

address_not_found = 3

OTHERS = 4.

that should solve your problem

      • Reward if helpful ****

Read only

0 Likes
1,462

Hi Naren,

Use the function module ISR_GET_USER_DETAILS, there input parameter is User id. You will get all the details. Check it once.

Regards,

Chandra.

Note: Please reward if helpful.

Read only

0 Likes
1,462

hi,

YOu can find in table ADR6.

USR21: TO GET ADDRESS NUMBER OF USER ID

ADR6: TO GET EMAIL ADDRESS OF THE ADDRESS NUMBER

tHANKS,

rAMAKRISHNA

Read only

Former Member
0 Likes
1,463

hi,

Use FM ISR_GET_USER_DETAILS. You will get that.

Regards,

Chandra.

Note: Please reward if helpful.

Read only

Former Member
0 Likes
1,462

Hi,

use FM BAPI_USER_GET_DETAIL.

there are all Information you need.

regards, Dieter

Read only

Former Member
0 Likes
1,462

Hi,

here a short example

REPORT ZGRO_TEST.

*

DATA: BEGIN OF SMTP OCCURS 0.

INCLUDE STRUCTURE BAPIADSMTP.

DATA: END OF SMTP.

*

DATA: BEGIN OF RT OCCURS 0.

INCLUDE STRUCTURE BAPIRET2.

DATA: END OF RT.

*

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

USERNAME = SY-UNAME

TABLES

RETURN = RT

ADDSMTP = SMTP.

*

IF RT-NUMBER = 0.

LOOP AT SMTP.

WRITE: / SMTP-E_MAIL.

ENDLOOP.

ENDIF.

Regards, Dieter

Read only

Former Member
0 Likes
1,462

hi ,

Please try table <b>pa0105</b> it is an infotype for(Communications)

the 2 fields used are

USRID

USRID_LONG

but be careful with subtype...

0001 SAP System User ID

0005 Business Fax Number

0010 Business e-mail

0020 First Telephone Number at Work

Based on the organisation you may have custom subtypes

if for example you want to select business e-mail using a select query as follows

SELECT SINGLE usrid_long FROM pa0105

INTO wf_email_id WHERE

pernr = p9051-pernr

AND subty = '0010'

AND endda GE sy-datum

AND begda LE sy-datum.

*Hope you found the above information useful

Regards

BX

Read only

0 Likes
1,462

Hi,

One more point to be added to my above reply..

the user id is also there in pa0105,so you can select the mail id in relation to username also but the subtypes will make it a bit messy for you to grt the right record

Regards

BX