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: 

Check for User Role

Former Member
0 Kudos

Hi,

I need to perform a check within the ABAP code, to see if a User has a particular Role assigned to him.

For eg, How do I check if the user has the Role 'SAP_SM_DTM_ALL' assigned to him? There seem to checks for Authorization Objects, but none that can directly check for a Role.

Do help me out!

Thanks & Regards,

Shalini.

1 ACCEPTED SOLUTION

Former Member

Hello

Try table AGR_USERS.

Enter user name and get all roles for user.

5 REPLIES 5

Former Member

Hello

Try table AGR_USERS.

Enter user name and get all roles for user.

Former Member
0 Kudos

Hi

Pls chck Table AGR_USERS

Hope this helps.

Praveen

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Use function module BAPI_USER_GET_DETAIL to retrieve any values which are displayed in SU01 transaction.

ACTIVITYGROUPS table parameter contains the roles which are assined to the user.

Regards,

Siva.

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Check the Table:

AGR_USERS : Assignment of roles to users

Regards,

Sreeram

Former Member
0 Kudos

Hi everybody

I would just like to remind you that you should never check a specific role assignment but the authorization objects.

Thanks

Beat