Formulas in SAP: tips for a successful configuration

SAP Formulas configuration

Formulas in SAP can be a powerful way tooptimize business processes and make more informed decisions. Formulas are mathematical or logical expressions used 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:

  • conditional formulas
  • table formulas
  • or even string formulas

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.

SPRO - Formulas
SPRO – Formulas

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

Define Formulas Parameters

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

SAP_08 parameter
SAP_08 Parameter

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
Define 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.

SAP006
SAP006

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:

This indicator generates background code for your formula. It is used for performance reasons and should be checked if your formula is commonly used. Indeed, the system can directly use this command. Otherwise, it will only be read during Scheduling or Costing steps.

This tells the system whether your formula can be used to calculate a cost

Same as the previous point but to calculate a requirement.

Here it will tell the system if it can use it to calculate the need for a tooling. To learn more about tooling, please see our dedicated article.

SAP PRT

Authorize or not its use for scheduling.

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.

Transaction CR03
Transaction CR03

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.

Scheduling view
Scheduling view

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

Test formula
Test formula

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

Result of the test of the formula
Result of the test of the formula

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 create calculated objectswhich 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 a company.

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

Leave a Reply

Your email address will not be published. Required fields are marked *