‎2006 Oct 24 12:26 PM
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.
‎2006 Oct 24 12:32 PM
hi,
Use FM ISR_GET_USER_DETAILS. You will get that.
Regards,
Chandra.
Note: Please reward if helpful.
‎2006 Oct 24 12:30 PM
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
‎2006 Oct 24 12:34 PM
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
‎2006 Oct 24 12:35 PM
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
‎2006 Oct 24 12:38 PM
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 ****
‎2006 Oct 24 12:38 PM
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.
‎2006 Oct 24 12:39 PM
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
‎2006 Oct 24 12:32 PM
hi,
Use FM ISR_GET_USER_DETAILS. You will get that.
Regards,
Chandra.
Note: Please reward if helpful.
‎2006 Oct 24 12:37 PM
Hi,
use FM BAPI_USER_GET_DETAIL.
there are all Information you need.
regards, Dieter
‎2006 Oct 24 12:51 PM
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
‎2006 Oct 24 1:20 PM
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
‎2006 Oct 24 1:34 PM
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