METHOD02 - Layer Calculation
Overview
The Layer Calculation method calculates the number of handling units needed by determining full handling units based on capacity and adding a partial handling unit for any remaining quantity. This is a straightforward method that divides the quantity by the full handling unit capacity and rounds up for any remainder.
Purpose
This method calculates the Expected Shipment Handling Unit Qty. by:
- Calculating the number of full handling units based on
Qty. per UOM Code - Determining the remaining quantity after full handling units
- Calculating additional handling units needed for the remaining quantity using order pick handling unit types
- Summing full handling units and pick handling units
Parameters
| Parameter Name | Type | Description | Default |
|---|---|---|---|
USE_SHIP_CT |
Boolean | If enabled, use shipment handling unit type from conditions instead of document line handling unit type | false |
Algorithm
Step 1: Determine Handling Unit Type
The method determines which handling unit type to use in the following order:
If
USE_SHIP_CTparameter is enabled:- Get first shipment handling unit type from conditions
- Go to Step 2 if found
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
Get handling unit type from Handling Unit Content table
- Go to Step 2
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
Step 3: Calculate Full Handling Units
FullCarriers = Quantity div CarrierTypeUOM."Qty. per UOM Code"
RestQty = Quantity mod CarrierTypeUOM."Qty. per UOM Code"
Where:
div= integer division (whole number only)mod= modulo (remainder)
Step 4: Calculate Pick Handling Units (if RestQty > 0)
If there is remaining quantity (RestQty > 0):
Determine Order Pick Handling Unit Type:
- Get order pick handling unit type filter from conditions
- If filter is empty, use the same handling unit type as full handling units
- If filter has values, find the first matching handling unit type with valid UOM setup
Get Order Pick Handling Unit Type UOM:
- Look up UOM for the order pick handling unit type
- If not found, try handling unit type group
- If still not found, use the full handling unit UOM
Calculate Pick Handling Units:
PickCarriers = Round(RestQty / OrderpickCarrierTypeUOM."Qty. per UOM Code", 0.001, '>')(Rounded up to 3 decimal places)
Step 5: Calculate Final Result
Result = FullCarriers + PickCarriers
Calculation Steps
Variable Definitions
- A = Full handling units (integer)
- B = Remaining quantity (RestQty)
- C = Pick handling units (decimal, rounded up)
- D = Final result
Step-by-Step Formula
Calculate full handling units:
A = Quantity div CarrierTypeUOM."Qty. per UOM Code"Calculate remaining quantity:
B = Quantity mod CarrierTypeUOM."Qty. per UOM Code"If B > 0, calculate pick handling units:
C = Round(B / OrderpickCarrierTypeUOM."Qty. per UOM Code", 0.001, '>')Calculate final result:
D = A + C
Examples
Example 1: Exact Full Handling Units
Scenario:
Quantity= 100 piecesCarrierTypeUOM."Qty. per UOM Code"= 50 pieces per handling unit- No remaining quantity
Calculation:
- Full handling units: A = 100 div 50 = 2 handling units
- Remaining quantity: B = 100 mod 50 = 0 pieces
- Pick handling units: C = 0 (no remainder)
- Result: D = 2 + 0 = 2 handling units
Result: 2 handling units
Example 2: Full Handling Units with Partial Handling Unit
Scenario:
Quantity= 175 piecesCarrierTypeUOM."Qty. per UOM Code"= 50 pieces per handling unit (full handling unit)OrderpickCarrierTypeUOM."Qty. per UOM Code"= 30 pieces per handling unit (pick handling unit)
Calculation:
- Full handling units: A = 175 div 50 = 3 handling units (150 pieces)
- Remaining quantity: B = 175 mod 50 = 25 pieces
- Pick handling units: C = Round(25 / 30, 0.001, '>') = 0.834 handling units
- Result: D = 3 + 0.834 = 3.834 handling units
Result: 3.834 handling units
Example 3: Using Shipment Handling Unit Type from Conditions
Scenario:
USE_SHIP_CTparameter =true- Condition provides shipment handling unit type = "EUR-PALLET"
Quantity= 240 piecesCarrierTypeUOM."Qty. per UOM Code"= 60 pieces per EUR pallet
Calculation:
- Handling Unit type determined from conditions: "EUR-PALLET"
- Full handling units: A = 240 div 60 = 4 handling units
- Remaining quantity: B = 240 mod 60 = 0 pieces
- Result: D = 4 handling units
Result: 4 handling units
Example 4: Multiple Partial Handling Units Needed
Scenario:
Quantity= 87 piecesCarrierTypeUOM."Qty. per UOM Code"= 50 pieces per handling unitOrderpickCarrierTypeUOM."Qty. per UOM Code"= 20 pieces per handling unit
Calculation:
- Full handling units: A = 87 div 50 = 1 handling unit (50 pieces)
- Remaining quantity: B = 87 mod 50 = 37 pieces
- Pick handling units: C = Round(37 / 20, 0.001, '>') = 1.85 handling units
- Result: D = 1 + 1.85 = 2.85 handling units
Result: 2.85 handling units
Global Parameters Set
This method sets the following global parameters (via SetGlobalParams):
noofcarriers= Final result (D)fullcarriertype= Full handling unit type codefullcarriers= Number of full handling units (A)fullcarriertypeqty= Quantity in full handling units (A × Qty. per UOM Code)pickcarriertype= Pick handling unit type codepickcarriers= Number of pick handling units (C)pickcarriertypeqty= Quantity in pick handling units (B)pickcarriertypeqtyper= Pick handling unit capacity