With BC we can create item variants and define different production BOMs at stockkeeping level.
But the calculation of the items low level code doesn't consider these BOMs.
So if a I have a component that is used on in one of these BOMs his low level code is 0.
If I take a look in codeunit 3687 "Low-Level Code Calculator" I see:
local procedure PopulateBOMTree(BOMStructure: Codeunit "BOM Tree")
begin
// Set nodes on the tree
PopulateFromItemAndRelatedBOMs(BOMStructure);
PopulateFromProductionBOMAndLines(BOMStructure);
PopulateFromBOMComponents(BOMStructure);
end;
These type of BOMs aren't considered in the low level code calculation.
If I take a look to the SKU table i see:
field(99000751; "Production BOM No."; Code[20])
{
Caption = 'Production BOM No.';
DataClassification = CustomerContent;
TableRelation = "Production BOM Header";
trigger OnValidate()
var
Item: Record Item;
ItemUnitOfMeasure: Record "Item Unit of Measure";
MfgSetup: Record "Manufacturing Setup";
ProdBOMHeader: Record "Production BOM Header";
CalculateLowLevelCode: Codeunit "Calculate Low-Level Code";
begin
if ("Production BOM No." <> '') and ("Production BOM No." <> xRec."Production BOM No.") then begin
ProdBOMHeader.Get("Production BOM No.");
ItemUnitOfMeasure.Get("Item No.", ProdBOMHeader."Unit of Measure Code");
if ProdBOMHeader.Status = ProdBOMHeader.Status::Certified then begin
MfgSetup.Get();
Item.Get("Item No.");
if MfgSetup."Dynamic Low-Level Code" then begin
Item."Low-Level Code" := CalculateLowLevelCode.CalcLevels(1, Item."No.", 0, 0);
CalculateLowLevelCode.SetRecursiveLevelsOnBOM(ProdBOMHeader, Item."Low-Level Code" + 1, false);
end;
end;
end;
end;
}
This trigger calculates the right low level code for the components, but only if the dynamic low level code calculation is active.
can we extend the low level code calculation to these BOMs?
