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

Permissions variants

former_member645220
Discoverer
0 Likes
655

Hi,

I created a Z transaction and a variant, I allowed a user to see this transaction Z, you can deny the selection of other variants?

You can hide the button for selecting variants?

or you can give permission for execute a single variant to a user?

thanks

best regards

Hi,

I created a Z transaction and a variant, I allowed a user to see this transaction Z, you can deny the selection of other variants?

You can hide the button for selecting variants?

or you can give permission for execute a single variant to a user?

thanks

best regards

2 REPLIES 2
Read only

Former Member
0 Likes
542

Hi

I don't believe it can prevent to select a certain variant, but it can try to prevent to run it: the name of current variant is in system variable SY-SLSET

Max

Read only

former_member645220
Discoverer
0 Likes
542

i solved.

I created a new object of authorization by the transaction su21, where he put the field in the table that interested me, in this case the variant field, and then I added to the program code

AUTHORITY-CHECK OBJECT 'ZSD_VARIANT'

ID 'VARIANT' FIELD SY-SLSET

IF sy-subrc EQ 4.

MESSAGE E000 (zzpp) WITH 'No Authorization'.

ENDIF.

This control checks whether there is authorization in the user profile, if it exists and not the name of the current version returns error if the object has not assigned can enter.