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: 

authorization check

Former Member
0 Kudos

hi everybody

i have to allow only some of the users to change the checkbox 'Check'.I created the authorization object 'Zsample'.Plese tell me how to write the code to stop the other users to change this checkbox.

thanx in advance.

Giri.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi giri,

i use it in this way:

AUTHORITY-CHECK OBJECT 'Z_REPORT'

ID 'PROGRAM' FIELD 'ZS'

ID 'ACTVT' FIELD '16'.

IF SY-SUBRC <> 0.

MESSAGE E010 WITH 'Sie haben keine Berechtigung!'.

EXIT.

ENDIF.

Regards, Dieter

3 REPLIES 3

Former Member
0 Kudos

Hi giri,

i use it in this way:

AUTHORITY-CHECK OBJECT 'Z_REPORT'

ID 'PROGRAM' FIELD 'ZS'

ID 'ACTVT' FIELD '16'.

IF SY-SUBRC <> 0.

MESSAGE E010 WITH 'Sie haben keine Berechtigung!'.

EXIT.

ENDIF.

Regards, Dieter

former_member404244
Active Contributor
0 Kudos

Hi giri,

try like this..

AUTHORITY-CHECK OBJECT 'ZSAMPLE'

ID 'TCD' FIELD '*'

ID 'Check box' FIELD 'p_chk'.

regards,

Nagaraj

Former Member
0 Kudos

It can look as follows:

tables SSCRFIELDS.

PARAMETERS: p_chxbox as checkbox USER-COMMAND CHCK.

at selection-screen.

if SSCRFIELDS-ucomm eq 'CHCK'.

authority-check....

....

if sy-subrc ne 0.

message e(...)

endif.

endif

start-of-selection.