Entering content frameFunction documentation Formula Editor Locate the document in its SAP Library structure

Use

The formula editor is used to define key figures in a Key Figure Scheme. A key figure can be defined as a formula using standard mathematical operations and consisting of key figures or other calculated key figures. You can also program your own ABAP functions.

Prerequisites

The operating concern must be defined.

Features

- Undefined formulas

- Recursive formulas

- Correct use of operators and parentheses

Note

You should only use the Without check if you need to leave the dialog box before you finish defining the formula. Always choose Check when you finish the formula.

The functions for key figure schemes are defined as form routines in include SAPMKEBF. There you can also define your own functions to supplement the existing ones.

The interface of your forms must adhere to the conventions shown in include SAPMKEBF. This means that the return parameter if declared first and then the input parameters after "USING". Do not define any types.

Example 

FORM notzero USING pe p1.
IF p1 = 0.

pe = 0.
ELSE.

pe = 1.
ENDIF.

The function "notzero" expects a parameter "p1". If this parameter is not "0", the function returns ("pe") a "1", otherwise it returns a "0".

Caution

When you call up a key figure scheme, the system reads include SAPMKEBF and analyzes the existing form routines so that they can be displayed using the Possible entries function in the formula editor. If the interface does not adhere to the conventions shown above, you cannot use the function in key figure schemes.

When you add further form routines to include SAPMKEBF, you must check the ABAP code and activate include SAPMKEBF.

 

 

 

 

Leaving content frame