‎2006 Oct 20 7:36 PM
HI Frenz,
in which tables i can find username, user's address, phone number, email id?
i have user ID... i need to print other details also.
Regards
‎2006 Oct 20 7:39 PM
You can get the user address information from the ADRC, and ADR6 tables. Check ADRC to get the relevant fields for address.
For example, here is how to join the tables.
report zrich_0001.
data: begin of user_info,
bname type usr21-bname,
name_text type adrp-name_text,
tel_number type adcp-tel_number,
tel_extens type adcp-tel_extens,
smtp_addr type adr6-smtp_addr,
end of user_info.
* Get User Data
clear user_info.
select single usr21~bname adrp~name_text adcp~tel_number
adcp~tel_extens adr6~smtp_addr
into corresponding fields of user_info
from usr21
inner join adrc
on usr21~addrnumber = adrc~addrnumber
inner join adrp
on usr21~persnumber = adrp~persnumber
inner join adcp
on usr21~addrnumber = adcp~addrnumber
and usr21~persnumber = adcp~persnumber
inner join adr6
on adcp~addrnumber = adr6~addrnumber
and adcp~persnumber = adr6~persnumber
where usr21~bname = sy-uname.
write:/ user_info-bname, user_info-name_text, user_info-tel_number,
user_info-tel_extens, user_info-smtp_addr.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
‎2006 Oct 20 7:39 PM
You can get the user address information from the ADRC, and ADR6 tables. Check ADRC to get the relevant fields for address.
For example, here is how to join the tables.
report zrich_0001.
data: begin of user_info,
bname type usr21-bname,
name_text type adrp-name_text,
tel_number type adcp-tel_number,
tel_extens type adcp-tel_extens,
smtp_addr type adr6-smtp_addr,
end of user_info.
* Get User Data
clear user_info.
select single usr21~bname adrp~name_text adcp~tel_number
adcp~tel_extens adr6~smtp_addr
into corresponding fields of user_info
from usr21
inner join adrc
on usr21~addrnumber = adrc~addrnumber
inner join adrp
on usr21~persnumber = adrp~persnumber
inner join adcp
on usr21~addrnumber = adcp~addrnumber
and usr21~persnumber = adcp~persnumber
inner join adr6
on adcp~addrnumber = adr6~addrnumber
and adcp~persnumber = adr6~persnumber
where usr21~bname = sy-uname.
write:/ user_info-bname, user_info-name_text, user_info-tel_number,
user_info-tel_extens, user_info-smtp_addr.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
‎2006 Oct 20 7:40 PM
Hi,
Check the following tables
USR01
USR02
USR03..
You can use the BAPI BAPI_USER_GET_DETAIL..
Thanks,
Naren
‎2006 Oct 20 7:53 PM
‎2006 Oct 22 9:13 AM
Hi ,
for a standard organisation they will be storing all employee/personal data for communication in "communications Infotype" where different subtype shows mail id,phone number etc....usually it is a custom developed infotype ...it will be starting with PAxxxx....
eg:pa9006...its a very large place to hunt down......
Regards
BX
‎2006 Oct 22 12:50 PM
hi,
one more point----
please try <b>pa0105</b> table with subtype <u>20</u> for <u>phone number</u>field =>usrid
pa0105 table with subtype <u>10</u> for <u>mail id</u>field =>usrid_long
it is a communication table and a standard infotype..varying subtypes could give you your desired results
Regards
‎2006 Oct 23 10:20 PM
Hi
Check this code...
Select single pernr uname
from pa0105
into ( l_pernr, l_user )
where subty = '0001'
and usrid = sy-user.
endselect.
for subty 0010 in pa0105, you will get the e-mail id.
with the help of this pernr, do a select on pa0006 to get the details like address and phone number.
select (fields required)
from pa0006
into table itab
where pernr = l_pernr
and subty = '1'
and endda = '99991231'.
Regards
Navneet