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 test Authority Object

Former Member
0 Likes
524

Hello freinds,

I have inserted authority object in z program, how can I test the program whether the user is authorized to carry out the transaction or not???

Hello freinds,

I have inserted authority object in z program, how can I test the program whether the user is authorized to carry out the transaction or not???

3 REPLIES 3
Read only

Former Member
0 Likes
494

Hi

U need to check the SY-SUBRC:

If it's 0 it means the user has the authorition else he hasn't it.

Max

Read only

Former Member
0 Likes
494

Hi Amar,

Please place a brreak-point at the statement "AUTHORITY-CHECK" and execute the program.

If you have authrization then sy-subrc will be set to zero else some different value.

Regards,

Babul.

Read only

ThomasZloch
Active Contributor
0 Likes
494

In addition, if you want to test this authorization with a different user ID than your own logon ID, you can start function module AUTHORITY_CHECK in SE37.

Thomas