Create Formula

You can create and simulate formulas in M3 Product Data Management to calculate values, such as material quantities and sales prices, during a product configuration.

The creation of formulas has these purposes:

  • Specify formulas for dynamic calculation of material quantities, operation times, sales prices, or drawing measurements when a product is configured.
  • Specify formulas for the markups for elements in the purchasing model.

The procedure also includes checking the formulas through simulation.

Before you start

You must perform these actions before you can begin to create a formula:

  • Specify features in 'Feature. Open' (PDS055)
  • Specify drawing measurements in 'Drawing Measurement. Open' (PDS080)
  • Specify the unit of measure in 'Unit of Measure. Open' (CRS050).
  • Configure the matrix in 'Selection Matrix. Open' (PDS090) when the result of a matrix table lookup is used in a formula as a type 7-Matrix factor.
  • Define the custom fields for either the item or supplier before using them in a formula.

Follow these steps

Follow these steps to create a formula.

  1. Select program 'Formula. Open' (CRS570). Include panels E and 1 in your panel sequence.

  2. Create a formula.

  3. Fill in or change the information in the formula header in panel E. Specify the search hierarchy to be used to simplify creating formula lines. The hierarchy has a certain effect on response times, but is most important when there are features, drawing measurements or projects with the same ID. The program 'Formula Lines. Open' (CRS575) is now opened. If program (CRS575) is run for the first time, options should be set using F13-'Parameters'.

  4. Specify the formula lines by using related option 11. If a calculation has more than two factors, continue to the next line without specifying a result. When a calculation must be performed using different formulas based on the value of a factor, apply Boolean algebra operators such as IF, OR, AND, ELSE, and END. The sequence number regulates the order of the calculations. If it is left blank, it is set automatically according to the range specified in the panel reached using F13- 'Parameters'. The same applies for the factor type, which is set according to the hierarchy selected in the formula header. A formula can have several results, so similar calculations can be combined in one formula. This can be useful when subtotals in one calculation should be reused in another calculation because results cannot be obtained from other formulas.

    You can use these factor types in a formula:

    • 0- Blank
    • 1- Constant value or result ID in the formula
    • 2- Drawing measurement
    • 3- Feature
    • 4- Retrieved constants
    • 5- Attribute
    • 6- Test
    • 7- Matrix: The result of a Matrix table look up
    • 8- User Defined Fields: The same user defined field can be defined at different levels. When a formula is called in connection with a purchase order, the fields are retrieved in this order: from purchase agreement line, then agreement header, then item number, then supplier. When no agreement exists, the search or retrieval is by item and then supplier. When not a purchase, the search or retrieval is by item only.
    • You can define a date when using factor types 4, 5, or 8 to calculate the difference between two dates in number of days. When used, both factors on the line must be date type, and Boolean processing code DO must be used. A date can be one of these values:
      • Received Date
      • Current Date
      • Custom Field of type Date
      • Attribute of Type Date
    • A formula can have several results. You can combine similar calculations in one formula. This is useful when subtotals in one calculation should be reused in another calculation because results cannot be obtained from other formulas.
    • For Factor type 8- Custom Fields, you can use the 'Custom Field Identifier' (CFIR), a new drop-down field in (CRS575), to support the retrieval of custom field values from different product structure levels. This field enables control over whether custom fields used in formulas come from the component, intermediate, or top-level product.

      You can use these options along with Factor type 8- Custom Fields:

      • 0- Content- based item: This is the standard setting for Grower Contract Management (GCM). It supports using structure formulas with custom fields at either the product or component level.
      • 1- Final Product: When you use this option in the formula, the custom field value is defined in 'Custom field. Update' (CMS474) is retrieved from the top-level or finished product. The top-level product is the highest-level order that initiates the manufacturing process.
      • 2- Intermediate product: When you use this option in the formula, the custom field value defined in (CMS474) is retrieved from the intermediate product. An example of this is the semi-finished products or phantom items.
      • 3- Component item: When you use this option in the formula, the custom field value defined in (CMS474) is retrieved from the specific component item.
        Note: If the parameter (CFIR) is used without a defined product structure, the formula may produce inaccurate results. This is because the calculation relies on data such as the final or finished product, intermediate product, and component item. These data are only available when a product structure similar to Bills of Materials is in place.
  5. Specify a brief textual note for each formula in the detail panel. In this panel, you can override the processing of negative values, which are normally specified in the formula header.
  6. Simulate the formula by using 'Formula. Simulate' (CRS576). To start (CRS576), select F15='Simulation'. Specify the values and perform the simulation. You must specify the values and perform the simulation. Sorting order 2 in (CRS576) provides an overview, while sorting order 1 enables you to follow the calculation step by step.

Output

When you use this procedure, a formula is created. You can manipulate the formula by using simulations, and calculate sales price, material consumption, run time for an operation and various measurements.

Description

This example contains calculations that needs to be performed:

Width- 40 = Wid01: You must round the answer up to one decimal place.

Wid01- 1 = Wid02

Depth- 34 = Dep01

Width * Depth * (Height /1000) = Price if width > 100, otherwise price = 10000

In these calculations, Width, Depth and Height are features. This table shows how the formula can be created to perform the calculations:

Sno

Boo

Op

Par

Ftp

Cfi

Factor 1

Par

Op

Par

Ftp

Cfi

Factor 2

Par

Res

Neg

Rnd

Rul

10

3

WIDTH

-

1

40

WID01

1,0

+

20

3

WID01

-

1

1

WID02

110

3

DEPTH

-

1

34

DEP01

180

IF

3

WIDTH

>

1

100

190

DO

3

WIDTH

*

3

DEPTH

200

DO

*

(

3

HEIGHT

/

1

1000

)

PRICE

210

EL

1

10000

PRICE

220

EN