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 for non database fields

Former Member
0 Likes
665

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?

4 REPLIES 4
Read only

Lakshmant1
Active Contributor
0 Likes
613

Hi Naga,

Use AT SELECTION-SCREEN OUTPUT event for displaying the two checkboxes for authorized users.

Thanks

Lakshman

Read only

sridhar_k1
Active Contributor
0 Likes
613

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

Read only

Former Member
0 Likes
613

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

Read only

Former Member
0 Likes
613

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