Skip to content

KVSFCYCalculateBOMTree#

Procedures#

KVSFCYCalcOvhdCost(Record BOM Buffer) :#

Summary: Calculates overhead costs for BOM buffer items in the KUMAVISION factory cost calculation system. This procedure computes both single-level and rolled-up manufacturing overhead costs by applying indirect cost percentages and overhead rates to material, capacity, and subcontracting costs. It handles material overhead costs specific to KUMAVISION factory calculations and ensures proper cost allocation across BOM structures. The procedure considers lot sizes and unit of measure conversions to provide accurate overhead cost calculations for manufacturing scenarios.

procedure KVSFCYCalcOvhdCost(var BOMBufferVar: Record "BOM Buffer"): 

Parameters:

  • BOMBufferVar: BOM Buffer record passed by reference - will be updated with calculated overhead costs including material overhead and manufacturing overhead at both single-level and rolled-up levels

Events#

OnAfterFilterBOMBuffer(Record Item, Record BOM Buffer, Date, Option) :#

Summary: This event is triggered after filtering BOM buffer during tree generation

[IntegrationEvent(false, false)]
local procedure OnAfterFilterBOMBuffer(var ParentItem: Record "Item"; var BOMBuffer: Record "BOM Buffer"; DemandDate: Date; TreeType: Option): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnAfterFilterBOMBuffer', '', false, false)]
local procedure DoSomethingOnAfterFilterBOMBuffer(var ParentItem: Record "Item"; var BOMBuffer: Record "BOM Buffer"; DemandDate: Date; TreeType: Option)
begin
end;

Parameters:

  • ParentItem: The parent item record for which the BOM tree is being generated
  • BOMBuffer: The BOM buffer record containing the generated tree structure
  • DemandDate: The demand date for the BOM calculation
  • TreeType: The type of tree being generated (Availability, Cost, or blank)

OnAfterTransferFromProdItem(Record BOM Buffer, Record Production BOM Line) :#

Summary: This event is triggered after transferring data from production item to BOM buffer

[IntegrationEvent(false, false)]
local procedure OnAfterTransferFromProdItem(var BOMBuffer: Record "BOM Buffer"; ProdBOMLine: Record "Production BOM Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnAfterTransferFromProdItem', '', false, false)]
local procedure DoSomethingOnAfterTransferFromProdItem(var BOMBuffer: Record "BOM Buffer"; ProdBOMLine: Record "Production BOM Line")
begin
end;

Parameters:

  • BOMBuffer: The BOM buffer record that received the transferred data
  • ProdBOMLine: The production BOM line record used as the source for the transfer

OnAfterTransferFromProdBOM(Record BOM Buffer, Record Production BOM Line) :#

Summary: This event is triggered after transferring data from production BOM to BOM buffer

[IntegrationEvent(false, false)]
local procedure OnAfterTransferFromProdBOM(var BOMBuffer: Record "BOM Buffer"; ProdBOMLine: Record "Production BOM Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnAfterTransferFromProdBOM', '', false, false)]
local procedure DoSomethingOnAfterTransferFromProdBOM(var BOMBuffer: Record "BOM Buffer"; ProdBOMLine: Record "Production BOM Line")
begin
end;

Parameters:

  • BOMBuffer: The BOM buffer record that received the transferred data
  • ProdBOMLine: The production BOM line record used as the source for the transfer

OnAfterTransferFromProdRouting(Record BOM Buffer, Record Routing Line) :#

Summary: This event is triggered after transferring data from production routing to BOM buffer

[IntegrationEvent(false, false)]
local procedure OnAfterTransferFromProdRouting(var BOMBuffer: Record "BOM Buffer"; RoutingLine: Record "Routing Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnAfterTransferFromProdRouting', '', false, false)]
local procedure DoSomethingOnAfterTransferFromProdRouting(var BOMBuffer: Record "BOM Buffer"; RoutingLine: Record "Routing Line")
begin
end;

Parameters:

  • BOMBuffer: The BOM buffer record that received the transferred data
  • RoutingLine: The routing line record used as the source for the transfer

OnBeforeCalcRoutingLineCosts(Record Routing Line, Decimal, Decimal, Record Item) :#

Summary: This event is triggered before calculating routing line costs in BOM tree cost calculation

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcRoutingLineCosts(var RoutingLine: Record "Routing Line"; var LotSize: Decimal; var ScrapPct: Decimal; ParentItem: Record "Item"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnBeforeCalcRoutingLineCosts', '', false, false)]
local procedure DoSomethingOnBeforeCalcRoutingLineCosts(var RoutingLine: Record "Routing Line"; var LotSize: Decimal; var ScrapPct: Decimal; ParentItem: Record "Item")
begin
end;

Parameters:

  • RoutingLine: The routing line record for which costs will be calculated
  • LotSize: The lot size to be used in the cost calculation
  • ScrapPct: The scrap percentage to be applied in the cost calculation
  • ParentItem: The parent item record providing context for the cost calculation

OnBeforeFilterBOMBuffer(Record Item, Record BOM Buffer, Date, Option, Boolean) :#

Summary: This event is triggered before filtering BOM buffer during tree generation

[IntegrationEvent(false, false)]
local procedure OnBeforeFilterBOMBuffer(var ParentItem: Record "Item"; var BOMBuffer: Record "BOM Buffer"; DemandDate: Date; TreeType: Option; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnBeforeFilterBOMBuffer', '', false, false)]
local procedure DoSomethingOnBeforeFilterBOMBuffer(var ParentItem: Record "Item"; var BOMBuffer: Record "BOM Buffer"; DemandDate: Date; TreeType: Option; var IsHandled: Boolean)
begin
end;

Parameters:

  • ParentItem: The parent item record for which the BOM tree is being generated
  • BOMBuffer: The BOM buffer record that will contain the generated tree structure
  • DemandDate: The demand date for the BOM calculation
  • TreeType: The type of tree being generated (Availability, Cost, or blank)
  • IsHandled: Set to true to skip the default BOM buffer filtering logic

OnBeforeFilterByQuantityPer(Record Production BOM Line, Boolean) :#

Summary: This event is triggered before filtering production BOM lines by quantity per during tree generation

[IntegrationEvent(false, false)]
local procedure OnBeforeFilterByQuantityPer(var ProductionBOMLine: Record "Production BOM Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnBeforeFilterByQuantityPer', '', false, false)]
local procedure DoSomethingOnBeforeFilterByQuantityPer(var ProductionBOMLine: Record "Production BOM Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ProductionBOMLine: The production BOM line record to be filtered
  • IsHandled: Set to true to skip the default quantity per filtering logic

OnBeforeTransferFromProdBOM(Record BOM Buffer, Record Production BOM Line, Record Item, Record BOM Buffer, Integer, Option) :#

Summary: This event is triggered before transferring data from production BOM to BOM buffer

[IntegrationEvent(false, false)]
local procedure OnBeforeTransferFromProdBOM(var BOMBuffer: Record "BOM Buffer"; ProdBOMLine: Record "Production BOM Line"; var ParentItem: Record "Item"; var ParentBOMBuffer: Record "BOM Buffer"; var EntryNo: Integer; TreeType: Option): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnBeforeTransferFromProdBOM', '', false, false)]
local procedure DoSomethingOnBeforeTransferFromProdBOM(var BOMBuffer: Record "BOM Buffer"; ProdBOMLine: Record "Production BOM Line"; var ParentItem: Record "Item"; var ParentBOMBuffer: Record "BOM Buffer"; var EntryNo: Integer; TreeType: Option)
begin
end;

Parameters:

  • BOMBuffer: The BOM buffer record that will receive the transferred data
  • ProdBOMLine: The production BOM line record used as the source for the transfer
  • ParentItem: The parent item record providing context for the transfer
  • ParentBOMBuffer: The parent BOM buffer record in the tree hierarchy
  • EntryNo: The entry number for the BOM buffer record
  • TreeType: The type of tree being generated (blank, Availability, or Cost)

OnTraverseCostTreeOnAfterAddCost(Record BOM Buffer, Record BOM Buffer) :#

Summary: This event is triggered after adding costs during cost tree traversal in BOM tree cost calculation

[IntegrationEvent(false, false)]
local procedure OnTraverseCostTreeOnAfterAddCost(var ParentBOMBuffer: Record "BOM Buffer"; var BOMBuffer: Record "BOM Buffer"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculateBOMTree", 'OnTraverseCostTreeOnAfterAddCost', '', false, false)]
local procedure DoSomethingOnTraverseCostTreeOnAfterAddCost(var ParentBOMBuffer: Record "BOM Buffer"; var BOMBuffer: Record "BOM Buffer")
begin
end;

Parameters:

  • ParentBOMBuffer: The parent BOM buffer record that received the accumulated costs
  • BOMBuffer: The child BOM buffer record whose costs were added to the parent