sy-tcode for transaction variant?
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'
Replace ???????? with SY-SLSET.
KRK
SY-SLSET is empty
SY-SLSET is empty ??? i think something is wrong. Please check again
Indeed,
SY-SLSET should be filled with the variant
_________________
Kind Regards/Vriendelijke groeten/Amicalement,
Wim
Sorry, but i need name of user transaction - not name of variant for current transaction ...
In my case SY-SLSET is EMPTY
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.
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...