Formulas in SAP can be a powerful way to**optimize business processes and make more informed decisions.** Formulas are mathematical or logical expressions that allow you to perform calculations on data stored in SAP. They can be used in different contexts, such as creating reports, defining pricing strategies or managing inventory.

There are several types of formulas in SAP, each with its own functionality and uses. For example:

To create a formula in SAP, you must use the integrated formula editor.

## Formulas in SAP - Setting parameters

The first thing to do is to define the parameters that will compose your formula. By parameters, I mean a field recognized by SAP to express a value. These parameters are set in the following Customizing point :

`SPRO : Logistics - General - Product Lifecycle Management (PLM) - Production Ressources/Tools - Assignment of Production Ressources/Tools - Formulas - Define formula parameters`

*Note: There are many ways to access the formulas and this is one of them.*

Thus, this is where all the parameters available for editing formulas are located.

Let's see what's behind the SAP_08 parameter, which represents the "Base Quantity":

In the set, we can see the definition of the parameter, its description, its unit but especially its linked field in SAP. Namely here the technical field "BMSCH", which will allow SAP to know its value dynamically, depending on the context and its use.

Next, let's see how to use the formula editor in SAP.

## Formula definition

**This editor allows you to enter the mathematical expression you want to use to calculate the desired value. **You can also use predefined functions in SAP, such as interest rate calculation functions or currency conversion functions.

`SPRO : Logistics - General - Product Lifecycle Management (PLM) - Production Ressources/Tools - Assignment of Production Ressources/Tools - Formulas - Define formulas`

Some standard formulas are already proposed by SAP but, of course, it is possible to create your own formulas to meet the specific needs of each company.

Here for example, the "Machine requirement" indicator will be calculated as follows:

We will multiply the Machine Time (SAP_02) by the quantity needed for the operation (SAP_09), divided by the base quantity of the manufacturing order (SAP_08)

In addition, there are different indicators influencing these formulas:

## Formulas in SAP - Assignment

Indeed, there are many places to assign a formula and use it to calculate particular values.

To give an example, let's go to the CR03 transaction that displays the data of a production Work Center.

In the tab **"Scheduling**, It is possible to define different formulas to calculate specific fields and thus, to allow a planning according to the needs and the process of the companies.

Therefore, in the Execution time section, it is possible to specify a formula that will calculate the time needed to set up the machine.

In addition, it is also possible to test the result of a formula live, to ensure that the results will be consistent. Place yourself on the formula to be tested and click on the appropriate button

It remains to indicate the test values and analyze the result:

## Conclusion

In conclusion, the use of formulas in SAP is **an efficient way to automatically calculate the value of objects in a system.** This optimizes the calculation processes and makes the data more accurate and reliable.

In addition, the use of formulas in SAP can also allow to **create calculated objects**which can be useful for displaying aggregated data or results of complex calculations.

In sum, the use of formulas in SAP can be a valuable tool to improve data management and decision making in an organization.

Would you like unlimited access to our entire SAP training library? Test our training platform free of charge for a 7-day trial period.

###### Michael Antoine

SAP technical-functional consultant, WM (Warehouse Management) and eWM (extended Warehouse Management) expert.

## Leave a Reply