Start of Content Area

Function documentation Replacement Path: Replacement from Variable  Locate the document in its SAP Library structure

Use

Characteristic value variables, hierarchy variables, text variables, and formula variables with the Replacement Path processing type can be replaced by the value from a different variable. The value is either determined from the key, the external attribute of the key, the description, or the attribute value. You can also define an offset start and offset length.

Replacement time: The variable is replaced on the variables screen upon each data release.

Prerequisites

The following prerequisites need to be fulfilled:

Target Variable (= the variable that is to be replaced)

      The target variable is not allowed to be input-ready

      The target variable must represent a single value

Source Variable (= the variable that is to replace the target variable)

      The source variable must be a characteristic variable, a hierarchy variable, a text variable, or a formula variable. (The source variable is not allowed to be a hierarchy node variable.)

      The source variable must be input-ready

      The source variable must be available in the query

      The source variable must represent a single value or an interval

Features

Replacement Rule

Here you define the source variable.

Replace Variable With

Select Variable.

Variable

Choose the source variable using the input help dialog This graphic is explained in the accompanying text. For more information on the using the input help dialog, see Restricting Characteristics.

Variable Represents

Choose from where the value of the variable is to be determined.

      Key

The variable value is replaced with the characteristic key.

      External Attribute of the Key

The variable value is replaced with an external value of the characteristic (external/internal conversion).

      Description

The variable value is replaced with the name of the characteristic.

      Attribute Value

The variable value is replaced with the value of an attribute. When you choose the Attribute Value, the Attribute dropdown box is displayed. Select the attribute you want. The system displays all attributes for the characteristic upon which the source variable is defined.

Note

If the attribute is time-dependent, the system cannot determine the variable value or does not replace the variable with the expected value, since the key date of the query is not properly taken into account if it is variable.

If the attribute and the target characteristic have the same basic characteristic and this is compounded, the target variable must contain the uncompounded value. Proceed as follows:

       The source characteristic is either the characteristic to which the source variable belongs or the attribute from which the replacement is to be made. If the basic characteristic of the source characteristic and the basic characteristic of the target variable are the same, and the internal value is to be transferred, the system directly transfers the uncompounded value.

       In all other cases (if the basic characteristics are not the same, or replacement is to be made from the external format or the text), you must cut the uncompounded value with the offset and length specifications out of the target variable definition.

Offset Setting

Using the Offset Start and Offset Length, you can establish the start and length of the text output. For more information on the offset setting, see Replacement Path: Replacement from Characteristic Value.

Using Intervals

You have the following selection options:

      From value

      To value

      Difference

If the source variable is an interval, you can use this setting to specify whether the lower interval limit (from value) or the upper interval limit (to value) is used as the replacement value.

For formula variables, you can also choose the interval difference as the replacement value. Using this setting, you can easily calculate the difference of period boundaries. The interval difference is the to value minus the from value, plus 1. For example, the period January to March gives a result of 3 (the to value 3, minus the from value 1, plus 1).

Examples

Text Variable

You are using a text variable with automatic replacement in a formula. The formula operands have different selections for the characteristic concerned. The automatic replacement would not be able to replace the text variable in that case. If you use replacement from variable, the value of the source variable is used for the text variable.

Hierarchy Variable

The data in an InfoProvider is version dependent. A corresponding hierarchy version (with which a hierarchy is to be used) exists for every version. With replacement from variable, the variable for the hierarchy version can be filled from the variables for the version.

If the versions do not correspond directly to one another, you can create a Hierarchy Version attribute in which the corresponding versions are stored.

 

End of Content Area