This chapter contains these topics:
For an assembly inclusion rule, you can define derived calculations to determine:
Quantity of a part to include on the work order or sales order
Value of a calculated segment
Run or machine hour multiplier for a routing
Price multiplier
Use algebraic formulas to combine different operations with the following operators: + , - , * , and /. You can imbed calculations by enclosing them in parentheses. You can imbed segment numbers in the formula to include segment values as part of the calculation.
For example, the following formula calculates the counter weight necessary so that the forklift will not tip over when its boom is extended to its tallest height with a full load:
Formula | Calculation |
---|---|
Derived Calculation | S10/(4*COS(2*S30*3.1416/360*2*3.1416)) |
You can reference any segment within a formula. To reference a segment within the same configured item, enter S and the segment number. For example:
To reference a segment from a different configured item, enter S, the segment number, and the configured item name. Enclose the item name within equal signs. For example:
Reference | Description |
---|---|
S3=Piston= | Indicates segment three of item Piston |
When you reference another segment in a multi-level configured item, you can only reference upper levels.
You can use trigonometric or logarithmic functions independently or as part of a complex formula.
The following trigonometric functions are available:
Function | Description |
---|---|
SIN(1.5) | Indicates the sine of 1.5 |
COS (S3) | Indicates the cosine of segment three |
TAN(S3) | Indicates the tangent of segment three |
ARC(S3) | Indicates the arctangent of segment three |
All of these values are expressed in radians.
The following logarithmic functions are available:
Function | Description |
---|---|
LOG | Indicates log to base 10. |
LN | Indicates natural log. |
** | Indicates an exponent. For example, 2**5 represents 2 to the fifth power. |
You can use the SUBSTR (substring) function to include a portion of a larger string of characters in a formula.
To calculate a substring, you must reference the segment from which you want to take the substring, the starting position within the string where you want to begin referencing values, and the length of the string you want to reference. For example, if segment 10 is 400012 then:
Function | Description |
---|---|
SUBSTR(S10,1,4) | Indicates that the substring from segment 10 starts at the first position of the string and includes the next 4 positions. The substring value is 4000. |
SUBSTR(S10,5,2) | Indicates that the substring from segment 10 starts at the fifth position of the string and includes the next 2 positions. The substring value is 12. |
You can use the CONCAT (concatenate) function to combine the values of two different segments. For example:
Function | Description |
---|---|
CONCAT(S3,S4) | Combines the values of segments 3 and 4. If the segment value of segment 3 is 1001 and the value of segment 4 is WH (white), the concatenated value is 1001WH. |
You can select field values from the External Files Reference form to use in derived calculations. Choose a field from the following tables:
F4101 - Item Master
F4102 - Item Branch
F41021 - Item Location
F4105 - Cost Ledger
F4106 - Base Price
F0101 - Address Book Master
F0301 - Customer Master
F41002 - Unit of Measure Conversion
F41092 - Supplemental Database
F46011 - Item/Unit of Measure Profile
After you reference a field value, the information appears in the Derived Calculation field preceded by an ampersand (&). You can use the field independently or within a complex expression.
For rule types P, R, X and C, the system uses the component item number and branch from the rule to retrieve the appropriate tables.
The system uses the Address Book number to retrieve data from the Address Book or Billing Instructions tables.
When you reference a Supplemental Database field, you must also specify the data type. Enter the data type after the field as follows:
Reference | Description |
---|---|
&T2AMTU(WD) | Indicates an amount field on the item supplemental database table, and the WD data type. |
When you reference the Unit of Measure in Unit of Measure Conversion tables, you must specify the unit of measure in the same manner.
You can use an external program to define a calculation. Enter the name of the external program. You must also indicate EXTVAR in the Derived Calculations field. After the system runs the external program, it places the results in EXTVAR, a 30 character variable in the inclusion rule.
For P and R rules, the external program references the component number, component branch, and sold to number.
For C or X rules, the external program references the configured item number, branch/plant, and sold to number.
The external program can also access and use the values of previously entered segments sorted in user indexes. The system passes the following parameters to the external program are:
Item number
Branch/Plant
DSKITP, a comprehensive data structure that contains many different values.
EXTVAR
For P and Q rules, you can build smart part numbers using the segment values from sales order entry. The system calculates smart parts in a similar manner to derived calculations, however the resulting smart part is an alphanumeric string. You must define smart part numbers in the Item Master (F4101) and Branch/Plant (F4102) tables.
You can build a part number by using following functions:
Segment referencing
Substring
Concatenation
Literal text, for example the letter P in part number P165
Smart part formulas can define short, second or third part numbers. Smart parts use the part numbering symbol conventions defined in Branch/Plant Constants. For example, if the smart part formula uses the symbol to identify the third part number along with the third part number, the system would place the second part number on the sales order and work order detail line.
When you define a smart part, you can also use a derived calculation to determine the quantity of the smart part to use.
For example:
Reference | Description |
---|---|
'P'S4 | Indicates a smart part number P2000, when the value of segment 4 is 2000. |