Application Development 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: 

Authority Check

abdulazeez12
Active Contributor
0 Kudos
73

Hi

I have coded in my program abt the authority check on a particular field of selection screen..

what i want is to test it..what shud i do or how shud i test whether the authority check is functioning properly or not...i tried changing the user name sy-user in debug mode by using some user name..but it is displaying the report output..

i want to do some testing where i want to see an error message that iam not authorised to see the output..

what shud i do??

Tahnks

Shakir

1 ACCEPTED SOLUTION

Former Member
0 Kudos
51

I think you have written some code like,

AUTHORITY-CHECK OBJECT <obj>

ID 'TCD' FIELD '<field>'

ID 'ACTVT' FIELD '*'.

IF sy-subrc NE 0.

MESSAGE e004.

else.

perform <perform>

endif.

Then go to debug mode and change the value of sy-subrc as 4.

Then it will shows the error.

1 REPLY 1

Former Member
0 Kudos
52

I think you have written some code like,

AUTHORITY-CHECK OBJECT <obj>

ID 'TCD' FIELD '<field>'

ID 'ACTVT' FIELD '*'.

IF sy-subrc NE 0.

MESSAGE e004.

else.

perform <perform>

endif.

Then go to debug mode and change the value of sy-subrc as 4.

Then it will shows the error.