Application Development 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: 

Restricting access to variants

Former Member
0 Kudos

Hi,

We have a requirement to have variants for reports, but only certain users should have access to certain variants. Without creating a seperate report / transaction for each variant type, is there any way to restrict users to a certain type of variant within a report. Or is it possible to disable the 'Get Variant' button to stop them this way?

Any help appreciated.

Regards,

Bernard.

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

Hi Bernard,

If it is a custom report, you can check the variant name in the system filed sy-slset & error out during start-of-selection.

Good Luck,

Suresh Datti

6 REPLIES 6

suresh_datti
Active Contributor
0 Kudos

Hi Bernard,

If it is a custom report, you can check the variant name in the system filed sy-slset & error out during start-of-selection.

Good Luck,

Suresh Datti

Former Member
0 Kudos

From Release 4.0 onwards, programs can have more than one selection screen. Therefore, when you create a new variant, you first have to specify the screens for which it is valid.

The default setting is for the variant to be valid for all selection screens in the program. Once you have set the screen assignment, you must enter values for all of the chosen selection screens. When you have done this, the variant attribute screen appears.

The other (dirty way) is to have a custom table controlling the variants allowed per user. Of course, this table will have to be maintained whenever any new variant is created.

Former Member
0 Kudos

Hi Bernard,

Search Function Group SVAR, if any useful FMs are available for your requirement.

Try this,

include rsdbc1xx.

...

...

at selection-screen output.

if sy-uname = 'ABC'.

append 'GET' to current_scr-excl. "get variant

append 'VSHO' to current_scr-excl. "display variant

append 'VDEL' to current_scr-excl. "delete variant

append 'SPOS' to current_scr-excl. "save a variant

endif.

Regards,

Raj

0 Kudos

Hi,

Thanks for all the help. Is it possible however, to restrict access to the: Goto -> Variants ->... without modifying code. One possibility would be to check the value of D_SREPOVARI-NOSELSCRN to 'X' but this will bypass all selection which is not what we want.

Any thoughts?

Cheers,

0 Kudos

Hi Bernard,

You can deactivate the Menu options Go To--> Variants using Transaction Variants ie SHD0. It is fairly simple. PL let me know if u need further help.

Regards,

Suresh Datti

0 Kudos

Hi Suresh;

I tried to deactivate or Block boton Save variant and Get variant with SHD0 and I could not; could you please explain me how do you do that. I need to restrict access an group of users  to get variant and save variant.

Thanks in advance;

Kinsdest regards,