sy-tcode for transaction variant?

Question:
I have transaction for example zmytrans.
The user works with variant of this transaction for example zvariant.
How from the program to determine a name of the transaction variant of this program started by the user ?
sy-tcode = 'zmytrans'
???????? = 'zvariant'
Answer:
Replace ???????? with SY-SLSET.
KRK
Answer:
SY-SLSET is empty
Answer:
SY-SLSET is empty ??? i think something is wrong. Please check again
Answer:
Indeed,
SY-SLSET should be filled with the variant
_________________
Kind Regards/Vriendelijke groeten/Amicalement,
Wim
Answer:
Sorry, but i need name of user transaction - not name of variant for current transaction ...
In my case SY-SLSET is EMPTY
Answer:
Stephen,
It seems that you have changed your question.
To retrieve the transaction the user uses, e.g. MM01, read SY-TCODE.
To retrieve the variant the user uses, e.g. TEST, read SY-SLSET.
From the SAP help:
SY-TCODE: Name of current transaction code.
SY-SLSET: Variant used to fill the selection screen.
If SY-SLSET is empty, you apparently didn't use a variant.
Answer:
Certainly English - not my language and is difficult for understanding me
I shall try once again on steps
1. There is a transaction ZTRANS (my ABAP report)
2. se93 - ZVARIANT - Create - Transaction with parameters (User transaction based on my ZTRANS)
3. run ZVARIANT
Question: can i have name of user transaction (ZVARIANT)?
sy-tcode = 'ZTRANS'
sy-slset is empty
I want to receive 'ZVARIANT' in my program...
(ZVARIANT is name of user transaction - not name of variant for ZTRANS)
Probably it is necessary any FM - anywhere in SYST there are no data necessary to me...

More Articles:

Rounding function?
SQL select with "FOR ALL ENTRIES IN" option?
What r Badis?
Selecting blank fields. a question.?
Getting radio button activated.?
HELP RE POP-UP IN CN21?