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: 

Default Selection Variant

Former Member
0 Kudos

Hi All,

I might be missing something obvious here but here goes...

Is there a way to set a default selection variant (e.g. for transaction code ME57 (RM06BZ00)) by user? Do I have to program this or is there any easier way?

Using ECC 5.0

Thanks,

Niall

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I don't think that you can make them default user specific. The way it is designed, all users can create variants which are visible through out the system, then any user can choose any variant. You can default a variant, but creating a transaction code for the report and assigning a variant then, but I don't think you want to create a special tcode for each user.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Thanks for the reply.

Just want to explore the possibility of setting up default variants for each user so that they don't have to choose their 'default' variant every time they run the txn.

>but I don't think you want to create a special tcode

>for each user.

No you are right - that's a non-starter!

Cheers,

Niall

Former Member
0 Kudos

We create a number of variants and then name them according to the USERIDs of the users that will be running the program. In the program, at the INITIALIZATION event, we call FM RS_SUPPORT_SELECTIONS using the report name and variant name. The program then starts with the individual user's defaults.

In this case, you would have to copy and change the SAP transaction.

Rob

0 Kudos

Thanks Rob.

Interesting solution but I am really looking for a standard fix as my issue pertains mostlyto standard txns. Still... your solution might be handy for some custom stuff I am working on.

Cheers,

Niall

0 Kudos

Taking Rob's idea a little further, you could write a wrapper program and assign it to transaction code ZME57. Here is the code for the wrapper program.


report zrich_0001 .

start-of-selection.

  data: report type  rsvar-report value 'RM06BZ00',
        variant type  rsvar-variant .

  variant = sy-uname.

  submit (report) via selection-screen
                using selection-set variant
                       and return.


Here the wrapper program is submitting your report using the variant that is named after the user id.

Regards,

Rich Heilman