Show TOC

Replacement Path: Replacement with QueryLocate this document in the navigation structure

Use

Characteristic value variables with processing type Replacement Path can be replaced with the results of a query.

Features

Replace Variable With

Select Query.

Query

Using the input help dialog , select the query whose result you want to use as the variable. You can now process the data result of the selected query as a variable in a different query.

Caution

Note that, for technical reasons, variables with processing type Replacement from Query cannot be used in restricted key figures or in selection structure elements.

Note

Use of variables with processing type Replacement from Queryin input ready queries in the context of BW Integrated Planning:

It is not possible to use variables with processing type Replacement from Query in queries that are based on an aggregation level. Instead, use the transactional InfoCube of the aggregation level as an InfoProvider for the query.

Note also that the variable with processing type Replacement from Query only contains data that has already been saved.

Example

You want to insert the result of query Top 5 Products as a variable in query Sales - Calendar Year/Month.

  1. Select the Product characteristic and, in the context menu, choose New Variable. The new variable is displayed.
  2. In the context menu of the new variable, choose Edit. The Variables Editor appears.
  3. On the General tab page, enter a description and, if necessary, change the generated technical name.
  4. On the General tab page, choose the processing type Replacement Path.
  5. On the Replacement Path tab page, under Replace Variable With, choose the Query entry and, under Query using the input help dialog , choose query Top 5 Products.
  6. Choose OK.

You can now insert the variable into query Sales - Calendar Year/Month. This allows you to determine how the sales for these five top-selling products has developed month for month.

Caution

Every time you execute query Sales - Calendar Year/Month, query Top 5 Products is executed beforehand (hence pre-query). This can lead to long runtimes. If you do not need to execute the pre-query (if you do not have to determine the top 5 products every time because they only change monthly, for example), we recommend that you use a variable that represents a precalculated value set.

For more information, seeDetails andPrecalculating Value Sets.