METHOD01 - Height Calculation
Overview
The Height Calculation method determines the number of handling units needed based on stacking height limits. This method calculates how many handling units are required by dividing the total height of all items by the maximum allowed stacking height per handling unit.
Purpose
This method calculates the Expected Shipment Handling Unit Qty. by:
- Determining the total height needed for all items
- Accounting for interleave handling units (if applicable)
- Dividing by the maximum handling unit height
- Applying a stacking factor (if configured)
Parameters
| Parameter Name | Type | Description | Default |
|---|---|---|---|
DETAIL LINES |
Boolean | If detail lines exist, use data from detail lines instead of calculating | false |
STACKING FACTOR COND |
Code[10] | Condition code containing stacking factor (decimal value) | (empty) |
Algorithm
The calculation follows these steps:
Step 1: Check for Detail Lines
If the DETAIL LINES parameter is enabled and detail lines exist for the document line:
- Count unique handling units from detail lines
- Return the count as the result
- Go to End
Step 2: Get Calculation Parameters
Retrieve the following parameters:
- Customer Item (
CustItem) - Unit of Measure (
UnitOfMeasure) - Handling Unit Type (
CarrierType) - Handling Unit Type UOM (
CarrierTypeUOM) - Quantity (
Quantity) - Maximum height, weight, and cubage from conditions
Step 3: Determine Stacking Factor
- Get stacking factor condition code from
STACKING FACTOR CONDparameter - If condition code is provided:
- Retrieve stacking factor value from conditions
- If stacking factor = 0, set to 1
- If no condition code or value = 0:
- Set stacking factor = 1
Step 4: Calculate Total Height
Calculate number of layers needed:
Number of Layers = Round(Quantity / Qty. per Layer, 1, '>')(Rounded up to nearest integer)
Calculate total height:
ThisHeight = Number of Layers × CarrierTypeUOM.Height
Step 5: Add Interleave Handling Unit Height (if applicable)
If interleave handling units are needed (InclInterleaveCarrier = true AND condition indicates interleave):
- Add handling unit type height to total height:
ThisHeight = ThisHeight + CarrierType.Height
Step 6: Get Maximum Height
Determine maximum allowed height:
- If maximum height from conditions (
MaxHeight) > 0:- Use
MaxHeightfrom conditions
- Use
- Else:
- Use
CarrierType.Pick Max. Load Height
- Use
Step 7: Calculate Result
Result = ThisHeight / MaxHeight / StackingFactor
Mermaid Flowchart
flowchart TD
Start([Start Calculation]) --> CheckDetailLines{DETAIL LINES<br/>parameter = true?}
CheckDetailLines -->|Yes| HasDetailLines{Detail lines<br/>exist?}
CheckDetailLines -->|No| GetParams[Get Calculation Parameters]
HasDetailLines -->|Yes| CountCarriers[Count Unique Handling Units<br/>from Detail Lines]
HasDetailLines -->|No| GetParams
CountCarriers --> ReturnDetail[Return Handling Unit Count]
ReturnDetail --> End([End])
GetParams --> GetStackingFactor[Get Stacking Factor<br/>from STACKING FACTOR COND]
GetStackingFactor --> CheckStackingFactor{Stacking Factor<br/>= 0?}
CheckStackingFactor -->|Yes| SetStackingFactor1[Set Stacking Factor = 1]
CheckStackingFactor -->|No| CalcLayers
SetStackingFactor1 --> CalcLayers[Calculate Number of Layers<br/>Round Quantity / Qty. per Layer UP]
CalcLayers --> CalcHeight[Calculate Total Height<br/>ThisHeight = Layers × Height]
CalcHeight --> CheckInterleave{Interleave Handling Units<br/>needed?}
CheckInterleave -->|Yes| AddInterleaveHeight[Add Handling Unit Type Height<br/>ThisHeight += CarrierType.Height]
CheckInterleave -->|No| GetMaxHeight
AddInterleaveHeight --> GetMaxHeight{Max Height from<br/>Conditions > 0?}
GetMaxHeight -->|Yes| UseConditionMaxHeight[Use MaxHeight from Conditions]
GetMaxHeight -->|No| UseCarrierMaxHeight[Use CarrierType.Pick Max. Load Height]
UseConditionMaxHeight --> CalculateResult
UseCarrierMaxHeight --> CalculateResult[Calculate Result<br/>Result = ThisHeight / MaxHeight / StackingFactor]
CalculateResult --> End
Calculation Steps
Variable Definitions
- A = Number of layers (rounded up)
- B = Total height (ThisHeight)
- C = Maximum allowed height (MaxHeight)
- D = Stacking factor
- E = Final result (number of handling units)
Step-by-Step Formula
Calculate layers:
A = Round(Quantity / CarrierTypeUOM."Qty. per Layer", 1, '>')Calculate base height:
B = A × CarrierTypeUOM.HeightAdd interleave height (if applicable):
B = B + CarrierType.HeightDetermine maximum height:
C = Max(MaxHeight from Conditions, CarrierType."Pick Max. Load Height")Apply stacking factor:
D = StackingFactor (from condition or default = 1)Calculate final result:
E = B / C / D
Examples
Example 1: Basic Height Calculation
Scenario:
Quantity= 150 piecesCarrierTypeUOM."Qty. per Layer"= 10 piecesCarrierTypeUOM.Height= 0.20 m per layerCarrierType."Pick Max. Load Height"= 1.60 m- No interleave handling units
- Stacking factor = 1
Calculation:
- Number of layers: A = Round(150 / 10, 1, '>') = 15 layers
- Total height: B = 15 × 0.20 = 3.00 m
- Maximum height: C = 1.60 m
- Result: E = 3.00 / 1.60 / 1 = 1.875 handling units
Result: 1.875 handling units (typically rounded to 2 handling units in practice)
Example 2: With Interleave Handling Units
Scenario:
Quantity= 200 piecesCarrierTypeUOM."Qty. per Layer"= 20 piecesCarrierTypeUOM.Height= 0.15 m per layerCarrierType.Height= 0.15 m (interleave pallet height)CarrierType."Pick Max. Load Height"= 1.50 m- Interleave handling units enabled
- Stacking factor = 1
Calculation:
- Number of layers: A = Round(200 / 20, 1, '>') = 10 layers
- Base height: B = 10 × 0.15 = 1.50 m
- Add interleave: B = 1.50 + 0.15 = 1.65 m
- Maximum height: C = 1.50 m
- Result: E = 1.65 / 1.50 / 1 = 1.10 handling units
Result: 1.10 handling units
Example 3: With Stacking Factor
Scenario:
Quantity= 300 piecesCarrierTypeUOM."Qty. per Layer"= 25 piecesCarrierTypeUOM.Height= 0.18 m per layerCarrierType."Pick Max. Load Height"= 1.80 m- Stacking factor condition = 0.5 (allows double stacking)
Calculation:
- Number of layers: A = Round(300 / 25, 1, '>') = 12 layers
- Total height: B = 12 × 0.18 = 2.16 m
- Maximum height: C = 1.80 m
- Stacking factor: D = 0.5
- Result: E = 2.16 / 1.80 / 0.5 = 2.40 handling units
Result: 2.40 handling units