Skip to end of metadata
Go to start of metadata


Formula variables of the type 'Replacement Path' can be filled by values derived from the key or attribute key of an infoobject. There is a comprehensive consulting note which explains all details of this rather complex feature:

Note 1385580 - How does a formula variable with a replacement path work?


There are various ways of defining formula variables, the following two are the most important one:

  • FVA
    The formula variable is replaced by the values of an (key figure) attribute of a characteristic (IO1). In this case the feature 'Exception Aggregation for Formulas' is used and IO1 is added to the drilldown characteristics (non visible drilldown characteristic). This kind of 'calculation before aggregation(only!)regarding IO1!' is done automatically. See also Note 1228378 and Note 1385580. If the variable is used alone in a formula the aggreagtion MAX is taken.
  • FVK
    The formula variable which is replaced by the key of a characteristic (IO2). In BW 3.x this formula variable is replaced before the aggregation (over the corresponding infoobject !) in calculated key figures and it is replaced after the aggregation in formulas. In BI 7.0 the replacement always occurs after the aggregation! For further information about problems in BW 3.x, see note 379832. After the upgrade a corresponding calculated key figure may deliver different results, please see note 1005772 for further details. There a report is given(RSR_VAR_REPPATH_AGGREGATION) which you can use to change the variable back to 'Calculation before Aggregation'. In the table RSZBLOBV you can then find the entry 1ATRRKEY in the field ATTRINM - meaning that this variable is technically now treated like a formula variable replaced by an attribute. As we already know, such a variable is by default (when used in a CKF) calculated before aggregation (regarding the corresponding infoobject) in contrast to a formula variable which is replaced by the key of a characteristic. So it may happen that after the upgrade you get an 'X' displayed in the query - then you can run the mentioned report in order to return to the 'old' behaviour. In the variable definition dialog you can choose between 'from','to' and 'interval' value - these settings are only taken into account if there is a filter with well defined intervall. If e.g. the infoobject IO2 isn't restricted at all you only get 'X' displayed for the result lines (where the system had to aggregate over IO2). See also note 1385580.
    The folowing selections exist:
    (SA) from infoobject which is drilled down
    (SC) from cell editor
    (S1) from structure 1
    (SF) from global&hard filter
    (SD) soft filter (default values)
    Roughly (see note 1385580 for details) the selections are checked in the order given above.


In the following you can find simple examples to this topic which should help to better understand how formula variables work.

FVK - replaced by Key

  • Example1 - simple example with 'isolated' formula variable
  • Example4 - query issues the error message BRAIN_DEV001

FVA - replaced by attribut value

  • Example6 - simple example with 'isolated' formula variable
  • Example7 - simple example of key figure attribute aggregation

Other Types of Formula Variables 

Sign Reversal 

Formual Varaiables behave like Constants

Formulas with Constants (check e.f. when facing performance issues)

SAP Consulting Notes

  • 1385580 - How does a formula variable with a replacement path work?
  • 1843021 - Adaption for replacement variables after aggregation
  • 1005772 - Formula variables with replacement from key
  • 1863175 - Formula Variables
  • 379832   - Calculating w/ variables w/ subst. from attrib. w/o char
  • 2198257 - Formula using only Formula Variable Replaced by Key Figure Attribute has Different Results after Upgrade to 7.3x above