Creating and Modifying Variants in Redwood Server

Variants are sets of parameter values used for quickly setting ABAP program parameters. You can create and modify variants from within Redwood Server 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 dropdown lists. This is done with the SAP_ImportVariants Process 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 process 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 Process Definition to store variants in you SAP system, see Handling Variants for more information.

Variant Parameter Syntax

Variant parameters should be string parameters, with PAR_, SEL_, or FSL_ prefixes, for parameter, select options, and free selections (freie Abgrenzungen in German), respectively. Their names should contain the name of the parameter/select option in SAP for parameters and selection options; free selections must be specified as FSL_<table>/<field>, where <table> and <field> are the technical names of the table and field, respectively. When you want to specify a range, you should enclose it in square brackets[], as in [a-m,!d,!f,!g]. These parameter names must be all upper case.

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

Syntax Meaning Mathematical Syntax
NOT Not !
EQ Equals =
BT Between -
CP Contains Pattern, use + for one character and * for zero or more characters

NE Not Equals !=
NE Not Equals <>
NP Not Pattern

GE Greater than or equals >=
GT Greater than >
LE Less than or equals <=
LT Less than <

Note: When you specify date-ranges, make sure you put spaces between the dates and the hyphen (-), the range 21.02.2010 - 31.12.2010 is valid and this one is not valid:21.02.2010-31.12.2010.

Tip: If you want to specify two or more exact values, you can create a parameter for each select option.

Example

You have a Process Definition with the following parameters:

  • PAR_NOEX - Without Extract, set to X
  • SEL_FLDATE - Flight Date, set to BT and 21.02.2010 - 31.12.2010

Another example of a Process Definition with parameters:

  • PAR_NOEX - Without Extract, set to X
  • SEL_CAR - Airline, set to BT and [AA-ZZ, !BC, !AF]

Alternate example of Process Definition with parameters:

  • PAR_NOEX - Without Extract, set to X
  • SEL_CAR - Airline, set to CP and L+
  • SEL_FLDATE_01 - Flight Date, set to GE and 01.02.2010
  • SEL_FLDATE_02 - Flight Date, set to LE and 18.02.2010

Free selections example:

  • FSL_BSID/MANSP - set to BT and [AA-CA, !BC, !AF]

Handling Empty/Missing Variant Parameters

You use the PASSNULLVALUES parameter to specify how you want empty/missing parameters to be interpreted. The parameter accepts the following values:

  • N - missing parameters are ignored, the SAP variant parameter/selopt default values will be used; empty parameters are passed on as is, variant parameter/selopt is empty (but set).
  • Y - missing parameters cause the corresponding SAP variant parameters/selopts to be unset; empty parameters are passed on as is, variant parameter/selopt is empty (but set).

To unset an existing parameter, specify >!<; Parameters with this value are not forwarded to the SAP system.

Prerequisites

Procedure

Create a variant

  1. Navigate to "Environment > SAP".
  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.
  6. Select the name of the parameter from the dropdown list, enter an optional description and value.
  7. For each select option, choose New Select Option.
  8. Select the name of the parameter from the dropdown list, enter an optional description.
  9. 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).
  10. Click Save & Close.

Modify a variant

  1. Navigate to "Environment > SAP".
  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".
  6. Select the name of the parameter and enter a value into the Value field.
  7. For each select option:
  8. Select the name of the parameter.
  9. 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).
  10. Click Save & Close.

See Also