‎2006 Sep 01 3:31 PM
I have two checkboxes in the selection screen, if these are checked accidentally the std database table will be updated. To avoid this issue, we have to display these two checkboxes in the selection screen for only authorized users. These two fields are not from the database.
How to proceed with this?
‎2006 Sep 01 3:54 PM
Hi Naga,
Use AT SELECTION-SCREEN OUTPUT event for displaying the two checkboxes for authorized users.
Thanks
Lakshman
‎2006 Sep 01 3:57 PM
Create a custom auth object in tx Su21, add field ACTVT and values 02 and 03 to the auth object.
02 for change, and 03 for display only
and try the following example code:
data gv_disp type c.
Parameters: p_cbox1 type c as checkbox modif id C1,
p_cbox2 type c as checkbox modif id C1.
initialization.
authority-check object 'ZCUSOBJ'
id 'ACTVT' field '02'.
if sy-subrc ne 0.
gv_disp = 'X'.
endif.
at selection-screen output.
loop at screen.
if gv_disp eq 'X'.
if screen-group1 eq 'C1'.
screen-input = '0'.
modify screen.
endif.
endif.
endloop.Regards
Sridhar
Message was edited by: Sridhar K
‎2006 Sep 01 5:13 PM
Hi,
program attributes use authorization group
for executing your program.
or
assign Tcode for your report and
initialization event
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD 'ZSPM'.
where ZSPM is ur tcode for report
Regards
Amole
‎2006 Sep 02 2:35 AM
Hi,
First decide the condition you are going to incorporate for display of check boxes but definately authorization check should be in incorporated.
Find the correct authorization obejct and incorporate it at AT SELECTION-SCREEN OUTPUT event.
Declare the check boxes with option of invisible.
If users passes through authorization, modify fields ACTIVE and VISIBLE in screen table so that the check boxes are visible in selection screen.
Regards,
Prasanth