Skip to Content
avatar image
Former Member

Check for User Role

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 20, 2009 at 06:22 AM

    Hello

    Try table AGR_USERS.

    Enter user name and get all roles for user.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2009 at 06:24 AM

    Hi

    Pls chck Table AGR_USERS

    Hope this helps.

    Praveen

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2009 at 06:27 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 20, 2009 at 06:32 AM

    Hi

    Check the Table:

    AGR_USERS : Assignment of roles to users

    Regards,

    Sreeram

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2010 at 12:00 PM

    Hi everybody

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

    Thanks

    Beat

    Add comment
    10|10000 characters needed characters exceeded