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

Authority check

Former Member
0 Likes
478

Hi

I want check the authorisation object for one Z transaction(To restrict it for certain users). Will this code is sufficient.

authority-check object 'S_TCODE'

id 'TCD' field sy-tcode .

if sy-subrc <> 0.

Error message.

endif.

Regards

Raj.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
459

Hi ,

This code will work .

Also you can use the following function module .

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

tcode = v_tcode

EXCEPTIONS

ok = 1

not_ok = 2

OTHERS = 3.

Which is better way .

Please reward if useful.

Hi

I want check the authorisation object for one Z transaction(To restrict it for certain users). Will this code is sufficient.

authority-check object 'S_TCODE'

id 'TCD' field sy-tcode .

if sy-subrc <> 0.

Error message.

endif.

Regards

Raj.

2 REPLIES 2
Read only

Former Member
0 Likes
460

Hi ,

This code will work .

Also you can use the following function module .

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

tcode = v_tcode

EXCEPTIONS

ok = 1

not_ok = 2

OTHERS = 3.

Which is better way .

Please reward if useful.

Read only

Former Member
0 Likes
459

Hi ,

This is sufficient but you have to attach the Authorization object S_TCODE with your transaction.

You can check it in the transaction SE93 for your transaction.

Regards,

Nilesh