Start of Content Area

Procedure documentation Defining Formulas Ad Hoc  Locate the document in its SAP Library structure

Use

In BEx Web applications, you can use a formula to make an ad hoc recalculation of key figures in a structure.

Caution

Note the following points:

        You cannot edit formulas that you have created in Query Designer.

        The context menu items described below are not visible in the standard setting. The items become visible if you include the Context Menu Web item and activate the Local Formulas (MENU_LOCAL_FORMULAS) parameter. More information: Context Menu

Procedure

Defining a Formula

...

       1.      In the context menu for a structural component, choose Calculations and Translations Formulas New Formula.

       2.      Enter a description for the formula.

       3.      Define your formula using the operands and operators provided.

The area to the bottom left contains all the operands available for defining the formula. These are:

       The structure elements contained in the structure

       The formulas that you have already defined ad hoc in this structure

On the right side of the screen, the functions that are available as operators are displayed:

       Mathematical functions

       Boolean operators with the exception of relational operators (<, <=, <>, ==, >, >=)

       Percentage functions

       Trigonometric functions

       Data functions

Above these two areas, the symbols for basic arithmetical operations are displayed. To the right, there is a numeric pad.

To define a formula, proceed as follows:

       Choose the required operands by clicking them. They are displayed in the upper field, which contains the formula definition.

       Choose the calculation functions you want to use by either clicking the icons for basic arithmetical operations or by clicking the functions in the Available Operators field.

       Select the numerical values for the formula by clicking the numeric pad.

Note

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

       4.      To test whether the syntax and semantics in the formula definition are correct, choose Check.

Caution

Note that key figures are always calculated with the same unit. A formula is semantically incorrect, for example, if you add a currency unit (such as EUR) with a weight unit (such as kg). If you want to calculate values regardless of the unit, use the Value Without Dimension (No Unit)function.

More information: Data Functions

       5.      Choose OK.

The new formula is defined in the structure and is displayed in the analysis grid.

Editing a Formula

...

       1.      In the context menu for a structural component, choose Calculations and Translations Formulas <Description of the Formula> Edit.

       2.      Make the required changes to the formula definition.

       3.      Choose OK.

Removing a Formula

...

In the context menu for a structural component, choose Calculations and Translations Formulas <Description of the Formula> Remove.

The formula is removed from the Web application.

Result

You have defined the formula ad hoc in the Web application and have the option of saving it as a query view for reuse.

 

 

 

End of Content Area