8
Today I had a discussion with Andrei Panko regarding the Planning Parameters for a trade company which is using Locations but no SKU's. It seems that in Code when using Lot-for-Lot the Minimum Order Quantity, Maximum Order Quantity are set to zero, which is derscribed in the documentation found at:
 
https://docs.microsoft.com/en-us/dynamics365/business-central/production-planning-with-without-locations#demand-at-blank-location
 
For complex manufacturing scenario's this is not an issue but very hard to explain to SMB Trade customers not using an SKU. Behaviour is when an demand exist of 100 pcs, and the minimum order quantity = 150 pcs the requisition worksheet and planning worksheet (MPS) result into 100 pcs sugested while this must be 150 pcs. With this code is does suggest 150 pcs.
 
Here my shared code for a simple solution to force the planning to use the planning parameters when no SKU exist.
 
I used a new field at the location table to default for Microsoft standard solution and when switched on apply the below code. Improvements are always welcome:-)
 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Planning-Get Parameters", 'OnAfterAtSKU', '', true, false)] local procedure OnAfterAtSKU(var SKU: Record "Stockkeeping Unit"; var GlobalSKU: Record "Stockkeeping Unit"); var         SKU2: Record "Stockkeeping Unit"; begin         SKU2.SetRange(SKU2."Item No.", SKU."Item No.");         SKU2.SetRange(SKU2."Variant Code", SKU."Variant Code");         SKU2.SetRange(SKU2."Location Code", SKU."Location Code"); if SKU2.IsEmpty() then if GetLocation(SKU."Location Code") then begin                 GetItem(SKU."Item No."); if (Item."Reordering Policy" = Item."Reordering Policy"::"Lot-for-Lot") then begin                     SKU."Minimum Order Quantity" := Item."Minimum Order Quantity";                     SKU."Maximum Order Quantity" := Item."Maximum Order Quantity";                     SKU."Safety Stock Quantity" := Item."Safety Stock Quantity";                     SKU."Order Multiple" := Item."Order Multiple";                     SKU."Overflow Level" := Item."Overflow Level";                     GlobalSKU."Minimum Order Quantity" := Item."Minimum Order Quantity";                     GlobalSKU."Maximum Order Quantity" := Item."Maximum Order Quantity";                     GlobalSKU."Safety Stock Quantity" := Item."Safety Stock Quantity";                     GlobalSKU."Order Multiple" := Item."Order Multiple";                     GlobalSKU."Overflow Level" := Item."Overflow Level"; end; end; end; local procedure GetItem(ItemNo: Code[20]) begin if Item."No." <> ItemNo then             Item.Get(ItemNo); end; local procedure GetLocation(LocationCode: Code[10]) Found: boolean begin if (LocationCode = '') then begin             Found := false; exit; end;         Found := true; if (Location.Code <> LocationCode) and (LocationCode <> '') then             Location.Get(LocationCode); end;
 
Happy sharing code to improve BC
Category: Purchasing
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team

Comments

R

I think that even in a manufacturing environment (not too complex agreed) I would like to be able to work without SKU's in case I have multiple locations. I know that many consultants don't even know that the planning parameters are neglected and Lot-for- lot system is used if no SKU exists. If you only use one warehouse you put it in the manufacturing setup, but if you have more then one you are almost forced to use SKU's, which means a lot extra master data management.

It would make a lot of sense to change the current standard logic into: If the SKU is not there, use the Item card info....

Category: Purchasing