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: 

First and Last name for a User-Id??

Former Member
0 Kudos
84,526

Hi..

I want to know the first and the last name of a USER-ID in SAP. Which table I should refer to to get the names.

Thanks

1 ACCEPTED SOLUTION

reinis_dzenis
Explorer
12,742

Hi,

I think it's a bit more complicated than that

First you would need to loook up person number (PERSNUMBER) via USER-ID in ADRP and then look for full name in USR21 via this person number.

So solution to your problem might look something like:

SELECT SINGLE adrp~name_text INTO name_text
  FROM usr21 JOIN adrp ON usr21~persnumber = adrp~persnumber AND
                          adrp~date_from   = '00010101'      AND
                          adrp~nation      = ''
  WHERE usr21~bname = usnam.

Where usnam ofcourse is USER-ID for which you want to find full name.

Regards,

Reinis

17 REPLIES 17

Former Member
12,742

Hi,

Use BAPI_USER_GET_DETAIL function or look at USR01, USR02 USR03 tables.

Regards,

Ravi

Note :Please mark the helpful answers

Former Member
0 Kudos
12,742

Hi

<b>usr01</b> is the user data table

<b>usr02</b> will hav Logon data

to get User address data refer <b>usr03</b> table

0 Kudos
12,742

check <b>usr02</b>

0 Kudos
12,742

USR01,

USR02,

USR03

Former Member
0 Kudos
12,742

Hi,

Try usr01.

Regards,

Aswin

Former Member
0 Kudos
12,742

If you just want to know the first n last name, you can see it in tcode SU01.

Former Member
12,742

tables starts with USR, holds all user related information.

like USR01 Etc..

You also can use the function module 'BAPI_USER_GET_DETAIL' to get the user details.

regards

srikanth

Message was edited by: Srikanth Kidambi

Former Member
0 Kudos
12,742

Hi,

Table USR01, usr02, USR03... gives you the user details..

U can get the name in company n address from USR03..

Regards,

Tanveer.

Former Member
0 Kudos
12,742

Hi Subhash,

You can get first name and last name of a user, using table <b>ADDR3_DATA</b>.This table contains address of persons in company.

First name <b>NAME_FIRST</b>

Last name <b>NAME_LAST</b>

To know about all users data in use tables <b>USR01,USR02 and USR03</b>.

To get user details use BAPI <b>BAPI_USER_GET_DETAIL</b>.

Thanks,

Vinay

former_member927251
Active Contributor
0 Kudos
12,742

Hi Subhash,

Search for USR* in SE11, you will get all the user related tables.

BAPI_USER_GET_DETAIL function module is also a very good idea to get the user details.

<b>Reward all the helpful answers and close the thread.</b>

Regards,

Amit Mishra

reinis_dzenis
Explorer
12,743

Hi,

I think it's a bit more complicated than that

First you would need to loook up person number (PERSNUMBER) via USER-ID in ADRP and then look for full name in USR21 via this person number.

So solution to your problem might look something like:

SELECT SINGLE adrp~name_text INTO name_text
  FROM usr21 JOIN adrp ON usr21~persnumber = adrp~persnumber AND
                          adrp~date_from   = '00010101'      AND
                          adrp~nation      = ''
  WHERE usr21~bname = usnam.

Where usnam ofcourse is USER-ID for which you want to find full name.

Regards,

Reinis

Former Member
12,742

hi subash,

hope you'll get an idea if you have a look at the database view USER_ADDR..

you can see the tables from which the data is taken..

regards

satesh

Former Member
12,742

The tables USER_ADDR and USER_ADDRS will help you get the first name and last name of a user Id.

Former Member
0 Kudos
12,742

ADRP is the table which stores NAME_FIRST NAME_LAST.

Join PERSNUMBER,NAME_FIRST, NAME_LAST-->ADRP  and

           BNAME,PERSNUMBER--> USR21


you get bname,name_first,name_last.

Pragnesh_7se7
Participant
0 Kudos
12,742

This message was moderated.

former_member246694
Participant
0 Kudos
12,742

Hi friends,

we can get the  list of user id's with first name,last name and person number using table ( v_username )

Regards

sateesh talluri

Former Member
0 Kudos
12,742

This message was moderated.