Show TOC

Procedure documentationCreating and Modifying Variants in SAP CPS Locate this document in the navigation structure

 

Variants are sets of parameter values used for quickly setting ABAP program parameters. You can create and modify variants from within SAP CPS in the SAP System Maintain Objects editor screen.

Creating Variants

First you import the ABAP program, then you can create variants. You create variants on the ABAP program and set a number of parameters. You should import at least one variant and its variant definition, so that the available parameters are displayed in drop-down menus. This is done with the SAP_ImportVariants job definition, not that it will by default import the variant definition as well. Variant definitions are the set of parameters and their respective values as defined in the variant.

Editing Variants

To be able to edit variants that were created in SAPGui, you will have to import the variants and variant definitions first. When you use SAP_ImportVariants to import variants, the job will import the variant and its variant definition by default. Variant definitions are the set of parameters and their respective values as defined in the variant.

Saving a Variant in the SAP System for use with SAPGui

You can use the SAP_StoreVariant job definition to store variants in you SAP system, see Handling Variants for more information.

Syntax of Select Options

The following operators are available in the Ui, the mathematical syntax can only be used in RedwoodScript and is displayed here for clarity:

Syntax

Meaning

Mathematical Syntax

NOT

Not

!

EQ

Equals

=

NE

Not Equals

!=

NE

Not Equals

<>

GE

Greater than or equals

>=

GT

Greater than

>

LE

Less than or equals

<=

LT

Less than

<

Prerequisites

Procedure

Create a variant

  1. Navigate to   Environment → SAP Systems  .

  2. Choose Maintain Objects from the context menu of the SAP System that represents the SAP Instance where the ABAP program is used.

  3. Expand ABAP Programs and choose New Variant from the context menu of the ABAP program.

  4. Fill in a name and optional description, choose Save.

  5. For each simple parameter/value combination, choose New Parameter.

    1. Select the name of the parameter from the drop-down, enter an optional description and value.

  6. For each select option, choose New Select Option

    1. Select the name of the parameter from the drop-down, enter an optional description.

    2. On the Values tab, select to include or exclude the rows in the Sign field, select and operator in the Option field, and enter a lower and higher value (depending on the operator in Option, only a lower value is required).

  7. Choose Save & Close.

Modify a variant

  1. Navigate to   Environment → SAP Systems  .

  2. Choose Maintain Objects from the context menu of the SAP System that represents the SAP Instance where the ABAP program is used.

  3. Expand ABAP Programs, the ABAP program, client and variant.

  4. Select the parameter you want to change.

  5. For each simple parameter/value combination"

    1. Select the name of the parameter and enter a value into the Value field.

  6. For each select option:

    1. Select the name of the parameter.

    2. On the Values tab, select to include or exclude the rows in the Sign field, select and operator in the Option field, and enter a lower and higher value (depending on the operator in Option, only a lower value is required).

  7. Choose Save & Close.