KVSFCYCalcAvailabilityOverview#
Procedures#
OnRun#
procedure OnRun(Rec: Record "#437dbf0e84ff417a965ded2bb9650972#Availability Calc. Overview")
CalculateItem(Record Availability Calc. Overview) :#
Summary: Calculates the availability overview for a specific item over a defined time period. This procedure analyzes all relevant inventory, supply, and demand data for an item and creates a detailed overview of the availability situation. The procedure works with global item filters and considers location, variant, and date filters. It is central to availability planning and analysis in the KUMAVISION factory system.
procedure CalculateItem(var AvailabilityCalcOverview: Record "Availability Calc. Overview"):
Parameters:
AvailabilityCalcOverview: Availability calculation record with filter criteria and result data
CalculateDate(Record Availability Calc. Overview) :#
Summary: Calculates detailed availability information for a specific date and item combination. This procedure performs a focused analysis of supply and demand entries for a particular date, providing detailed breakdown of all transactions affecting item availability on that date. The procedure works at a detailed transaction level (Level 2-3) and provides granular insight into individual supply and demand transactions that affect availability on a specific date. It is typically called when users drill down into a specific date from the availability overview.
procedure CalculateDate(var AvailabilityCalcOverview: Record "Availability Calc. Overview"):
Parameters:
AvailabilityCalcOverview: Availability calculation record containing the target date and item context
EntriesExist(Record Availability Calc. Overview) : Boolean#
Summary: Determines whether any availability-relevant entries exist for a specific item. This function performs a quick check to verify if an item has any inventory, supply, or demand transactions that would affect its availability calculation, avoiding unnecessary processing for items with no relevant data. This function serves as an optimization filter in the availability calculation process, ensuring that only items with actual availability-affecting transactions are processed in detail, improving performance for large item datasets.
procedure EntriesExist(var AvailabilityCalcOverview: Record "Availability Calc. Overview"): Boolean
Parameters:
AvailabilityCalcOverview: Availability calculation context containing item and filter information
Returns: True if the item has any inventory, supply, or demand entries; false if no relevant entries exist
SetParam(Option, Code[20]) :#
Summary: Sets the demand filtering parameters for availability calculations. This procedure configures the global demand type and demand number filters that control which demand entries are included in the availability calculation and analysis. The demand type determines the category of demand (Sales, Production, Service, Job, Assembly) while the demand number allows filtering for a specific document within that demand type. This filtering mechanism enables focused availability analysis for specific business scenarios, such as analyzing availability impact of a particular sales order or production order.
procedure SetParam(NewDemandType: Option; NewDemandNo: Code[20]):
Parameters:
NewDemandType: The type of demand to filter by (Sales, Production, Service, Job, Assembly, or blank for all)NewDemandNo: The specific document number within the demand type to filter by (blank for all documents of the type)
Events#
OnAfterCalcRunningTotals(Record Item, Decimal, Decimal, Decimal, Decimal) :#
Summary: This event is triggered after calculating running totals for availability overview
[IntegrationEvent(false, false)]
local procedure OnAfterCalcRunningTotals(var Item: Record "Item"; var RunningTotal: Decimal; var InventoryRunningTotal: Decimal; var SupplyRunningTotal: Decimal; var DemandRunningTotal: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalcAvailabilityOverview", 'OnAfterCalcRunningTotals', '', false, false)]
local procedure DoSomethingOnAfterCalcRunningTotals(var Item: Record "Item"; var RunningTotal: Decimal; var InventoryRunningTotal: Decimal; var SupplyRunningTotal: Decimal; var DemandRunningTotal: Decimal)
begin
end;
Parameters:
Item: The item record with calculated totalsRunningTotal: The overall running total (inventory + supply + demand)InventoryRunningTotal: The running total for inventory quantitiesSupplyRunningTotal: The running total for supply quantitiesDemandRunningTotal: The running total for demand quantities
OnInsertEntryOnBeforeInsert(Record Availability Calc. Overview) :#
Summary: This event is triggered before inserting an availability calculation entry
[IntegrationEvent(false, false)]
local procedure OnInsertEntryOnBeforeInsert(var AvailabilityCalcOverview: Record "Availability Calc. Overview"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalcAvailabilityOverview", 'OnInsertEntryOnBeforeInsert', '', false, false)]
local procedure DoSomethingOnInsertEntryOnBeforeInsert(var AvailabilityCalcOverview: Record "Availability Calc. Overview")
begin
end;
Parameters:
AvailabilityCalcOverview: The availability calculation overview record to be inserted
OnUpdateRunningTotalsOnBeforeModify(Record Availability Calc. Overview) :#
Summary: This event is triggered before modifying an availability calculation entry during running totals update
[IntegrationEvent(false, false)]
local procedure OnUpdateRunningTotalsOnBeforeModify(var AvailabilityCalcOverview: Record "Availability Calc. Overview"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalcAvailabilityOverview", 'OnUpdateRunningTotalsOnBeforeModify', '', false, false)]
local procedure DoSomethingOnUpdateRunningTotalsOnBeforeModify(var AvailabilityCalcOverview: Record "Availability Calc. Overview")
begin
end;
Parameters:
AvailabilityCalcOverview: The availability calculation overview record to be modified with updated running totals