(GLUE-1905) Generate and Execute Variants for Query Extraction

This document describes the process of creation and subsequent execution of variants for BW query extraction by using the Datavard tool Task Handler. After execution of the variant for the BW query extraction, the standard SAP job is created that replicates the specified data into external storage. 

Generation of query variants

To generate variants for query extraction proceed as follows:

  1. Run the transaction /DVD/GL_GEN_QVAR
  2. Specify the following parameters: 
    • Extractor - name of the extractor for which the variants should be generated. You may use F4 help.
    • Variant Name Prefix - prefix of the variant name. The complete name of the variant is generated from this prefix and an incremental number.
    • Description Prefix - prefix of the variant description. The complete description is also generated from this prefix and an incremental number.
    • Package Size - maximum number of rows transferred within one package. This field defines package size for each variant you generate through next selection screen.

  3. You may choose between two options on how to generate variants.
    1. The first is to generate the query variants in the selection screen. In the selection screen, you can specify values for a variant generation.
      Based on specified values, the program reads master data of an InfoObject and generates variants for all combination of selected values.

      To perform this:

      1. Click Continue.
      2. Mark checkboxes with variables you want to use for selection.
      3.  Specify values for previously selected variables under Values selection.

        Variants generation example

        Using the variants generator screen-shot below as an example, there will be the following variants generated:

        Variant NameSmokerManagerFacility or State Park
        Variant 1(tick)BENEDICT SHAFFEROPERATIONAL
        Variant 2(error)BENEDICT SHAFFEROPERATIONAL
        Variant 3(tick)CAMERON SANTANAOPERATIONAL
        ...


        Variant N-1 (tick)REECE WESTOPERATIONAL
        Variant N (error)REECE WESTOPERATIONAL
    2. The second option is to generate the query variants from a csv file.

      To perform this:
      1. Select Generate template in the previous Generate Variant for Query Extractor screen. Using this template, you can manually define variants you want to generate.
        See template.csv as an example of the generated template file. 

      2. Select Generate variants from .csv.
        Each variant is defined by a number of lines (depending on the number of query parameters), where each line represents a value for 1 parameter. A line consists of the following columns:

        • Variant name
        • Query variable technical name
        • Selection type - the type of the statement, either P - Parameter or S - Select option
        • Sign - whether the result of the row condition is included in or excluded from the resulting set. Possible values are I - inclusive and E - exclusive.
        • Option - selection operator. Possible values are EQ - equal, NE - not equal, GT - greater than, LT - less than, LE - less than or equal, GE - greater than or equal, and BT - between.
        • Low value
        • High value
  4. The following confirmation screen displays the exact number of variants, which will be generated. Confirm and then, check the results in the Extractor Workbench - newly generated query variants should appear under your extractor.
  5. After the variants are generated, you can find them under specified extractor in Glue Extractor Workbench.


Execution of query variants

If you want to execute multiple variants at the same time, we recommend to use the Datavard tool Task Handler (transactions /DVD/TH_EDIT and /DVD/TH_MONITOR). To execute variants proceed as follows:

Create a Task run ID

  1. Run the transaction /DVD/TH_EDIT.
  2. Specify the Process ID "GLUE_VAR_EXEC", select Open existing process and Execute (F8).

Click Create run (F8), fill in your new Task run ID and Confirm.

Generate a execute the variant execution task

  1. Click Generate variant execution tasks.
  2. Specify the name of your query extractor or find it with the help of F4 help and Execute (F8).

  3. Go back to the previous screen and check if the variant execution tasks were generated and if their status is set to green. If not, please check if the variants were generated, as described in 1085210795 and if the variants are active.
  4. To execute variants double click on Variants execution, specify the desired number of parallel jobs and confirm.

  5. Double-click on the Monitor button to track the variants execution process or monitor it directly in Extractor Request Browser, see more information under (GLUE-1905) Manage the Executed Extraction of an Extractor.