Defining Formulas
SAP provides a number of predefined formulas.
You can also define additional formulas.
To define formulas, go to Customizing for SAP Utilities and choose .
Before defining any formulas in addition to those predefined by SAP, you must define a function module for the calculations. The function module must provide the following interface:
|
|
|---|---|
|
|
| |
|
You must use the following function modules as templates:
ISU_EDM_FORMULA_EASY
This template contains the most common calculation macros and is sufficient in most cases.
ISU_EDM_FORMULA_XXXX
This template contains all existing calculation macros.
Once you have copied the function module, you have to modify it to meet your requirements. You can do this using the functions of the ABAP Workbench.
You can obtain detailed information about the calculation from the source text of function module ISU_EDM_FORMULA_0005
.
Select Create Formula
.
Enter an ID and a name for the formula in the Form. ProfCalc
field (Formula for Calculation of Profiles).
Input Parameters group box
Enter a parameter name and number.
Choose one of the predefined profile value categories in the PV category
field (Profile Value Category).
Enter the number of intervals that must be included in the formula in the No. Intervals
field (Number of Influential Intervals).
If there are no dependencies between the intervals to be calculated, enter 0 for the number of intervals.
If you need values from previous intervals, enter a number higher than 0 for the number of intervals.
Refer to the field help for more information.
If you want to be able to allocate more than one profile to the input parameter, select the Repeatable
field.
If you want to allocate a constant value and not a profile to the input parameter, select the Constant Value
field.
If you want to use a determination method to determine the values for the input parameter, enter a predefined formula variable in the ID Form.Var
. field (ID EDM Formula Variable
).
For more information, see Variables.
If you want to be able to use default values for the input parameters, select the Default Value
field (Default Value Allowed in Formula
).
For more information, see Default Values.
Wählen Sie
(Copy
).
Your entries are then transferred to the list.
Repeat steps 3 to 10 for every additional input parameter required for the formula.
Calculation Mode group box
The calculation mode determines how a value is to be processed when the formula is executed.
Example
Manually entered values cannot be used for billing.

Example
By using the EXIT_SAPLEEDM_FORMUTIL_001
function module from the EEDMFO01
enhancement, the calculation mode can, for example, carry out a calculation based on the status of the input profile value.
As a result, values with the status Manually Entered
are not included in billing. Only the blue curve is included in billing.
Note
SAP has already predefined a number of calculation modes. You can also define additional calculation modes.
To define calculation modes, go to Customizing for SAP Utilities and choose .
See also: Calculation Mode
Select (double click) an input parameter from the list. The parameter number of the selected parameter appears automatically in the Calculation Mode
group box.
Select one of the predefined calculation modes in the Calc.Mode
(calculation mode) field.
If you want the system to use this calculation mode as the default value for the parameter, select the Default Value
field.
Caution
Only ever select the Default Value
field for one calculation mode.
Wählen Sie
(Copy
).
Your entries are then transferred to the list.
Repeat the steps 10 to 13 whenever you want to allocate one or more calculation modes to input parameters.
Output Parameters group box
Enter a parameter name and number.
Choose one of the predefined profile value categories in the PV category
field (Profile Value Category).
Enter the number of intervals that must be included in the formula in the No. Intervals
field (Number of Influential Intervals).
If there are no dependencies between the intervals to be calculated, enter 0 for the number of intervals.
If you need values from previous intervals, enter a number higher than 0 for the number of intervals.
Wählen Sie
(Copy
).
Your entries are then transferred to the list.
Repeat steps 15 to 18 for every additional output parameter required for the formula.
Once you have defined all input and output parameters, choose Save
.

Formula SUM01: Addition of Profiles (Quantities)
Function module for executing the formula |
|
Input parameters | |
Parameter number | 1 |
Description of formula parameter | Profiles to be cumulated |
Profile value category | Quantity |
Repeatable | Yes |
Number of intervals | 0 |
Constant value | |
Output parameters | |
Parameter number | 1 |
Description of formula parameter | Total profile |
Profile value category | Quantity |
Number of intervals | 0 |