10-19-2006 8:19 AM
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.
10-19-2006 8:24 AM
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
10-19-2006 8:24 AM
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
10-19-2006 8:28 AM
Hi giri,
try like this..
AUTHORITY-CHECK OBJECT 'ZSAMPLE'
ID 'TCD' FIELD '*'
ID 'Check box' FIELD 'p_chk'.
regards,
Nagaraj
10-19-2006 8:38 AM
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.