Starting Transaction Variants

A transaction can be started with a variant:

  • Using the Test function from the maintenance transaction
  • By a program that includes a call to function module RS_HDSYS_CALL_TC_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).

  • Using its own transaction code as a variant transaction.

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).

Variant Transactions

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:

  1. Choose Goto ® Create vari. trans. from the initial transaction variant maintenance screen.
  2. Enter a transaction name and corresponding short text. Transaction type Variant transaction is already set. The following screen already contains default values for the name of the calling transaction, the variant name, and the client-specific or cross-client variant checkbox.
  3. Save your entries.


Variant ABC has been defined for transaction Z000. We now want to create the variant transaction ZVAR.

  • Name of the new transaction: ZVAR
  • Name of the calling transaction: Z000
  • Name of the variant: ABC

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

  • Variant transactions can be client-specific (this means that their corresponding variants can also be client-specific).
  • In a variant transaction, several screens can be given pre-assigned values or suppressed. In a parameter transaction this can only be done for the initial screen.
  • You can suppress as many screens as you like in variant transactions; in parameter transactions you can only suppress the initial screen. If a screen is suppressed in a variant transaction, it is never displayed. An initial screen that has been suppressed in a parameter transaction is only not displayed when the transaction is initially called.

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 Transaction Variant Maintenance and Screen Variant Maintenance. The transaction variant can be created in the current client or as a cross-client variant.