Table of Contents

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:

  1. Calculating the number of full handling units based on Qty. per UOM Code
  2. Determining the remaining quantity after full handling units
  3. Calculating additional handling units needed for the remaining quantity using order pick handling unit types
  4. 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:

  1. If USE_SHIP_CT parameter is enabled:

    • Get first shipment handling unit type from conditions
    • Go to Step 2 if found
  2. Use DocumentLine."Handling Unit Type Code" if available

    • Go to Step 2 if found
  3. 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
  4. 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 CarrierTypeUOM for 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):

  1. 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
  2. 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
  3. 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

  1. Calculate full handling units:

    A = Quantity div CarrierTypeUOM."Qty. per UOM Code"
    
  2. Calculate remaining quantity:

    B = Quantity mod CarrierTypeUOM."Qty. per UOM Code"
    
  3. If B > 0, calculate pick handling units:

    C = Round(B / OrderpickCarrierTypeUOM."Qty. per UOM Code", 0.001, '>')
    
  4. Calculate final result:

    D = A + C
    

Examples

Example 1: Exact Full Handling Units

Scenario:

  • Quantity = 100 pieces
  • CarrierTypeUOM."Qty. per UOM Code" = 50 pieces per handling unit
  • No remaining quantity

Calculation:

  1. Full handling units: A = 100 div 50 = 2 handling units
  2. Remaining quantity: B = 100 mod 50 = 0 pieces
  3. Pick handling units: C = 0 (no remainder)
  4. Result: D = 2 + 0 = 2 handling units

Result: 2 handling units

Example 2: Full Handling Units with Partial Handling Unit

Scenario:

  • Quantity = 175 pieces
  • CarrierTypeUOM."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:

  1. Full handling units: A = 175 div 50 = 3 handling units (150 pieces)
  2. Remaining quantity: B = 175 mod 50 = 25 pieces
  3. Pick handling units: C = Round(25 / 30, 0.001, '>') = 0.834 handling units
  4. 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_CT parameter = true
  • Condition provides shipment handling unit type = "EUR-PALLET"
  • Quantity = 240 pieces
  • CarrierTypeUOM."Qty. per UOM Code" = 60 pieces per EUR pallet

Calculation:

  1. Handling Unit type determined from conditions: "EUR-PALLET"
  2. Full handling units: A = 240 div 60 = 4 handling units
  3. Remaining quantity: B = 240 mod 60 = 0 pieces
  4. Result: D = 4 handling units

Result: 4 handling units

Example 4: Multiple Partial Handling Units Needed

Scenario:

  • Quantity = 87 pieces
  • CarrierTypeUOM."Qty. per UOM Code" = 50 pieces per handling unit
  • OrderpickCarrierTypeUOM."Qty. per UOM Code" = 20 pieces per handling unit

Calculation:

  1. Full handling units: A = 87 div 50 = 1 handling unit (50 pieces)
  2. Remaining quantity: B = 87 mod 50 = 37 pieces
  3. Pick handling units: C = Round(37 / 20, 0.001, '>') = 1.85 handling units
  4. 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 code
  • fullcarriers = Number of full handling units (A)
  • fullcarriertypeqty = Quantity in full handling units (A × Qty. per UOM Code)
  • pickcarriertype = Pick handling unit type code
  • pickcarriers = Number of pick handling units (C)
  • pickcarriertypeqty = Quantity in pick handling units (B)
  • pickcarriertypeqtyper = Pick handling unit capacity