Susmitha Susan Thomas wrote:
Infotype 0105 , Subtype 30. (Do check if its 30 in your system in PA30)
Table PA0105, pernr = p_pernr, subty = '0030'
Email address - pa0105-USRID_LONG
For reading subtype data you can use the FM HR_READ_SUBTYPE.
data : lt_0105 TYPE TABLE OF p0105.
CALL FUNCTION 'HR_READ_SUBTYPE'
EXPORTING
TCLAS = 'A'
pernr = p_pernr
infty = '0105'
subty = '0030'
* SPRPS = '*'
begda = p_begda
endda = p_endda
* BYPASS_BUFFER = ' '
* NO_AUTH_CHECK = ' '
TABLES
infty_tab = lt_0105
EXCEPTIONS
infty_not_found = 1
invalid_input = 2
OTHERS = 3.
If there are more than one record, you may need to sort it by begda and get the most recent one.
Actually it's more common to have it on subtype '0010' for company's email address. For external email address it's common to use '0030' as you say.
Cheers,
Custodio