Mathematical formulas allow you to customize field values, including date and time. A formula can include:
- Free text you enter
- Mathematical expressions
- Fields from the current document, or other business documents or objects in the database
This lesson covers a few examples of how to define a mathematical formula. The following video shows you how to define a mathematical formula on a header field. Note that you can apply this concept to any field that allows editing and testing, such as date, alphanumeric, or numeric fields for calculations.
Note
Mathematical formulas support:
- Mathematical operators and brackets: (, +, -, *, /, )
- Additions of strings
- System fields and UDF, in header and table
- API for Date and Time - for example, you can define a UDF that measures the KPI of how many days before Christmas you delivered an order. The formula will be: DATE(2024, 12, 24) - DeliveryDate
The API DATE (YEAR, MONTH, DAY) creates a date based on the three parameters. If the delivery date was on 20/12/2024, the result of the formula will be 4.
The same concept is relevant for the TIME API: TIME(hour, minute, second)
Refer to the guidelines for Effective Formulas on the SAP Help Portal.
Note - A formula can also be defined as manual refresh. You need to manually refresh the value in the field.
