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: 

How to limit a user to a variant of an program

Former Member
0 Kudos

How to limit a user to a variant of an program

1 ACCEPTED SOLUTION

kiran_k8
Active Contributor
0 Kudos

Jan,

Try like this.

In the Zprogram first check for the user and then use the function module RS_VARIANT_CONTENTS to check the variant.

Create a variant for the program.

Use the standard program RSTRANSP to transport the variants.

I never tried but I think it can be done.

K.Kiran.

6 REPLIES 6

former_member387317
Active Contributor
0 Kudos

Hi Jan Bo,

As per my knowledge you can restict user for T-Code and Not for Particular Variant of a Program.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

Former Member
0 Kudos

hi

try to disable the input fields

by using

transaction variants if standard and using fro user selection

at selection screen event

loop at screen.

fieldname-active = 'X'/' '.

modify screen.

endloop.

and use a variant for the perticular transaction.

shiva

kiran_k8
Active Contributor
0 Kudos

Jan,

Try like this.

In the Zprogram first check for the user and then use the function module RS_VARIANT_CONTENTS to check the variant.

Create a variant for the program.

Use the standard program RSTRANSP to transport the variants.

I never tried but I think it can be done.

K.Kiran.

kiran_k8
Active Contributor
0 Kudos

Jan,

Rather than using the function module I think we can even do this with the VARID table as it is having the Username too.Check for the sy-uname and then fetch the variants corresponding to that user,check for sy-subrc,when sy-subrc = 4 give an error message.

K.Kiran.

Former Member
0 Kudos

i hope hte user is suppose to execute the report from a report tree. in here give the variant to the report in the report tree .

Tcode SERP, SUIM_OLD,

I assume he will not execte the report from se38 so configure the required varint to him in the report tree.

Vijay.

Former Member
0 Kudos

Just put a check on Selection screen fields in the program under

AT SELECTION-SCREEN event and check for current user using sy-uname and thro error whenever required