Application Development 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: 

Get E-Mail Id from User Id

Former Member
0 Kudos

Hi,

I should get the Email id using User Id. I am checking infotype 105 to get the Email Id, but here I am able to get only for Employees for contract Employees data will not be there in infotype 105.

Is there any otherway to get Email Id for Contract Employees and Regular Employees.

Regards,

Ramu N.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Email can be maitined in User Profile of the User. There you can get the Email for all the users if maitinaed.

Use FM BAPI_USER_GET_DETAIL. .

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

USERNAME = USERNAME

IMPORTING

REF_USER = REF_USER

ALIAS = ALIAS

SNC = SNC

COMPANY = COMPANY

ADDRESS = ADDRESS

DEFAULTS = DEFAULTS

LOGONDATA = LOGONDATA

UCLASS = UCLASS

LASTMODIFIED = LASTMODIFIED

ISLOCKED = ISLOCKED

TABLES

GROUPS = GROUPS

ADDPRT = ADDPRT

ADDRFC = ADDRFC

ADDX400 = ADDX400

ADDRML = ADDRML

ADDSSF = ADDSSF

ADDURI = ADDURI

ADDPAG = ADDPAG

ADDCOMREM = ADDCOMREM

ADDSMTP = ADDSMTP

PARAMETER = PARAMETER

PARAMETER1 = PARAMETER1

PROFILES = PROFILES

ACTIVITYGROUPS = ACTIVITYGROUPS

RETURN = RETURN

ADDTEL = ADDTEL

ADDFAX = ADDFAX

ADDTTX = ADDTTX

ADDTLX = ADDTLX

EXTIDHEAD = EXTIDHEAD

EXTIDPART = EXTIDPART

UCLASSSYS = UCLASSSYS

SYSTEMS = SYSTEMS

EXCEPTIONS

OTHERS = 01.

e_mail = address-e_mail.

Hope I understood your question and the above would solve your issue.Please let me know if anything else is required.

Regards,

Sharath

3 REPLIES 3

Rashid_Javed
Contributor
0 Kudos

This is not an ABAP question but more of a functional question. You should check with your HR and System consultants to find out that how the email data is maintained in reality for contract and permanent employees.

Yes, infotype 105 is use to store these type of entries but if contract employee is not there, you should ask your functional guys if this data is even saved in SAP and if yes, than can they show it on screen?

RJv

GauthamV
Active Contributor
0 Kudos

hi,

I think the details of contract employees r not stored in sap.

if the client wants to store that details also then there is no other option but to do it in 105 infotype only.

reward points if hlpful.

Former Member
0 Kudos

Hi,

Email can be maitined in User Profile of the User. There you can get the Email for all the users if maitinaed.

Use FM BAPI_USER_GET_DETAIL. .

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

USERNAME = USERNAME

IMPORTING

REF_USER = REF_USER

ALIAS = ALIAS

SNC = SNC

COMPANY = COMPANY

ADDRESS = ADDRESS

DEFAULTS = DEFAULTS

LOGONDATA = LOGONDATA

UCLASS = UCLASS

LASTMODIFIED = LASTMODIFIED

ISLOCKED = ISLOCKED

TABLES

GROUPS = GROUPS

ADDPRT = ADDPRT

ADDRFC = ADDRFC

ADDX400 = ADDX400

ADDRML = ADDRML

ADDSSF = ADDSSF

ADDURI = ADDURI

ADDPAG = ADDPAG

ADDCOMREM = ADDCOMREM

ADDSMTP = ADDSMTP

PARAMETER = PARAMETER

PARAMETER1 = PARAMETER1

PROFILES = PROFILES

ACTIVITYGROUPS = ACTIVITYGROUPS

RETURN = RETURN

ADDTEL = ADDTEL

ADDFAX = ADDFAX

ADDTTX = ADDTTX

ADDTLX = ADDTLX

EXTIDHEAD = EXTIDHEAD

EXTIDPART = EXTIDPART

UCLASSSYS = UCLASSSYS

SYSTEMS = SYSTEMS

EXCEPTIONS

OTHERS = 01.

e_mail = address-e_mail.

Hope I understood your question and the above would solve your issue.Please let me know if anything else is required.

Regards,

Sharath