‎2007 Dec 26 7:50 AM
i would like to enable/disable a button on screen using authorization object.
haw this can be done.
please help....
‎2007 Dec 26 2:22 PM
In the PBO of that screen just do an authority-check on the authotization object (if there is no standard object you can use, you have to create a custom one). In case the authorization fails set the button to inactive.
authority-check object 'authorization object'
ID 'object id name'
field 'field value'.
lv_subrc = sy-subrc.
loop at screen.
if screen-name eq 'field name of button'.
if lv_subrc eq 0.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
endif.
endloop.
That should do it,
Michael
‎2007 Dec 26 2:22 PM
In the PBO of that screen just do an authority-check on the authotization object (if there is no standard object you can use, you have to create a custom one). In case the authorization fails set the button to inactive.
authority-check object 'authorization object'
ID 'object id name'
field 'field value'.
lv_subrc = sy-subrc.
loop at screen.
if screen-name eq 'field name of button'.
if lv_subrc eq 0.
screen-active = 1.
else.
screen-active = 0.
endif.
modify screen.
endif.
endloop.
That should do it,
Michael