Ansicht
Dokumentation
KKML7 - Maintain Key Figures
Fill RESBD Structure from EBP Component Structure Vendor Master (General Section)This documentation is copyright by SAP AG.
In this section, you maintain key figures.
The basic key figures of an aspect are the amount fields and quantity fields of the relevant data structure. To prevent the storage of redundant data, only store values in the database that cannot be calculated from other values. Calculated key figures can be defined using the key figure transaction.
An arithmetic formula must be entered for a key figure. The values entered in the formula are the basic key figures of the aspect, constants, and previously defined key figures.
Key figure formulas can be up to 4,096 bytes long. Note that key figures in the information system are resolved internally.
- Select an aspect for which you want to maintain key figures.
- Enter a new key figure or edit an existing one.
- Maintain the short text and description, and enter a formula.
- You can assign the key figure to a key figure group. The key figure group is used in the information system when reports are being defined. Each key figure is bound to a particular aspect. However, if all the basic key figures also exist in a second aspect, this key figure for the second aspect can be made visible by making an entry in table TKCKA.
Notes
You can display the possible input values for the formula using the 'Display basic fields' function. You can switch between basic key figures, existing key figures, and constants using the 'Switch basic fields' function.
The following operators are supported in the formula:
Operator Description | |
---|---|
+, -, *, / | Basic arithmetic operations |
% | Percentage variance |
%A | Percentage |
** | Raise to a power |
= | Assignment |
ABS | Absolute amount |
COS | Cosine |
DIV | Division (of integers) |
EXP | Exponential function |
LOG | Logarithm |
MAX | Maximum |
MIN | Minimum |
MOD | Remainder (of division of integers) |
SIN | Sine |
SQT | Square root |
Before saving, you must execute the 'Check formula' function. The formula is checked for correct syntax, the formula stages are generated, and the technical attributes are set to default values. The formula stages represent the breakdown of the key figure formula into elementary calculation steps (stages). After the syntax check, the key figures are checked for their logical sense. The system checks, for example, that quantities are not added to values.
You can reset the key figure to the version stored in the database or the last saved version using the function 'Reset formula'.
Choose 'Substitute formula' to replace the key figures with the elements defining them until the formula contains only basic key figures and constants.
Using the function 'Get formula(s)', you can display or hide the formulas for the key figures in the lower formula area. You can specify the key figures by entering the name or subgroup.
Using the function 'Switchover paging', you can switch between the upper and lower formula areas.
By choosing the 'Evaluate formulas' function, you can use the key figure transaction as a calculator. You can enter values in the basic fields and let the system calculate the key figure values from the formulas ('Calculate key fig.' function). The calculated values are displayed on the formula stage screen. (You may have to switch between the value and attribute display.)
You can check whether recursive relationships exist between key figures using the function 'Check recursion'.
The function 'EIS stage form' is for internal test purposes only.
By choosing 'Formula stages', you branch to a further screen. Here, the calculation stages for the key figure are displayed. You can also set the time-based and non-time-based aggregation rules, the time reference field, the 'No aggregation required' indicator, and the number format (number of decimal places and display factor).
The 'No aggregation required' indicator specifies how the key figure should be calculated in the results row in the information system. It is either aggregated or calculated from the aggregated basic values according to the formula rules.
A | B | A/B |
1 | 10 | 0,1 |
10 | 1 | 10 |
---- | ---- | ----- |
11 | 11 | 10.1 or 1 |
The 'No aggregation required' indicator must be set in the following cases:
- Operators other than '=', '+', and '-' are used in the key figure
- The 'No aggregation required' indicator is set for a key figure used in the formula
- A time-based or non-time-based aggregation rule other than 'SUM' is used for a basic key figure or key figure
The (non-time-based) aggregation rule specifies how the data is to be summarized. The following functions are available:
Function Description | |
---|---|
MAX | Maximum |
MIN | Minimum |
NOP | No aggregation |
SC+ | Summation where > 0 |
SC- | Summation where < 0 |
SUM | Summation |
The time-based aggregation rule specifies how the key figures are to be summarized with respect to time. If a function other than 'SUM' is used, you must specify a valid characteristic as the time reference field. You can use the variable '&PERI' if the time-based aggregation is to be based on fiscal year and period. The following functions are available:
Function Description | |
---|---|
AVG | Average |
CNT | Counter |
FIR | First value |
LAS | Last value |
MAX | Maximum |
MIN | Minimum |
NOP | No aggregation |
SC+ | Summation where > 0 |
SC- | Summation where < 0 |
STD | Standard deviation |
SUM | Summation |
VAR | Variance |
You can maintain time-based and non-time-based aggregation separately. For stock (for example, average warehouse stock), it is useful to choose 'AVG' for the time-based aggregation and 'SUM' for the non-time-based aggregation.
If you define a time-based aggregation rule other than 'SUM', you must maintain a time reference field. You can use '&PERI' (which represents the fiscal year and period) or a valid characteristic of type 'D'.
Notes
- All key figures in a report must have the same time reference field.
- The time reference field should be the most precise time field in the aspect. According to this rule, the posting date field would supersede the fiscal year field.
- Where basic key figures have a time-based aggregation rule other than 'SUM', they cannot be used to create key figures with another aggregation rule. According to this rule, to create a key figure 'Maximum warehouse stock' with time-based aggregation 'MAX' and time reference field '&PERI' that shows the maximum warehouse stock per period, it is necessary to define the key figure 'Warehouse stock' with time-based aggregation 'SUM' and the key figure 'Average warehouse stock' with time-based aggregation 'AVG' and time reference field '&PERI'.
Further Information
CL_GUI_FRONTEND_SERVICES - Frontend Services Vendor Master (General Section)
This documentation is copyright by SAP AG.
Length: 10574 Date: 20240523 Time: 201609 sap01-206 ( 160 ms )