Starting Transaction Variants
A transaction can be started with a variant:
Function module RS_HDSYS_GET_TC_VARIANT checks to see if a transaction variant is active and returns its name and (if possible) its current values (screen variants, inactive functions).
When a transaction with variant is called using the Test function, for technical reasons it is started in call mode. Some transactions behave differently in call mode than when called directly.
A variant transaction is started either in call mode or LEAVE TO TRANSACTION, depending to how it is called.
If you call a transaction with variant from a program using the function module RS_HDSYS_CALL_TC_VARIANT, you can use the function module to determine which mode is called (call mode or LEAVE TO TRANSACTION).
A transaction with a variant can have its own transaction code, which you can then use to execute the transaction with the appropriate variant.
To create a variant transaction, proceed as follows:
Variant ABC has been defined for transaction Z000. We now want to create the variant transaction ZVAR.
Transaction ZVAR starts transaction Z000 with variant ABC.
If the variant specified for a variant transaction does not exist (in the current client), then the calling transaction will be started without variant.
The Standard Transaction Variant
Standard transaction variants have a special purpose. You can use any transaction variant as a standard variant. Use the Activate and Deactivate functions to use a specific transaction variant as a standard variant or to deactivate it.
If a standard variant is active for a transaction, the system searches for the variant automatically whenever the transaction is started and adopts its values.
If a transaction with an active standard variant is started with another variant, the values of the standard variant are not imported.
If a transaction with an active standard variant is started in batch input mode, the values of the standard variant are not imported either.
Variant Transactions and Parameter Transactions
You can use the function Change transaction type during transaction code maintenance to convert a parameter transaction to a variant transaction. The system creates a transaction variant and a screen variant for its initial screen containing the values of the parameter transaction. The system suggests the name CV_P_<name of the variant transaction> for these variants. The default name may be changed. The variant is created for the called transaction. It can be changed in