06-17-2008 1:02 PM
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.
06-17-2008 1:20 PM
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
06-17-2008 1:09 PM
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?
06-17-2008 1:13 PM
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.
06-17-2008 1:20 PM
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