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: 

A question about users assigned roles extraction

Former Member
0 Kudos

Dear all,

I have a question about users assigned roles list extraction. I need the list of the users who have already been created along with their assigned roles. According to what I found on Google, there is a table named AGR_USERS which provides the roles assigned to each user. Yet, this table provides only the SAP ID of each user along with the assigned roles. What I need more is to have also the first name and second name of each user.

So, do you know any table providing at least the following information:

1) First name of each user

2) Second name of each user

3) SAP ID of each user

4) All assigned roles to each user.

NOTE: I really need to have first name and second name in separate columns

Thanks in advance,

Dariyoosh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Agr_users for the user ID and role assignments

USR02 to check the validity of the User ID

and USER_ADDR for the first name and last name

You can create a Table join of the above 3 tables to retrieve the data you require

7 REPLIES 7

jurjen_heeck
Active Contributor
0 Kudos

The table with your first & last names is ADRP. You also need USR21 to link the person to the username.

Former Member
0 Kudos

Agr_users for the user ID and role assignments

USR02 to check the validity of the User ID

and USER_ADDR for the first name and last name

You can create a Table join of the above 3 tables to retrieve the data you require

0 Kudos

>

> Agr_users for the user ID and role assignments

> USR02 to check the validity of the User ID

> and USER_ADDR for the first name and last name

>

> You can create a Table join of the above 3 tables to retrieve the data you require

Thanks to you and others for your attention to my problem

I don't know anything about ABAP programming, is there any transaction allowing to create this join? As it seems to me the column "UNAME" in the table "AGR_USERS" and the column "BNAME" in the table "USER_ADDR", both refer to the SAP ID of the user. As a result the condition of the join would be "WHERE (UNAME = BNAME)", is there any transaction/programme allowing to create this join?

Thanks in advance,

Dariyoosh

0 Kudos

>

> is there any transaction/programme allowing to create this join?

Transaction SQVI, the quickviewer, is your friend here.

0 Kudos

>

> >

> > is there any transaction/programme allowing to create this join?

>

> Transaction SQVI, the quickviewer, is your friend here.

Thank you very much for this nice solution which solved the problem ! :):):).

I also thank everybody who spent time and attention on my problem.

Kind Regards,

Dariyoosh

0 Kudos

Hi,

I'm glad it is now sorted. If for whatever reason you don't have access to SQVI in prod, then it is a simple task to combine this information in programs such as Excel or Access

Bernhard_SAP
Advisor
Advisor
0 Kudos

....report RSUSR002 gives first and last name and also the assigned roles, but first name and last name are contained in one column....

example: t-code S_BCE_68001399 in the result list click on the 'Roles'-button.

b.rgds, Bernhard