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 objects and screen elements

Former Member
0 Likes
307

i would like to enable/disable a button on screen using authorization object.

haw this can be done.

please help....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
279

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

1 REPLY 1
Read only

Former Member
0 Likes
280

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