2008 Jul 16 8:11 AM
Hi there,
is there any function module that brings me the mail adress of a the user logged in. I mean the mailaddy in his profile.
How can I get it?
Thanks a lot.
.
Markus
2008 Jul 16 8:19 AM
Use the Function
BAPI_USER_GET_DETAIL
pass the user name and you can find the Email address from the table parameter
ADDSMTP
2008 Jul 16 8:19 AM
Use the Function
BAPI_USER_GET_DETAIL
pass the user name and you can find the Email address from the table parameter
ADDSMTP
2008 Jul 16 8:24 AM
Hi Markus,
Use this BAPI BAPI_USER_GET_DETAIL.
Check below sample code.
MOVE sy-uname TO w_username.
CLEAR wa_address.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = w_username
IMPORTING
* LOGONDATA =
* DEFAULTS =
address = wa_address
* COMPANY =
* SNC =
* REF_USER =
* ALIAS =
TABLES
* PARAMETER =
* PROFILES =
* ACTIVITYGROUPS =
return = i_return
* ADDTEL =
* ADDFAX =
* ADDTTX =
* ADDTLX =
* ADDSMTP =
* ADDRML =
* ADDX400 =
* ADDRFC =
* ADDPRT =
* ADDSSF =
* ADDURI =
* ADDPAG =
* ADDCOMREM =
* GROUPS =
.
mailid = wa_address-e_mail.
This will return the mail ID only if it is maintained in user master.
If ur functionality is to send the mail then after calling this FM if mail ID exists then send mail to this ID else send mail to SAP account.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Jul 16, 2008 12:55 PM
2008 Jul 16 8:29 AM
Hi
Go through the link given below:
http://help.sap.com/saphelp_nw04/helpdata/en/e6/1e3189b7b311d3b54f006094192fe3/frameset.htm
With Regards
Nikunj Shah
2008 Jul 16 8:32 AM
hiii
you can use
BAPI_USER_GETLIST Search for Users
BAPI_USER_GET_DETAIL Read User Details
FM for getting user and his detail like mail address
regards
twinkal
2008 Jul 16 9:22 AM
Use FM : BAPI_USER_GET_DETAIL
or write select on PA0105 passing USRID = sy-uname
subty = '0010' and get USRID_LONG