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
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.
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!
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.
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 .
data: report type rsvar-report value 'RM06BZ00',
variant type rsvar-variant .
variant = sy-uname.
submit (report) via selection-screen
using selection-set variant
Here the wrapper program is submitting your report using the variant that is named after the user id.