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

authorization check

Former Member
0 Likes
595

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
Read only

Former Member
0 Likes
552

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
Read only

Former Member
0 Likes
553

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

Read only

former_member404244
Active Contributor
0 Likes
552

Hi giri,

try like this..

AUTHORITY-CHECK OBJECT 'ZSAMPLE'

ID 'TCD' FIELD '*'

ID 'Check box' FIELD 'p_chk'.

regards,

Nagaraj

Read only

Former Member
0 Likes
552

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.