Share via


Codeunit "Order Planning Mgt."

ID 5522
Namespace: Microsoft.Inventory.Requisition

Methods

GetOrdersToPlan

procedure GetOrdersToPlan(var ReqLine: Record "Requisition Line")

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

PlanSpecificSalesOrder

procedure PlanSpecificSalesOrder(var ReqLine: Record "Requisition Line", SalesOrderNo: Code[20])

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
SalesOrderNo Code[20]

PlanSpecificJob

procedure PlanSpecificJob(var ReqLine: Record "Requisition Line", JobNo: Code[20])

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
JobNo Code[20]

SetTaskFilterOnReqLine

procedure SetTaskFilterOnReqLine(var ReqLine: Record "Requisition Line", DemandLineNoFilter: Text)

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
DemandLineNoFilter Text

PrepareRequisitionRecord

procedure PrepareRequisitionRecord(var RequisitionLine: Record "Requisition Line")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"

DeleteLine

procedure DeleteLine(): Boolean

Returns

Type Description
Boolean

CalcNeededQty

procedure CalcNeededQty(AvailableQty: Decimal, DemandQty: Decimal): Decimal

Parameters

Name Type Description
AvailableQty Decimal
DemandQty Decimal

Returns

Type Description
Decimal

CalcATPQty

procedure CalcATPQty(ItemNo: Text[250], VariantFilter: Text[250], LocationFilter: Text[250], DemandDate: Date): Decimal

Parameters

Name Type Description
ItemNo Text[250]
VariantFilter Text[250]
LocationFilter Text[250]
DemandDate Date

Returns

Type Description
Decimal

CalcATPEarliestDate

procedure CalcATPEarliestDate(ItemNo: Text[250], VariantFilter: Text[250], LocationFilter: Text[250], DemandDate: Date, Quantity: Decimal): Date

Parameters

Name Type Description
ItemNo Text[250]
VariantFilter Text[250]
LocationFilter Text[250]
DemandDate Date
Quantity Decimal

Returns

Type Description
Date

SetDemandType

procedure SetDemandType(NewDemandType: Enum "Demand Order Source Type")

Parameters

Name Type Description
NewDemandType Enum Microsoft.Inventory.Requisition."Demand Order Source Type"

SetSalesOrder

Obsolete

This element will become obsolete from version 25.0. Replaced by procedure SetDemandType()

[Obsolete(Replaced by procedure SetDemandType(),25.0)]
procedure SetSalesOrder()

SetProdOrder

Obsolete

This element will become obsolete from version 25.0. Replaced by procedure SetDemandType()

[Obsolete(Replaced by procedure SetDemandType(),25.0)]
procedure SetProdOrder()

SetServOrder

Obsolete

This element will become obsolete from version 25.0. Replaced by procedure SetDemandType()

[Obsolete(Replaced by procedure SetDemandType(),25.0)]
procedure SetServOrder()

SetJobOrder

Obsolete

This element will become obsolete from version 25.0. Replaced by procedure SetDemandType()

[Obsolete(Replaced by procedure SetDemandType(),25.0)]
procedure SetJobOrder()

SetAsmOrder

Obsolete

This element will become obsolete from version 25.0. Replaced by procedure SetDemandType()

[Obsolete(Replaced by procedure SetDemandType(),25.0)]
procedure SetAsmOrder()

InsertAltSupplySubstitution

procedure InsertAltSupplySubstitution(var ReqLine: Record "Requisition Line")

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

SubstitutionPossible

procedure SubstitutionPossible(ReqLine: Record "Requisition Line"): Boolean

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

Returns

Type Description
Boolean

InsertAltSupplyLocation

procedure InsertAltSupplyLocation(var ReqLine: Record "Requisition Line")

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

AvailQtyOnOtherLocations

procedure AvailQtyOnOtherLocations(ReqLine: Record "Requisition Line"): Decimal

Parameters

Name Type Description
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

Returns

Type Description
Decimal

Events

OnAfterTransformUnplannedDemandToRequisitionLines

[IntegrationEvent(False,False)]
local procedure OnAfterTransformUnplannedDemandToRequisitionLines(var RequisitionLine: Record "Requisition Line")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"

OnAvailQtyOnOtherLocationsOnAfterLocationSetFilters

[IntegrationEvent(False,False)]
local procedure OnAvailQtyOnOtherLocationsOnAfterLocationSetFilters(RequisitionLine: Record "Requisition Line", var Location: Record Location)

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"
Location Table Microsoft.Inventory.Location.Location

OnBeforeCalcNextLineNo

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcNextLineNo(var NextLineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
NextLineNo Integer
IsHandled Boolean

OnBeforeIncreaseReqLineNo

[IntegrationEvent(False,False)]
local procedure OnBeforeIncreaseReqLineNo(var UnplannedDemand: Record "Unplanned Demand", var ReqLine: Record "Requisition Line", var IsHandled: Boolean)

Parameters

Name Type Description
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
IsHandled Boolean

OnBeforeReqLineModify

Obsolete

This element will become obsolete from version 27.0. Moved to codeunit MfgOrderPlanningMgt

[Obsolete(Moved to codeunit MfgOrderPlanningMgt,27.0)]
[IntegrationEvent(False,False)]
local procedure OnBeforeReqLineModify(var RequisitionLine: Record "Requisition Line", RequisitionLine2: Record "Requisition Line", ProdOrderComponent: Record "Prod. Order Component")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"
RequisitionLine2 Table Microsoft.Inventory.Requisition."Requisition Line"
ProdOrderComponent Table Microsoft.Manufacturing.Document."Prod. Order Component"

OnBeforeRunGetUnplannedDemand

[IntegrationEvent(False,False)]
local procedure OnBeforeRunGetUnplannedDemand(var UnplannedDemand: Record "Unplanned Demand", var IsHandled: Boolean)

Parameters

Name Type Description
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"
IsHandled Boolean

OnCalcATPQtyOnBeforeCalcQtyAvailabletoPromise

[IntegrationEvent(False,False)]
local procedure OnCalcATPQtyOnBeforeCalcQtyAvailabletoPromise(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

OnInsertAltSupplyLocationOnBeforeTempReqLineInsert

[IntegrationEvent(False,False)]
local procedure OnInsertAltSupplyLocationOnBeforeTempReqLineInsert(var RequisitionLine: Record "Requisition Line")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"

OnInsertDemandHeaderOnAfterReqLineInsert

[IntegrationEvent(False,False)]
local procedure OnInsertDemandHeaderOnAfterReqLineInsert(UnplannedDemand: Record "Unplanned Demand", var ReqLine: Record "Requisition Line")

Parameters

Name Type Description
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

OnInsertDemandHeaderOnBeforeReqLineInsert

[IntegrationEvent(False,False)]
local procedure OnInsertDemandHeaderOnBeforeReqLineInsert(UnplannedDemand: Record "Unplanned Demand", var ReqLine: Record "Requisition Line")

Parameters

Name Type Description
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"

OnInsertDemandLinesOnAfterReqLineInsert

[IntegrationEvent(False,False)]
local procedure OnInsertDemandLinesOnAfterReqLineInsert(var RequisitionLine: Record "Requisition Line", var UnplannedDemand: Record "Unplanned Demand")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"

OnInsertDemandLinesOnBeforeReqLineInsert

[IntegrationEvent(False,False)]
local procedure OnInsertDemandLinesOnBeforeReqLineInsert(var RequisitionLine: Record "Requisition Line", var UnplannedDemand: Record "Unplanned Demand", var IsHandled: Boolean)

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"
IsHandled Boolean

OnPrepareRequisitionRecordOnBeforeDeleteAll

[IntegrationEvent(False,False)]
local procedure OnPrepareRequisitionRecordOnBeforeDeleteAll(var RequisitionLine: Record "Requisition Line")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"

OnInsertDemandLinesOnCopyItemTracking

[IntegrationEvent(False,False)]
local procedure OnInsertDemandLinesOnCopyItemTracking(var RequisitionLine: Record "Requisition Line", UnplannedDemand: Record "Unplanned Demand")

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"
UnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"

OnInsertDemandLinesOnBeforeFindUnplannedDemand

[IntegrationEvent(False,False)]
local procedure OnInsertDemandLinesOnBeforeFindUnplannedDemand(var TempUnplannedDemand: Record "Unplanned Demand" temporary, var RequisitionLine: Record "Requisition Line")

Parameters

Name Type Description
TempUnplannedDemand Table Microsoft.Inventory.Planning."Unplanned Demand"
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"

OnInsertAltSupplyLocationOnAfterSelectSubstitution

[IntegrationEvent(False,False)]
local procedure OnInsertAltSupplyLocationOnAfterSelectSubstitution(var RequisitionLine: Record "Requisition Line", var TempItemSub: Record "Item Substitution" temporary)

Parameters

Name Type Description
RequisitionLine Table Microsoft.Inventory.Requisition."Requisition Line"
TempItemSub Table Microsoft.Inventory.Item.Substitution."Item Substitution"

See also