METHOD06 - Simple Calculation
Overview
The Simple Calculation method provides a straightforward calculation of handling unit quantity by dividing the item quantity by the handling unit capacity. This is the most basic calculation method and is suitable for standard scenarios where no complex constraints apply.
Purpose
This method calculates the Expected Shipment Handling Unit Qty. by:
- Dividing the quantity by the handling unit capacity (
Qty. per UOM Code) - Rounding up to ensure all items fit
- Providing a simple, direct handling unit count
Parameters
| Parameter Name | Type | Description | Default |
|---|---|---|---|
EXIT IF NOT FOUND |
Boolean | Exit with 0 if no Handling Unit Type UOM setup is found | false |
Algorithm
Step 1: Determine Handling Unit Type
The method determines which handling unit type to use in the following order:
Use
DocumentLine."Handling Unit Type Code"if available- Go to Step 2 if found
Get handling unit type from Customer Item:
- Try
CustItem."Handling Unit Type Code (Shipment)" - If empty, try
CustItem."Handling Unit Type Code (Receipt)" - Go to Step 2 if found
- Try
Step 2: Get Handling Unit Type UOM
Retrieve the Handling Unit Type Unit of Measure record:
- Look up
CarrierTypeUOMfor the customer item, unit of measure, and handling unit type - If not found, try to get from the same handling unit type group
- If
EXIT IF NOT FOUNDparameter is enabled and no UOM found:- Exit with result = 0
- Go to End
Step 3: Validate Handling Unit Capacity
Ensure that CarrierTypeUOM."Qty. per UOM Code" is greater than 0.
- If 0 and
EXIT IF NOT FOUNDis enabled:- Exit with result = 0
- Go to End
Step 4: Calculate Result
Result = Round(Quantity / CarrierTypeUOM."Qty. per UOM Code", 0.001, '>')
Where:
- Division is rounded up to 3 decimal places
Calculation Steps
Variable Definitions
- A = Quantity
- B = Handling unit capacity (
Qty. per UOM Code) - C = Final result (number of handling units)
Step-by-Step Formula
Get quantity:
A = QuantityGet handling unit capacity:
B = CarrierTypeUOM."Qty. per UOM Code"Calculate result:
C = Round(A / B, 0.001, '>')
Examples
Example 1: Exact Division
Scenario:
Quantity= 100 piecesCarrierTypeUOM."Qty. per UOM Code"= 50 pieces per handling unit
Calculation:
- Quantity: A = 100 pieces
- Handling unit capacity: B = 50 pieces per handling unit
- Result: C = Round(100 / 50, 0.001, '>') = 2.0 handling units
Result: 2.0 handling units
Example 2: Rounding Up
Scenario:
Quantity= 125 piecesCarrierTypeUOM."Qty. per UOM Code"= 50 pieces per handling unit
Calculation:
- Quantity: A = 125 pieces
- Handling unit capacity: B = 50 pieces per handling unit
- Result: C = Round(125 / 50, 0.001, '>') = 2.5 handling units
Result: 2.5 handling units
Example 3: Small Remainder
Scenario:
Quantity= 101 piecesCarrierTypeUOM."Qty. per UOM Code"= 50 pieces per handling unit
Calculation:
- Quantity: A = 101 pieces
- Handling unit capacity: B = 50 pieces per handling unit
- Result: C = Round(101 / 50, 0.001, '>') = 2.02 handling units
Result: 2.02 handling units
Example 4: Exit If Not Found
Scenario:
Quantity= 100 piecesEXIT IF NOT FOUNDparameter =true- No Handling Unit Type UOM setup found for the item
Result: 0 handling units (exits early because no setup found)
Important Notes
- This is the simplest calculation method with minimal logic
- No consideration for height, volume, or layer constraints
- Suitable for standard scenarios where handling unit capacity is the only factor
- The
EXIT IF NOT FOUNDparameter allows graceful handling of missing configurations - Result is always rounded up to ensure all items fit