Creating and Modifying Variants in SAP CPS 
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.
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.
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.
You can use the SAP_StoreVariant job definition to store variants in you SAP system, see Handling Variants for more information.
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 |
< |
You have imported the ABAP program, a variant and its variant definition, as outlined in Importing ABAP Programs and Importing Variants.
Create a variant
Navigate to .
Choose Maintain Objects from the context menu of the SAP System that represents the SAP Instance where the ABAP program is used.
Expand ABAP Programs and choose New Variant from the context menu of the ABAP program.
Fill in a name and optional description, choose Save.
For each simple parameter/value combination, choose New Parameter.
Select the name of the parameter from the drop-down, enter an optional description and value.
For each select option, choose New Select Option
Select the name of the parameter from the drop-down, enter an optional description.
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).
Choose Save & Close.
Modify a variant
Navigate to .
Choose Maintain Objects from the context menu of the SAP System that represents the SAP Instance where the ABAP program is used.
Expand ABAP Programs, the ABAP program, client and variant.
Select the parameter you want to change.
For each simple parameter/value combination"
Select the name of the parameter and enter a value into the Value field.
For each select option:
Select the name of the parameter.
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).
Choose Save & Close.