Application Development and Automation 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: 
Read only

How to check user has authorization with transaction code AAA?

Former Member
0 Likes
16,334

Hi,all

How to check if user has authorization with transaction code AAA in ABAP? Could you give me the steps with your comment where you had better told me why ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,144

Hi chen,

You can use function module AUTHORITY_CHECK_TCODE for this. Some thing like,

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

TCODE = <Your Tcode here>

EXCEPTIONS

OK = 0

NOT_OK = 1

OTHERS = 2.

IF sy-subrc <> 0.

****No Authorization

ENDIF.

Hope this helps..

Sri

4 REPLIES 4
Read only

Former Member
0 Likes
4,144

RUn transaction AAA

and then run SU53 then you can see the list of authorizations..

for the user..

Read only

Former Member
0 Likes
4,144

And se97 you can set the authorization for the transaction.

and also you can see the authorizations..

Message was edited by: Vijay Babu Dudla

Read only

Former Member
0 Likes
4,145

Hi chen,

You can use function module AUTHORITY_CHECK_TCODE for this. Some thing like,

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

TCODE = <Your Tcode here>

EXCEPTIONS

OK = 0

NOT_OK = 1

OTHERS = 2.

IF sy-subrc <> 0.

****No Authorization

ENDIF.

Hope this helps..

Sri

Read only

Former Member
0 Likes
4,144

You can use the authority-check statement in the code and use object s_tcode.