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

How to Run std program with a specific variant for specific user?

Former Member
0 Likes
1,264

Hi guys

We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how?

one options we thought about was to create a transaction in SE93 and define the program to run with a predefined varaint and assign the new custom tcode to the user profile. But we have many different users and we will end up with creating many transactions which we would like to avoid. Is there any other option to control the std program such that each user can run the program only with a pre-defined varaint and the one which only the user is suppoed to run. thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
749

We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how

you can do this..

You can create a Custom table

userid keyfield

program keyfield

variant keyfield

programdesc

Make the table Maintaintable(usnig table maintenance )

Now create another Program

It takes input of the Program name( using selection screen)

LOGIC

in side that place a logic ,

Based on the user name and program name Get the variant name from above table

Now Submit the program with the variant you have selected above.

Use Variant Addition when you use SUBMIT

So now program executed based on user variant.

Now you create a Transaction for this program.

When use Runs the Transaction , user needs to input the Program name which he wants to execute.

and Output will be shown based on the variants

Regards

Vijay Babu Dudla

4 REPLIES 4
Read only

Former Member
0 Likes
750

We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how

you can do this..

You can create a Custom table

userid keyfield

program keyfield

variant keyfield

programdesc

Make the table Maintaintable(usnig table maintenance )

Now create another Program

It takes input of the Program name( using selection screen)

LOGIC

in side that place a logic ,

Based on the user name and program name Get the variant name from above table

Now Submit the program with the variant you have selected above.

Use Variant Addition when you use SUBMIT

So now program executed based on user variant.

Now you create a Transaction for this program.

When use Runs the Transaction , user needs to input the Program name which he wants to execute.

and Output will be shown based on the variants

Regards

Vijay Babu Dudla

Read only

0 Likes
749

Hi Guys,

thanks for your inputs. I thought about this solution but was not sure if it would work, as the std report which we want to use has few std SAP functionalities from the report output screen. Anyways since you guys have come up with the same solution i am sure it must work. I will implement and get back if i have any issues with the solution. Thanks indeed. Cheers

Read only

0 Likes
749

Welcome and it will work. this solution won't effect any functionalities of the program.

Read only

Former Member
0 Likes
749

Hi,

Create a custom wrapper program . From the wrapper program based on the user name selects the variant from table( maintain a custom table where user name and their variants are stored). After that call the std. program with this variant using submit statement.

Submit 'Zxyz' USING SELECTION-SCREEN 1000

USING SELECTION-SET variant. << user specific variant

Regards,

joy.