Skip to Content
author's profile photo Former Member
Former Member

Function module (Or any way) to check perticulat user has authorization

Hi,

Do we have any Function module (Or any way) to check perticulat user has authorization to perticular transaction..??

I mean, I have user called 'ABC' ... I need to check he has authorization to 'MM01' transaction... like this I need to check for several users...

Regards,

Rays

Add comment
10|10000 characters needed characters exceeded

6 Answers

  • Posted on Jan 04, 2006 at 06:54 AM

    Hi

    run the transaction se97 to know the authorizations for a user.

    (not in change mode) go to display mode.

    thanks

    vijay

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2006 at 06:56 AM

    Try with the FM RKE_CHECK_AUTHORITY

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 04, 2006 at 06:57 AM

    Hi,

    You need to create a authorization object ( EG. Z_CHECK_PLANTS ).

    AUTHORITY-CHECK OBJECT 'Z_CHECK_PLANTS'

    ID 'PLANT' FIELD WA_INPUT-WERKS.

    SY-SUBRC NE 0 -- AUTHORIZATION FAILED ( NO ACCESS TO USER )

    Best regards,

    Prashant

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2006 at 06:58 AM

    Hi,

    Goto transaction SUIM.

    There is a hierarchy tree select the User option and give the user name. You will get the list of transactions he is authorised to execute.

    Hope it helps...

    Lokesh

    Pls. reward appropriate points

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      > Solved proble with FM SUSR_TCODES_LIST_SELOPT_USER

      >

      > Thanks,

      > Rayudu

      this one does list all tcode for one user!

      If you only need to check 1 codes I would not suggest to use this one!

  • Posted on Jan 04, 2006 at 08:13 AM

    Hi,

    Pass that TCODE as a object in AUTHORITY-CHECK.

    It will do the validation for user name with TCODE.

    Best regards,

    Prashant

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2006 at 08:25 AM

    Use this one!

    AUTHORITY_CHECK

    CALL FUNCTION 'AUTHORITY_CHECK'

    EXPORTING

    USER = user_name

    object = 'S_TCODE'

    field1 = 'TCD'

    VALUE1 = 'MM01'

    EXCEPTIONS

    USER_DONT_EXIST = 1

    USER_IS_AUTHORIZED = 2

    USER_NOT_AUTHORIZED = 3

    USER_IS_LOCKED = 4

    OTHERS = 5

    .

    Thanks not forgetting the reward!

    Add comment
    10|10000 characters needed characters exceeded