Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CKF and RKF

Former Member
0 Kudos

Hi gurus

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

thanks in advance

maaya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

11 REPLIES 11

Former Member
0 Kudos

Hi,

RKF - you use it when you want further restrict the KF with a particular value of a char

ex - yoiu have sales KF in the cube... But on the report level user would want to see the sales for any particular year he enters. So you restrict ur sales with fiscal year,

CKF - is used to do calculations/formulas based on KF's

- How to determine when there is a situation when you have to create one (CKF or RKF, anything)

Answer to both is, the requirement should make the choice obvious. RKF and CKF are for entirely different reason and can't replace each other. So, you will know based on your requirement whether it can be fulfilled by one, or the other.

The same for the second question - if you do not have a basic KF which fulfils what you want to report, you will try to see if an RKF or CKF can fit in.

Please check the links to have a better understanding of CFK

Hope this will give u a basic info...Reward points:)

0 Kudos

hi

thanks for your reply. problem is solved

regards

maaya

Former Member
0 Kudos

HI,

Just check out dis link and it might solve ur problem:-

plzzz do give points tooo.

regrads,

ric.s

0 Kudos

hi

thanks for your reply. problem is solved

regards

maaya

Former Member
0 Kudos

Hi,

Please take a look at these help docs.

Defining Restricted Key Figures

http://help.sap.com/saphelp_nw2004s/helpdata/en/61/d0b143aa26b849b4e79a859ea1d7d1/frameset.htm

Defining Calculated Key Figures

http://help.sap.com/saphelp_nw2004s/helpdata/en/13/e072abaddb574284d22361f0b824bf/frameset.htm

RKF : It is a key figure with an associated filter on certain Characteristic values stored in the meta data repository for reuse in multiple queries

Steps to do This:

1. Goto Query Designer Select the Key figure folder in the Info provider Definition Area ( i.e left side of query designer Screen).

Right click ---> select "New Restricted Key figure" option

2. Enter the Description ---> expand the key figure folder -


>select ur key figure on which u will apply restriction .

3.Drag & drop that key figure to Right side panel in the same screen .

4. Expand Dimensions ->expand your any Characteristic>select your characteristic-->Drag & drop in the Right side panel in the same screen

NOTE: Key figures are not directly Restrict, It should have some characteristic so that u have to do the 4th step.

5. Select your char ---> right click > select restrict> now select the values for whom u will display that particular key figure.

PRESS "OK"

6.enter the Technical name like RKF_PROFIT..

7.Enter description > U have any scaling factors u can give-> No of decimal places if u want to mention mention in box.

OK

8.Observe the folder in Query designer with name Restricted Key figure--->expand this node u will get your restricted key figure ---> select that drag and drop in to columns Right side of Query Designer screen.

9.Save query execute it.

10. That particular key figure restricted to some char. observe it.

Calculated KF:

To do complicated calculations on key figures such as mathematical functions,percentage functions and total functions, etc.

For example you can have a calculated key figure to find out sales tax from Sales price.

Reward if helpful.

Regards,

Harini.S

0 Kudos

hi

thanks for your reply. problem is solved

regards

maaya

Former Member
0 Kudos

hi

good

Authorizations can be granted for the following objects for the query definition in the Business Explorer:

The entire query

Structures

Calculated key figures

Restricted key figures

Variables

The activities for the query definition are specified in the authorization object S_RS_COMP (Business Explorer - components). The authorization object has the following fields: InfoArea, InfoCube, component type, component name and activity.

The following values are possible for the component type:

REP: Entire query

STR: Structure

CKF: Calculated key figure

RKF: Restricted key figure

VAR: Variables

By specifying an InfoArea or an InfoCube, you can further restrict the component types. By specifying a component name, you can specify the authorization for individual components in more detail. Components that begin with 0 are delivered by SAP and cannot be changed. Components that are within the customer name range must begin with a letter of the alphabet.

reward point if helpful.

thanks

mrutyun^

0 Kudos

hi

thanks for your reply. problem is solved

regards

maaya

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

see this

RKF consists of a key figure restricted with certain charecteristics combinations CKF have calculations which fully uses various key figures

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

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.

Regards

anji

0 Kudos

hi

thanks for your reply. problem is solved

regards

maaya