Skip to content

KVSTRDDemandPlanningMgt#

Events#

KVSTRDOnAfterGetCalculatedForecastQuantity(Code[20], Code[10], Code[10], Enum KVSTRDProdFCEntrySalesType, Boolean, Boolean, Boolean, Date, Record Date, Decimal) :#

Summary: This integration event is triggered after calculating the forecast quantity.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterGetCalculatedForecastQuantity(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; SalesType: Enum "KVSTRDProdFCEntrySalesType"; IsComponentForecast: Boolean; UseLostSales: Boolean; UseHistoricalILEs: Boolean; UseHistoricalILEsUntil: Date; DateCalendar: Record "Date"; var ForecastQuantity: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDDemandPlanningMgt", 'KVSTRDOnAfterGetCalculatedForecastQuantity', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterGetCalculatedForecastQuantity(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; SalesType: Enum "KVSTRDProdFCEntrySalesType"; IsComponentForecast: Boolean; UseLostSales: Boolean; UseHistoricalILEs: Boolean; UseHistoricalILEsUntil: Date; DateCalendar: Record "Date"; var ForecastQuantity: Decimal)
begin
end;

Parameters:

  • ItemNo: Specifies the item number for which the forecast is being calculated.
  • VariantCode: Specifies the variant code of the item, if applicable.
  • LocationCode: Specifies the location code where the forecast is applied.
  • SalesType: Indicates the type of sales to consider for the forecast.
  • IsComponentForecast: Specifies whether the forecast is for components or sales items.
  • UseLostSales: Specifies if lost sales data should be included in the forecast calculation.
  • UseHistoricalILEs: Specifies whether historical item ledger entries should be used for the forecast.
  • UseHistoricalILEsUntil: The date until which historical item ledger entries are considered.
  • DateCalendar: Specifies the calendar to use for date-based calculations in the forecast.
  • ForecastQuantity: Returns the calculated forecast quantity based on the provided parameters.

KVSTRDOnAfterGetFiltersFromDemandPlanningParameter(Record KVSTRDDemandPlanningParameter, Text, Text, Text, Enum KVSTRDProdFCEntrySalesType, Text, Boolean, Boolean, Boolean, Date, Boolean) :#

Summary: This integration event is triggered after retrieving filters from the demand planning parameter. It allows subscribers to modify or extend the filters used in demand planning.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterGetFiltersFromDemandPlanningParameter(var DemandPlanningParameter: Record "KVSTRDDemandPlanningParameter"; var ItemFilterView: Text; var VariantFilter: Text; var LocationFilter: Text; var SalesType: Enum "KVSTRDProdFCEntrySalesType"; var SalesCodeFilter: Text; var IsComponentForecast: Boolean; var UseLostSales: Boolean; var UseHistoricalILEs: Boolean; var UseHistoricalILEsUntil: Date; var UseCalculationSchedules: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDDemandPlanningMgt", 'KVSTRDOnAfterGetFiltersFromDemandPlanningParameter', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterGetFiltersFromDemandPlanningParameter(var DemandPlanningParameter: Record "KVSTRDDemandPlanningParameter"; var ItemFilterView: Text; var VariantFilter: Text; var LocationFilter: Text; var SalesType: Enum "KVSTRDProdFCEntrySalesType"; var SalesCodeFilter: Text; var IsComponentForecast: Boolean; var UseLostSales: Boolean; var UseHistoricalILEs: Boolean; var UseHistoricalILEsUntil: Date; var UseCalculationSchedules: Boolean)
begin
end;

Parameters:

  • DemandPlanningParameter: The demand planning parameter record containing the initial filter values.
  • ItemFilterView: The item filter view as a text string.
  • VariantFilter: The variant filter as a text string.
  • LocationFilter: The location filter as a text string.
  • SalesType: The sales type as an enumeration.
  • SalesCodeFilter: The sales code filter as a text string.
  • IsComponentForecast: Specifies if the forecast is for components.
  • UseLostSales: Specifies if to include lost sales in the forecast.
  • UseHistoricalILEs: Specifies if to use historical item ledger entries.
  • UseHistoricalILEsUntil: The date until which historical item ledger entries are considered.
  • UseCalculationSchedules: Specifies if to use calculation schedules in the forecast.

KVSTRDOnBeforeInsertProductionForecastEntry(Record Production Forecast Entry, Record KVSTRDDemandPlanningLine) :#

Summary: This event is raised before inserting a new Production Forecast Entry record.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeInsertProductionForecastEntry(var ProductionForecastEntry: Record "Production Forecast Entry"; var DemandPlanningLine: Record "KVSTRDDemandPlanningLine"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDDemandPlanningMgt", 'KVSTRDOnBeforeInsertProductionForecastEntry', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeInsertProductionForecastEntry(var ProductionForecastEntry: Record "Production Forecast Entry"; var DemandPlanningLine: Record "KVSTRDDemandPlanningLine")
begin
end;

Parameters:

  • ProductionForecastEntry: The Production Forecast Entry record that is about to be inserted.
  • DemandPlanningLine: The Demand Planning Line record associated with the Production Forecast Entry.