2006 Jul 21 8:16 AM
Hi,
How to identify current transaction code with variant. We can't use sy-tcode as it shows orginal transaction code. Sy-slset is also empty allways?
Thanks
Shekar
Hi,
How to identify current transaction code with variant. We can't use sy-tcode as it shows orginal transaction code. Sy-slset is also empty allways?
Thanks
Shekar
2006 Jul 21 8:20 AM
Hi Reddy ?
y we cannt use sy-tcode ? i am getting the values for sy-tcode , and i have t.variant for that Tcode ? Just Debug that one , u will get the values.
regards
Prabhu
2006 Jul 21 8:35 AM
Hi Prabhu,
My question is we created 'ZFB50' (transaction code with variant) for original transaction 'FB50' with Transaction
variant 'Z_FI_FB50'. But Sy-tcode shows only 'FB50', not 'ZFB50'. SY-slset supposed to show screen variant name, but it is not showing?
How to identify this 'ZFB50' transaction with variant?
Thanks
Shekar
2006 Jul 21 9:13 AM
Hi
I believe that information is missed after calling the main transaction.
Max
2006 Jul 21 9:10 AM
I doubt if there is any system variable which gives you that sort of information but you can read TSTC table with the ABAP name (SY-CPROG) and get the transaction code as an alternative.
Regards
Anurag
2006 Jul 24 5:22 AM
Thanks Guys. SY-CPROG will not help, as it is same for original transaction and transaction variant.
Is there any function module which reads current transaction variant?
Thanks
Shekar
2006 Jul 24 5:34 AM
2006 Jul 24 6:14 AM
Hi Prabhu,
Thanks for info. First of all we need to know the transaction, then we can do any thing. Table SHDTVCIU just gives information about original transaction and transaction variant.
Our transaction can be called directly or using transaction variant. We need to know "when it is called from transaction variant".
Thanks
Shekar
2006 Jul 24 6:19 AM
hi Reddy ,
check the Documentation of SHD0.Its nothing but modifications of Screen fields.
Regards
Prabhu
Transaction Variants and Screen Variants
Transaction variants can simplify transaction runs as they allow you to:
Preassign values to fields
Hide and change the 'ready for input' status of fields
Hide and change table control column attributes
Hide menu functions
Hide entire screens
In particular, hiding fields in connection with screen compression, and hiding screens, can result in greater clarity and simplicity.
Transaction variants are made up of a sequence of screen variants. The field values and field attributes for the individual screens found in transaction variants are stored in screen variants. Each of these variants is assigned to a specific transaction, can, however, also contain values for screens in other transactions if this is required by transaction flow. The transaction that the variant is assigned to serves as initial transaction when the variant is called.
There are both client-specific and cross-client transaction variants. All screen variants are cross-client, but may be assigned to a client-specific transaction variant.
A namespace exists for cross-client transaction variants and screen variants and both are automatically attached to the Transport Organizer. Client-specific transaction variants must be transported manually.
In principle, transaction and screen variants can be created for all dialog and reporting transactions. There are, however, certain Restrictions that apply to certain transactions, depending on their internal structure.
No transaction variants are possible with transactions already containing preset parameters (parameter transactions and variant transactions).Regards
Prabhu
PS : Customer is First Points next
2006 Oct 17 9:55 AM
Hey Shekar,
I had just the same problem/question. Maybe in the meantime you figured out a solution yourself. This is what I did.
Didn't check on the transaction code but on the variant linked to it. I used it in the validation rules. Via the assign you get the variant and you can do any checks you want.
Hope it helps.
Greetz,
Pieter
Screen variant provided by transaction variant
FIELD-SYMBOLS: <f_scvariant> TYPE scvariant.
ASSIGN ('(SAPMF05A)g_scvariant')
TO <f_scvariant>.
IF sy-subrc EQ 0.
2006 Oct 23 1:25 AM
Hi Pieter,
Thank you for that. That was very helpful answer. I used the code to get screen variant adopted from function
'RS_HDSYS_GET_SC_VARIANT' as we are not getting value from " ASSIGN ('(SAPMF05A)g_scvariant') TO <f_scvariant>".
import i_shdfv to l_i_shdfv
i_shdfvgui to l_i_shdfvgui
screen_variants to l_screen_variants
i_shdguixt to l_i_shdguixt
from memory id '%_HD_TCVARIANT'.
Thank you
Shekar
2006 Oct 23 1:52 AM
Hi Pieter,
To get variant transaction only, we can use the code as follws.
data: tcode type SHDTV-TCODE.
call 'DY_GET_CURRENT_TRANSACTION'
id 'TRANSACTION_NAME'
field tcode.
Cheers
Shekar
2016 Feb 29 10:59 AM