Table of Contents

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:

  1. Determining the total height needed for all items
  2. Accounting for interleave handling units (if applicable)
  3. Dividing by the maximum handling unit height
  4. 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

  1. Get stacking factor condition code from STACKING FACTOR COND parameter
  2. If condition code is provided:
    • Retrieve stacking factor value from conditions
    • If stacking factor = 0, set to 1
  3. If no condition code or value = 0:
    • Set stacking factor = 1

Step 4: Calculate Total Height

  1. Calculate number of layers needed:

    Number of Layers = Round(Quantity / Qty. per Layer, 1, '>')
    

    (Rounded up to nearest integer)

  2. 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 MaxHeight from conditions
  • Else:
    • Use CarrierType.Pick Max. Load Height

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

  1. Calculate layers:

    A = Round(Quantity / CarrierTypeUOM."Qty. per Layer", 1, '>')
    
  2. Calculate base height:

    B = A × CarrierTypeUOM.Height
    
  3. Add interleave height (if applicable):

    B = B + CarrierType.Height
    
  4. Determine maximum height:

    C = Max(MaxHeight from Conditions, CarrierType."Pick Max. Load Height")
    
  5. Apply stacking factor:

    D = StackingFactor (from condition or default = 1)
    
  6. Calculate final result:

    E = B / C / D
    

Examples

Example 1: Basic Height Calculation

Scenario:

  • Quantity = 150 pieces
  • CarrierTypeUOM."Qty. per Layer" = 10 pieces
  • CarrierTypeUOM.Height = 0.20 m per layer
  • CarrierType."Pick Max. Load Height" = 1.60 m
  • No interleave handling units
  • Stacking factor = 1

Calculation:

  1. Number of layers: A = Round(150 / 10, 1, '>') = 15 layers
  2. Total height: B = 15 × 0.20 = 3.00 m
  3. Maximum height: C = 1.60 m
  4. 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 pieces
  • CarrierTypeUOM."Qty. per Layer" = 20 pieces
  • CarrierTypeUOM.Height = 0.15 m per layer
  • CarrierType.Height = 0.15 m (interleave pallet height)
  • CarrierType."Pick Max. Load Height" = 1.50 m
  • Interleave handling units enabled
  • Stacking factor = 1

Calculation:

  1. Number of layers: A = Round(200 / 20, 1, '>') = 10 layers
  2. Base height: B = 10 × 0.15 = 1.50 m
  3. Add interleave: B = 1.50 + 0.15 = 1.65 m
  4. Maximum height: C = 1.50 m
  5. Result: E = 1.65 / 1.50 / 1 = 1.10 handling units

Result: 1.10 handling units

Example 3: With Stacking Factor

Scenario:

  • Quantity = 300 pieces
  • CarrierTypeUOM."Qty. per Layer" = 25 pieces
  • CarrierTypeUOM.Height = 0.18 m per layer
  • CarrierType."Pick Max. Load Height" = 1.80 m
  • Stacking factor condition = 0.5 (allows double stacking)

Calculation:

  1. Number of layers: A = Round(300 / 25, 1, '>') = 12 layers
  2. Total height: B = 12 × 0.18 = 2.16 m
  3. Maximum height: C = 1.80 m
  4. Stacking factor: D = 0.5
  5. Result: E = 2.16 / 1.80 / 0.5 = 2.40 handling units

Result: 2.40 handling units