Skip to content

KVSFCYDemandOverview#

Procedures#

InitTempTable() :#

Summary: Initializes the temporary table with demand overview data based on current filter settings. This procedure calculates and populates the demand overview with availability data, applying user-defined filters and handling special job-related demand scenarios. Performs the core calculation when the Calculate button is pressed.

procedure InitTempTable(): 

SetRecFilters() :#

Summary: Resets and applies standard filters and sorting to the record set. This procedure configures the default view for the demand overview data, setting the appropriate sorting order and refreshing the page display. Used after data manipulation operations to restore the standard view.

procedure SetRecFilters(): 

Initialize(Date, Integer, Code[20], Code[20], Code[250]) :#

Summary: Initializes the demand overview page with specific parameters and filters. This procedure sets up the page with predefined values for date range, demand type, and various filters, enabling programmatic initialization from external sources. Automatically enables match criteria filtering for focused analysis.

procedure Initialize(NewStartDate: Date; NewDemandType: Integer; NewDemandNo: Code[20]; NewItemNo: Code[20]; NewLocationFilter: Code[250]): 

Parameters:

  • NewStartDate: The start date for the demand analysis period.
  • NewDemandType: The type of demand to analyze (Sales, Production, Jobs, etc.). Use the DemandType option values.
  • NewDemandNo: The specific demand document number to filter by. Can be empty for all demands of the specified type.
  • NewItemNo: The item number or filter pattern for items to include in the analysis.
  • NewLocationFilter: The location code or filter pattern for locations to include in the analysis.

SetCalculationParameter(Boolean) :#

Summary: Sets the calculation parameter to control demand overview calculation behavior. This procedure determines whether the demand overview should perform full calculation or operate in display-only mode. Used to optimize performance when only viewing previously calculated results.

procedure SetCalculationParameter(CalculateDemandParam: Boolean): 

Parameters:

  • CalculateDemandParam: True to enable full demand calculation; false to operate in display-only mode without recalculation.

Events#

OnBeforeLookupDemandNo(Record Availability Calc. Overview, Option, Boolean, Boolean) :#

Summary: Triggers before looking up demand number in demand overview.

[IntegrationEvent(false, false)]
local procedure OnBeforeLookupDemandNo(var AvailabilityCalcOverview: Record "Availability Calc. Overview"; DemandType: Option; var Result: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Page, Page::"KVSFCYDemandOverview", 'OnBeforeLookupDemandNo', '', false, false)]
local procedure DoSomethingOnBeforeLookupDemandNo(var AvailabilityCalcOverview: Record "Availability Calc. Overview"; DemandType: Option; var Result: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • AvailabilityCalcOverview: Availability calculation overview record
  • DemandType: Type of demand being looked up
  • Result: Lookup result to be returned
  • IsHandled: Flag indicating if the lookup was handled by extension