Thursday, October 6, 2011

User's email address

The user's email address that I mean here is the email address that maintained in transaction code SU01:


In order to get this email address in program, you can use BAPI "BAPI_USER_GET_DETAIL", this will be very handy.


But, which table keep this email address? The answer is ADR6, but by looking into the content of this table, it did not has a field for user id. The key field for this table is ADDRNUMBER and PERSNUMBER, and how can we can this number?


Go into table USR21, find the user's ADDRNUMBER and PERSNUMBER by searching with user id in keyfield BNAME. Then, get the email address from table ADR6 with these two fields.

No comments: