# CKF and RKF

Hi gurus

can anyone explain me the definitions of CKF and RKF, why its used and how its used.

thanks in advance

maaya

##### Tags:

##### jujhvir singh replied

hi,

RKF(Restricted key figure) consists of a key figure restricted with certain charecteristics combinations CKF(Calculated key figure) have calculations which fully uses various key figures.

They are not interdependent on each other . You can have both at same time.

RKF: Restricted key figure::

>>Use

You can restrict the key figures of an InfoProvider for reuse by selecting one of more characteristics. The key figures that are restricted by one or more characteristic selections can be basic key figures, calculated key figures or key figures that are already restricted.

>>Procedure

Defining a New Restricted Key Figure

...

1. In the InfoProvider objects display frame, select Key Figure and from the context menu (right-mouse click), choose New Restricted Key Figure.

If a restricted key figure has already been defined for this InfoProvider, you can also select the Restricted Key Figures entry and, from the context menu, choose New Restricted Key Figure using the right mouse button.

The New Restricted Key Figure dialog box appears.

The text field, in which you can enter a description of the restricted key figure, is found in the upper part of the screen.

You can use Text Variables in the description.

Underneath the text field, on the left, is the directory of all the objects available in the InfoProvider. The empty field for defining the restricted key figure is on the right-hand side of the screen.

2. Using Drag&Drop, choose a key figure from the InfoProvider, and restrict it by selecting one or more characteristic values. See, Restricting Characteristics.

You can also use variables in place of the characteristic values. However, note that you cannot use the following variable types in restricted key figures for technical reasons.

Variables with Replacement with Query process type (see also Replacement Path: Replacement with Query

Variables that represent a precalculated value set (see also Details)

You can use these variable types to restrict characteristics in the rows, columns or in the filter.

3. Choose OK.

Editing restricted key figures

Note that when you change a restricted key figure, these changes are effective in all queries that use this restricted key figure.

You can see where the restricted key figure is used. Choose Where-used List from the context menu of the restricted key figure (secondary mouse click).

...

1. In the InfoProvider objects display frame, select the restricted key figure and, from the context menu (right-mouse click), choose Edit.

2. Make the required changes.

3. Choose OK.

Determining properties for the restricted key figure

...

1. In the left display frame for InfoProvider objects, select the restricted key figure and, from the context menu, choose Properties.

2. Make the required settings for the description, number format and currency translation for the restricted key figure. See Restricted key figure properties

>>Result

You have defined a restricted key figure for reuse. You can now use this restricted key figure in all queries based on this InfoProvider by moving the key figure into the rows or columns of the query using Drag&Drop. The restricted key figure is not an actual element in this query, but a placeholder referenced to the restricted key figure in the InfoProvider.

CKF: Calculated key figure.:

Defining Calculated Key Figures

>>Use

You can recalculate the key figures of an InfoProvider for reuse in the Query Designer using formulas. Calculated key figures consist of formula definitions containing basic key figures, restricted key figures or precalculated key figures.

>>Procedure

Defining a New Calculated Key Figure

In the InfoProvider objects display frame, select Key Figure and from the context menu (right-mouse click), choose New Calculated Key Figure.

If a calculated key figure has already been defined for this InfoProvider, you can also select the Calculated Key Figures entry and, from the context menu, choose New Calculated Key Figure.

The New Calculated Key Figure dialog box appears.

The upper part of the screen contains a text field in which you enter a description of the calculated key figure.

You can use text variables in the description.

Beneath this is the input field for the formula that you want to use to calculated the key figure. The bottom left screen area contains all of the operands available for the formula definition. These are:

The basic key figures, calculated key figures and restricted key figures from the relevant InfoProvider.

All form variables

On the right-hand side of the screen, you see the functions that are available as operators:

Basic functions

Percentage functions

Data functions

Mathematical functions

Trigonometric functions

Boolean operators

Between the operands and the functions, the symbols for the basic arithmetic operations are displayed. To the right of the functions, there is a number block.

Proceed as follows to define a formula:

Choose the operands you want to use, and insert them in the entry field for the formula by double-clicking or by using Drag&Drop.

Choose the calculation functions you want to use by either clicking on the symbols for the basic arithmetic operations, double-clicking on the functions, or using Drag&Drop.

Select the numerical values for the formula by clicking on the number block.

You can also enter digits, parentheses and basic arithmetical operations using the keyboard.

Define your formula using the available operands and operators.

If, when defining a formula, you want to use a variable that is not contained in the operands, you must first create the variable. Highlight the Formula Variable entry and using the right mouse button on the context menu, choose New Formula. You reach the variable wizard that takes you through a step-by-step process for defining a new variable.

If you want to change a formula variable, select the variable and, from the context menu, choose Edit. The variable editor appears.

Note that when you execute a query, the key figures are always calculated as the same unit. That is, a formula is semantically incorrect if, for example, a currency unit (for example, USD) is added to a weight unit (for example, kg). If you want to calculate values regardless of the unit, use the function Value Without Dimension (Without Units). See Data Functions.

Check the formula definition and choose Formula Syntax Check .

The Formula Syntax Check function checks only the correctness of the syntax in the formula. It does not check whether the formula makes sense semantically, for example, if it contains the same units. You make semantic checks using the function Check Query (see Functions of the BEx Query Designer).

Enter a description for the calculated key figure..

Choose OK. The new calculated key figure is defined for the InfoProvider.

Editing Calculated Key Figures

Note that when you change a calculated key figure, these changes are effective in all queries that use this calculated key figure.

You can see where the calculated key figure is used. Choose Where-used List from the context menu (right mouse click).

In the InfoProvider objects display frame, select the calculated key figure and, from the context menu (right-mouse click), choose Edit.

Make the required changes.

Choose OK.

Determining Properties for the Calculated Key Figure

In the left display frame for InfoProvider objects, select the calculated key figure and, from the context menu, choose Properties.

Make the required settings for the description, display, number format, currency translation, local calculations and the aggregation behavior of the calculated key figure. See Calculated key figure properties

>>Result

You have defined a calculated key figure for reuse.You can now use this calculated key figure in all queries based on this InfoProvider by moving the key figure into the rows or columns of the query using Drag&Drop. The calculated key figure is not an actual element in this query, but a placeholder referenced to the calculated key figure in the InfoProvider.

To my knowledge there is no documented limit on the number of RKF's and CKF's. But the only concern would be the performance. Restructed and Calculated Key Figures would not be an issue. However the No of Key figures that you can have in a Cube is limited to around 248.

Restricted Key Figures restrict the Keyfigure values based on a Characteristic.(Remember it wont restrict the query but only KF Values)

Ex: You can restrict the values based on particular month

Now I create a RKFlike this:(ZRKF)

Restrict with a funds KF

with period variable entered by the user.

This is defined globally and can be used in any of the queries on that infoprovider. In columns: Lets assume 3 company codes are there. In new selection, i drag

ZRKF

Company Code1

Similarly I do for other company codes.

Which means I have created a RKF once and using it in different ways in different columns(restricting with other chars too)

In the properties I give the relevant currency to be comverted which will display after converting the value to target currency from native currency.

Similarly for other two columns with remaining company codes.

please reward if useful.