Maintaining Variants Automatically

You can use the Job Definition SAP_StoreVariant to change one or more values of a variant directly, without the need to manually edit the variant. You duplicate this Job Definition and edit the parameter set, the Parameter names must match and the values you set must be legal values for the variant. This is especially useful when you want to have dynamic variants, for instance, a parameter that would contain the current date. With Redwood Server, this is easily implemented, as you could schedule a Job daily which changes the Parameter value of the variant and fills it with the current date. You can also create a Workflow Definition, which calls the Job Definition and sets the values of the variant with Parameter mappings.

Note: XBP 3.0 requires a logical system for the client, see Setting Up Logical Systems for more information on creating logical systems for clients.

Prerequisites

  • An RFC connection has been established between the central Redwood Server and a BI or BW system, as outlined in Connecting to SAP Systems.

Additionally, the SAP System must have one of the following:

  • XBP 3.0 support
  • The Redwood transport files must have been installed

See Creating and Modifying Variants for step-by-step instructions on how to modify variants using the Redwood Server user interface and the syntax to specify parameters and select options.

Procedure

Duplicate and modify the SAP_StoreVariant Job Definition

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Duplicate from the context menu of SAP_StoreVariant.
  3. Choose Refresh from the context menu and choose Edit from the context menu of SAP_StoreVariant_1. If there are more than one SAP_StoreVariant_#, edit the one with the highest number.
  4. Change the name of the Job Definition to reflect its purpose.
  5. Give ABAP_PROGRAM_NAME and ABAP_VARIANT_NAME default values.
  6. Add additional parameters for the variant parameters that you wish to change. Remember that you can use Redwood Expression Language to specify expressions.
  7. Click Save & Close.

Result

You have create a custom Job Definition that will change a variant on demand, remember that you can change the parameters at submit time again, if necessary.