ReqForecastReduce.calcForecastQty Method [AX 2012]
Calculates a new forecast quantity for a requirement forecast line.
Syntax
public ReqQty calcForecastQty(
ForecastTableType _forecastType,
ReqTransCache _reqTransCache,
ReqTrans _reqTransForecast,
ReqSetupDim _setupDim)
Run On
Called
Parameters
- _forecastType
Type: ForecastTableType Enumeration
An enumeration value of type ForecastTableType that determines if the forecast reduction is regarding a demand forecast or a supply forecast.
- _reqTransCache
Type: ReqTransCache Class
An object of type ReqTransCache that contains cached master planning transactions.
- _reqTransForecast
Type: ReqTrans Table
A ReqTrans record of type forecast.
- _setupDim
Type: ReqSetupDim Class
A ReqSetupDim object that contains coverage settings for a specific item ID and inventory dimensions.
Return Value
Type: ReqQty Extended Data Type
A new eventual reduced forecast quantity which should be applied for the specified forecast line.
Exceptions
Exception | Condition |
---|---|
Error | If called with empty parameters. |
Remarks
This method must be called for each forecast line in a descending date order for a specific item and coverage dimensions. First time the method is called the reduction values are calculated and a balance might be stored.
The balance will eventual be reduced each time a forecast line is reduced. The balance is cleared when the Reset method is called.