Child pages
  • NC: Simple Example I
Skip to end of metadata
Go to start of metadata

Overview

The following sample query is based on a inventory cube which is a copy of the delivered demo content cube 0D_FC_C05 (see queries available in transaction RSFC -> Analytic Engine -> Non-Cumulatives, more information is available here: transaction RSFC and KBA 1508237). We follow the explanations of note 1548125 (in particular chapter [VI]) and check a stock value displayed in the query with the help of transaction LISTCUBE. Afterwards we do the same by using transaction NCUM_CAL (note 2290290 - Non-Cumulative keyfigure value calculation Report)

  • cube STPE_NCUM  (copy of 0D_FC_C05)
  • Non-Cumulative Key Figure: 0D_FC_N_STK
    • Inflow: 0D_FC_K_IN
    • Outflow: 0D_FC_K_OUT
  • Sample query with following filters
    • Material = FC004
    • 0calday = 26.06.2013
  • We check the value of the key figure 'Stock Balanace' which is 12.

Query Result

Using LISTCUBE

We use the Key Figure Definition in oder to get all relevant restrictions for the cell.

These restrictions can now be used in LISTCUBE. We proceed as follows:

  1. Determine Marker value(M) by selecting 0recordtp=1
  2. Calculate sum of all uncompressed Request: SUM(deltas with requestid>0)
  3. Calculate the Current Stock Value: CSV = M +  SUM(deltas with requestid>0)
  4. Calculate sum of all movements where 0CALDAY is greater than the given time selection of the query: SUM(deltas with time>t)
  5. Calculate Non-Cumulative Value(t): Value(t) = CSV - SUM(deltas with time>t)
  6. Compare this value with the query result
1. Determine Marker (0RECORDTP = 1)

Result:

M = 2
2. Calculate sum of all uncompressed Request: SUM(deltas with requestid>0)

Result:

SUM(deltas with requestid>0) = 23 -14 = 9
3. Calculate the Current Stock Value: CSV = M +  SUM(deltas with requestid>0)
CSV = 2 + 9 = 11
4. Calculate sum of all movements where the date/0CALDAY is greater than the given time selection of the query: SUM(deltas with time>t)

Result

SUM(deltas with time>t) = 6 - 7 = -1
5. Calculate Non-Cumulative Value(t): Value(t) = CSV - SUM(deltas with time>t)

Stock Value(26.06.2016) = 11 - (-1) = 12

6. Compare this value with the query result

Query reult is correct!

Using Transaction NCUM_CAL

As of BW73017 (see note 2290290 - Non-Cumulative keyfigure value calculation Report), you can also use transaction NCUM_VAL (or report RSDD_NCUM_VAL) to calculate stock values. The main advantage is that you get information displayed how exactly the value was calculated. Basically the steps carried out above are done in this report and the result of each step can be found in the log.


  • No labels