Introduction
This new type of variables is available as of BW 740. It is a characteristics variable with replacement path by 'Current member' and can be used in restricted key figures together with a shift operator. For each cell in the query result, the "Current Member" will be replaced with the restriction of the corresponding characteristic on this cell (static filter, dynamic filter, restriction generated by the drilldown chars... see Processing of Filter Values).
Simple Sample Query (see transaction RSFC)
The following very simple example should convey the basic idea of this feature. It is a sales scenario, with Calendar Year/Month in the drill down. Calendar Year is restricted to 2007 in query designer (global filter).
Query Result:
There are three key figures:
- Net Sales(basic key figure): Displays the Net sales for the months in drilldown.
- Previous: In this selection, there is a restriction on Calendar Year/Month with variable 0CURMEM_CALMONTH with an offset value -1
- Difference: This is a formula which simply finds the difference between, Net Sales and Previous.
Restrictions/Technical Remarks
- Current Member Variables are designed only for characteristics which can be used in a time dimension or for characteristics which refer to them (see 'derivation relationships' below for details). 0CALMONTH2 and 0FISCPER3 are not supported because the derivation of the value to other time characteristics are non unique.
- There are delivered variables as 0CURMEM_CALDAY or 0CURMEM_CALMONTH, but you can also create such a variable yourself.
- You can define different offsets to a current member variable.
- If a CM variable is used in a range filter, it always needs a global filter on a time characteristic with upper and lower limit. Otherwise the CM variable can't be calculated and you will get a corresponding warning.
- If you define a Exception Aggregation for a key figure with a current member variable and both features refer to the same time characteristic, then you need to use the so called CM Operator in order to avoid unexpected results, see Examples of Using the CM Operator and CMR Example for further details.
- Exclusive filter using a CM variable is not supported.
- When using a CM variable based on fiscal periods:
- A hard filter of fiscal variant is needed.
- Pay attention to the fact that special periods are not counted when calculate the fiscal period offset, see KBA 1589478.
- When using a CM variable in a non-cumulative query, the validity range is based on the time interval of the real data and not on the time range resulting from the shifting defined by the current member variable.
- It is not possible to add time characteristics to the drilldown or 'Free Characteristics' section which can't be derived from the CM characteristic. This avoids invalid time combinations in the query result.
- The 'Time-Dimension' has to be consistent since filters on one time characteristic may be transformed to corresponding filters on other time characteristics. See also Consistency of Time Dimension and note 2237679 .
- Two Basic Rules of Technical Implementation
- Each structure element with a CM variable gets its own OLAP Read Request (sub-query). For each read request, the data is read independently. This is similar(but NOT identical!) to the OLAP feature Constant Selection CS, the query is split internally into sub-queries(read requests). One (Q_N) handles the structure elements without CM variables, the others (Q_CMi) the structure elements using the feature Current Members. The global time restriction of the query determines the grid spanned by the values of the time characteristics in the drilldown, the Q_CMi's do not change this. See Example I. Note that a query using too many CM variables might run into performance problems (caused by many separate read requests). In addition be aware that the system reads the data from the database in the granularity of the characteristic the CM variable is based on.
- Structure members(restricted key figures) that are using CM variables will not generate 'additional cells', only cells with posted values will be shown in the query result. However, this may be expected when you are using a range restriction with a CM variable. In order to 'fill the gaps' in the query result you can use the feature Access Type 'Master Data' - see Example II.
- KIDSEL isn't ignored when CM variables are used(in order to avoid performance problems). This is different to the usage of the OLAP feature Constant Selection CS, see also Example III.
- Derivation relationships are only taken into account for standard delivered time characteristics (0CAL* and 0FISC*). If you are using time characteristics which refer to standard time characteristics, the special CM processing only takes into account the time characteristic the CM variable is defined on, see Example IV. Details to dependencies between time characteristics:
- All 0CAL* and 0FISC* time characteristics are considered (by the OLAP Engine) as dependent on each other.
- Time-Navigation attributes of the same basis time characteristic are also considered as dependent on each other. So, e.g. ZCALDAY_0CALMONTH, ZCALDAY_0CALYEAR,...
- Time characteristics which refer to 'standard' time characteristics are considered as independent on each other. E.g. ZCALDAY refers to 0CALDAY and ZCALMONTH refers to 0CALMONTH, then ZCALMONTH and ZCALDAY are technically independent (since there might be more such characteristics like XCALDAY and XCALMONTH where it isn't defined which belong to each other).
- A key figure restricted by a CM variable can't be input ready.
- Current Member and Local (FEMSn) Restrictions
- In general, the restriction of a CM variable is linked with other local restrictions (in the same FEMS) with logical AND.
- In case there is an additional time filter from a dependent time characteristic the processing is as follows: this filter in the structure element is applied after the data from the data base has been shifted according the the current member settings. See Example V and note 3270090 (required correction).
See also restrictions listed in note 1957248 and Current Member Variable (Restrictions section).
SAP Online Documentation
SAP Consulting Notes
2237679 - Time Characteristics and Current Member Variables
Transaction RSFC
In order to better understand OLAP features, it is recommended to play around with the delivered sample queries in transaction RSFC (How to use RSFC, see KBA 1508237). Regarding Current member Variables are 2 sample queries. Note that this transaction does not exist on a BW/Hana system.
TOPICS / Sample Queries
- Cumulative Value display with Current Member
- CMR Example: Query using CMR Operator
- Example I: Technical Details to the topic of separate sub-queries(read requests)
- Example II: CM variable in combination with feature Access Type 'Master Data
- Example III: CM variables and the feature KIDSEL
- Example IV: Time Reference Characteristics and Derivation Relationships
- Example V: Current Member and Local (FEMSn) Restrictions
How to search related code fix
Search Notes with 'CurrentMember' or 'Current Member'