Codeunit "Calculate Planning Route Line"

ID 99000810
Namespace: Microsoft.Manufacturing.Planning

Properties

Name Value
Permissions TableData Item = r, TableData "Prod. Order Capacity Need" = rimd, TableData "Work Center" = r, TableData "Calendar Entry" = r, TableData "Machine Center" = r, TableData "Manufacturing Setup" = rm, TableData "Planning Routing Line" = rimd, TableData "Capacity Constrained Resource" = r

Methods

LoadCapForward

procedure LoadCapForward(CapType: Enum "Capacity Type", CapNo: Code[20], TimeType: Enum "Routing Time Type", Write: Boolean)

Parameters

Name Type Description
CapType Enum Microsoft.Manufacturing.Capacity."Capacity Type"
CapNo Code[20]
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
Write Boolean

CalcRoutingLineBack

procedure CalcRoutingLineBack(CalcStartEndDate: Boolean)

Parameters

Name Type Description
CalcStartEndDate Boolean

CalcRoutingLineForward

procedure CalcRoutingLineForward(CalcStartEndDate: Boolean)

Parameters

Name Type Description
CalcStartEndDate Boolean

CalculateRouteLine

procedure CalculateRouteLine(var PlanningRoutingLine2: Record "Planning Routing Line", Direction: Option, CalcStartEndDate: Boolean, ReqLine2: Record "Requisition Line")

Parameters

Name Type Description
PlanningRoutingLine2 Table Microsoft.Manufacturing.Routing."Planning Routing Line"
Direction Option
CalcStartEndDate Boolean
ReqLine2 Table Microsoft.Inventory.Requisition."Requisition Line"

SetResiliencyOn

procedure SetResiliencyOn(WkshTemplName: Code[10], JnlBatchName: Code[10], ItemNo: Code[20])

Parameters

Name Type Description
WkshTemplName Code[10]
JnlBatchName Code[10]
ItemNo Code[20]

GetResiliencyError

procedure GetResiliencyError(var PlanningErrorLog: Record "Planning Error Log"): Boolean

Parameters

Name Type Description
PlanningErrorLog Table Microsoft.Inventory.Planning."Planning Error Log"

Returns

Type Description
Boolean

Events

OnAfterCalcRoutingLineBack

[IntegrationEvent(False,False)]
local procedure OnAfterCalcRoutingLineBack(PlanningRoutingLine: Record "Planning Routing Line", PlanningResiliency: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
PlanningResiliency Boolean

OnAfterCalcRoutingLineForward

[IntegrationEvent(False,False)]
local procedure OnAfterCalcRoutingLineForward(PlanningRoutingLine: Record "Planning Routing Line", PlanningResiliency: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
PlanningResiliency Boolean

OnAfterCreatePlanningCapNeed

[IntegrationEvent(False,False)]
local procedure OnAfterCreatePlanningCapNeed(var NextCapNeedLineNo: Integer, var PlanningRoutingLine: Record "Planning Routing Line", var ReqLine: Record "Requisition Line", NeedDate: Date, StartingTime: Time, EndingTime: Time, TimeType: Option, NeedQty: Decimal, ConCurrCap: Decimal, var CalendarEntry: Record "Calendar Entry", LotSize: Decimal, RemainNeedQty: Decimal, FirstInBatch: Boolean, Direction: Option)

Parameters

Name Type Description
NextCapNeedLineNo Integer
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
NeedDate Date
StartingTime Time
EndingTime Time
TimeType Option
NeedQty Decimal
ConCurrCap Decimal
CalendarEntry Table Microsoft.Manufacturing.Capacity."Calendar Entry"
LotSize Decimal
RemainNeedQty Decimal
FirstInBatch Boolean
Direction Option

OnBeforeCalcMoveTimeBack

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcMoveTimeBack(var PlanningRoutingLine: Record "Planning Routing Line", var WorkCenter: Record "Work Center", var ProdEndingDate: Date, var ProdEndingTime: Time, var ProdStartingDate: Date, var ProdStartingTime: Time, var UpdateDates: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
WorkCenter Table Microsoft.Manufacturing.WorkCenter."Work Center"
ProdEndingDate Date
ProdEndingTime Time
ProdStartingDate Date
ProdStartingTime Time
UpdateDates Boolean
IsHandled Boolean

OnBeforeCalcRoutingLineBack

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcRoutingLineBack(var PlanningRoutingLine: Record "Planning Routing Line", CalcStartEndDate: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
CalcStartEndDate Boolean

OnBeforeCalcRoutingLineForward

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcRoutingLineForward(var PlanningRoutingLine: Record "Planning Routing Line", WorkCenter: Record "Work Center", SendAheadLotSize: Decimal, MaxLotSize: Decimal, var TotalLotSize: Decimal, var RemainNeedQty: Decimal, var UpdateDates: Boolean, var FirstEntry: Boolean, var TempPlanningRoutingLine: Record "Planning Routing Line")

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
WorkCenter Table Microsoft.Manufacturing.WorkCenter."Work Center"
SendAheadLotSize Decimal
MaxLotSize Decimal
TotalLotSize Decimal
RemainNeedQty Decimal
UpdateDates Boolean
FirstEntry Boolean
TempPlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"

OnBeforeCalcWaitTimeBack

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcWaitTimeBack(var PlanningRoutingLine: Record "Planning Routing Line", var WorkCenter: Record "Work Center", var ProdEndingDate: Date, var ProdEndingTime: Time, var ProdStartingDate: Date, var ProdStartingTime: Time, var UpdateDates: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
WorkCenter Table Microsoft.Manufacturing.WorkCenter."Work Center"
ProdEndingDate Date
ProdEndingTime Time
ProdStartingDate Date
ProdStartingTime Time
UpdateDates Boolean
IsHandled Boolean

OnBeforeCalculateRouteLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateRouteLine(var PlanningRoutingLine: Record "Planning Routing Line", var CalcStartEndDate: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
CalcStartEndDate Boolean

OnBeforeLoadCapForward

[IntegrationEvent(False,False)]
local procedure OnBeforeLoadCapForward(var PlanningRoutingLine: Record "Planning Routing Line", TimeType: Enum "Routing Time Type", var ProdStartingDate: Date, var ProdStartingTime: Time, var IsHandled: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
ProdStartingDate Date
ProdStartingTime Time
IsHandled Boolean

OnBeforeSetLotSizesToMax

[IntegrationEvent(False,False)]
local procedure OnBeforeSetLotSizesToMax(var SendAheadLotSize: Decimal, var TotalLotSize: Decimal, MaxLotSize: Decimal, PlanningRoutingLine: Record "Planning Routing Line", var IsHandled: Boolean)

Parameters

Name Type Description
SendAheadLotSize Decimal
TotalLotSize Decimal
MaxLotSize Decimal
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
IsHandled Boolean

OnCreateLoadBackOnBeforeFirstCalculate

[IntegrationEvent(False,False)]
local procedure OnCreateLoadBackOnBeforeFirstCalculate(var PlanningRoutingLine: Record "Planning Routing Line", var IsHandled: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
IsHandled Boolean

OnCreatePlanningCapNeedOnAfterCalulateExpectedUnitCost

[IntegrationEvent(False,False)]
local procedure OnCreatePlanningCapNeedOnAfterCalulateExpectedUnitCost(var PlanningRoutingLine: Record "Planning Routing Line", TimeType: Enum "Routing Time Type", NeedQty: Decimal)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
NeedQty Decimal

OnBeforeCreatePlanningCapNeed

[IntegrationEvent(False,False)]
local procedure OnBeforeCreatePlanningCapNeed(var PlanningRoutingLine: Record "Planning Routing Line", TimeType: Enum "Routing Time Type", var NeedQty: Decimal)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
NeedQty Decimal

OnCalculateRoutingLineBackOnAfterCalcRemainNeedQtyForLotSize

[IntegrationEvent(False,False)]
local procedure OnCalculateRoutingLineBackOnAfterCalcRemainNeedQtyForLotSize(PlanningRoutingLine: Record "Planning Routing Line", var RemainNeedQty: Decimal)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
RemainNeedQty Decimal

OnCalcRoutingLineBackOnAfterCalcShouldCalcNextOperation

[IntegrationEvent(False,False)]
local procedure OnCalcRoutingLineBackOnAfterCalcShouldCalcNextOperation(PlanningRoutingLine: Record "Planning Routing Line", MaxLotSize: Decimal, var TotalLotSize: Decimal, var SendAheadLotSize: Decimal, var ShouldCalcNextOperation: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
MaxLotSize Decimal
TotalLotSize Decimal
SendAheadLotSize Decimal
ShouldCalcNextOperation Boolean

OnCalculateRoutingLineForwardOnAfterCalcRemainNeedQtyForLotSize

[IntegrationEvent(False,False)]
local procedure OnCalculateRoutingLineForwardOnAfterCalcRemainNeedQtyForLotSize(PlanningRoutingLine: Record "Planning Routing Line", var RemainNeedQty: Decimal)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
RemainNeedQty Decimal

OnBeforeGetConstrainedCapacity

[IntegrationEvent(False,False)]
local procedure OnBeforeGetConstrainedCapacity(CapType: Enum "Capacity Type", CapNo: Code[20], var ConstrainedCapacity: Record "Capacity Constrained Resource", var Result: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
CapType Enum Microsoft.Manufacturing.Capacity."Capacity Type"
CapNo Code[20]
ConstrainedCapacity Table Microsoft.Manufacturing.Capacity."Capacity Constrained Resource"
Result Boolean
IsHandled Boolean

OnBeforeFinitelyLoadCapBack

[IntegrationEvent(False,False)]
local procedure OnBeforeFinitelyLoadCapBack(TimeType: Enum "Routing Time Type", ConstrainedCapacity: Record "Capacity Constrained Resource", ResourceIsConstrained: Boolean, ParentWorkCenter: Record "Capacity Constrained Resource", ParentIsConstrained: Boolean, var ProdEndingTime: Time, var ProdEndingDate: Date, var ConCurrCap: Decimal, var PlanningRoutingLine: Record "Planning Routing Line", var CalendarEntry: Record "Calendar Entry", var RemainNeedQty: Decimal, var WorkCenter: Record "Work Center", var CurrentTimeFactor: Decimal, var CurrentRounding: Decimal, var CalculateRoutingLine: Codeunit "Calculate Routing Line", var ReqLine: Record "Requisition Line", var FirstInBatch: Boolean, var FirstEntry: Boolean, var NextCapNeedLineNo: Integer, var LotSize: Decimal, var PlanningResiliency: Boolean, var TempPlanningErrorLog: Record "Planning Error Log" temporary, var IsHandled: Boolean)

Parameters

Name Type Description
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
ConstrainedCapacity Table Microsoft.Manufacturing.Capacity."Capacity Constrained Resource"
ResourceIsConstrained Boolean
ParentWorkCenter Table Microsoft.Manufacturing.Capacity."Capacity Constrained Resource"
ParentIsConstrained Boolean
ProdEndingTime Time
ProdEndingDate Date
ConCurrCap Decimal
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
CalendarEntry Table Microsoft.Manufacturing.Capacity."Calendar Entry"
RemainNeedQty Decimal
WorkCenter Table Microsoft.Manufacturing.WorkCenter."Work Center"
CurrentTimeFactor Decimal
CurrentRounding Decimal
CalculateRoutingLine Codeunit Microsoft.Manufacturing.Routing."Calculate Routing Line"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
FirstInBatch Boolean
FirstEntry Boolean
NextCapNeedLineNo Integer
LotSize Decimal
PlanningResiliency Boolean
TempPlanningErrorLog Table Microsoft.Inventory.Planning."Planning Error Log"
IsHandled Boolean

OnBeforeLoadCapBack

[IntegrationEvent(False,False)]
local procedure OnBeforeLoadCapBack(var PlanningRoutingLine: Record "Planning Routing Line", TimeType: Enum "Routing Time Type", var ProdStartingDate: Date, var ProdStartingTime: Time, var IsHandled: Boolean)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
ProdStartingDate Date
ProdStartingTime Time
IsHandled Boolean

OnBeforeFinitelyLoadCapForward

[IntegrationEvent(False,False)]
local procedure OnBeforeFinitelyLoadCapForward(var PlanningRoutingLine: Record "Planning Routing Line", TimeType: Enum "Routing Time Type", var ProdStartingDate: Date, var ProdStartingTime: Time, var IsHandled: Boolean, ConstrainedCapacity: Record "Capacity Constrained Resource", ResourceIsConstrained: Boolean, ParentWorkCenter: Record "Capacity Constrained Resource", ParentIsConstrained: Boolean, var ProdEndingTime: Time, var ProdEndingDate: Date, var ConCurrCap: Decimal, var CalendarEntry: Record "Calendar Entry", var RemainNeedQty: Decimal, var WorkCenter: Record "Work Center", var CurrentTimeFactor: Decimal, var CurrentRounding: Decimal, var CalculateRoutingLine: Codeunit "Calculate Routing Line", var ReqLine: Record "Requisition Line", var FirstInBatch: Boolean, var FirstEntry: Boolean, var NextCapNeedLineNo: Integer, var LotSize: Decimal, var PlanningResiliency: Boolean, var TempPlanningErrorLog: Record "Planning Error Log" temporary)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
TimeType Enum Microsoft.Manufacturing.Routing."Routing Time Type"
ProdStartingDate Date
ProdStartingTime Time
IsHandled Boolean
ConstrainedCapacity Table Microsoft.Manufacturing.Capacity."Capacity Constrained Resource"
ResourceIsConstrained Boolean
ParentWorkCenter Table Microsoft.Manufacturing.Capacity."Capacity Constrained Resource"
ParentIsConstrained Boolean
ProdEndingTime Time
ProdEndingDate Date
ConCurrCap Decimal
CalendarEntry Table Microsoft.Manufacturing.Capacity."Calendar Entry"
RemainNeedQty Decimal
WorkCenter Table Microsoft.Manufacturing.WorkCenter."Work Center"
CurrentTimeFactor Decimal
CurrentRounding Decimal
CalculateRoutingLine Codeunit Microsoft.Manufacturing.Routing."Calculate Routing Line"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
FirstInBatch Boolean
FirstEntry Boolean
NextCapNeedLineNo Integer
LotSize Decimal
PlanningResiliency Boolean
TempPlanningErrorLog Table Microsoft.Inventory.Planning."Planning Error Log"

OnCreatingLoadForwardOnAfterUpdateRemainNeedQtyBase

[IntegrationEvent(False,False)]
local procedure OnCreatingLoadForwardOnAfterUpdateRemainNeedQtyBase(PlanningRoutingLine: Record "Planning Routing Line", CalendarEntry: Record "Calendar Entry", var EndingTime: Time)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
CalendarEntry Table Microsoft.Manufacturing.Capacity."Calendar Entry"
EndingTime Time

OnCreatingLoadBackOnAfterUpdateRemainNeedQtyBase

[IntegrationEvent(False,False)]
local procedure OnCreatingLoadBackOnAfterUpdateRemainNeedQtyBase(PlanningRoutingLine: Record "Planning Routing Line", CalendarEntry: Record "Calendar Entry", var StartingTime: Time)

Parameters

Name Type Description
PlanningRoutingLine Table Microsoft.Manufacturing.Routing."Planning Routing Line"
CalendarEntry Table Microsoft.Manufacturing.Capacity."Calendar Entry"
StartingTime Time

See also