1.Functional Description
1.1Purpose
This function will create the detail forecast records for the methods chosen in the processing
options, based on the data calculated in the simulation business functions.
1.2Setup Notes and Prerequisites
1.3Special Logic
2.Technical Specifications
If MonthlyVsWeekly is not equal to '1'
Move 12 to BucketsInYr
Else
Move 52 to BucketsInYr
End
/*Load index of first forecast date in PointerToDates list*/
Look in the PointerToDates link list for the first date greater than or equal to BeginDate for
the first date to start writing actuals from. Save this index number in $Index
If ProgramID is equal to 'R34640'
/*Build the hierarchy array if the input pointer is zero*/
If PntrToHierarchy is equal to zero
Retrieve the Summary Constants record from F4091 using SummaryCode
Create an array, @H, containing 14 elements
If KFGLSM is equal to 'Y'
Move 'Y' to @H,1
End
If KFCOSM is equal to 'Y'
Move 'Y' to @H,2
End
If KFITSM is equal to 'Y'
Move 'Y' to @H,14
End
Move 11 to $I
If KFCSLV is not equal to blanks
Move KFCSLV to $I
Move 'C' to @H,($I + 2)
End
Do 40 times, once for each category code from F4091
If KFKCnn is not equal to 0
Move KFKCnn to $J
If $J is less than $I
Move $J to @H,($J + 2)
Else
Move $J to @H,($J + 3)
End
End
End Do
End
/*Using the hierarchy array and the input key values, blank out the last key and save the
new key*/
Will need a data structure, NewKey (NK$), to hold the following fields:
CO, KC01, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, AN8, ITM
Move the input keys into NK$
If NK$ITM is not equal to zero and @H,14 is equal to 'Y'
Move zero to NK$ITM
Else
Move 11 to $CSLV
Look for 'C' in the hierarchy array
If found
Move that index position to $CSLV
End
For $I = 13 down to 3
If @H,$I is not equal to blanks
If @H,$I is equal to 'C'
If NK$AN8 is not equal to zeros
Move zeros to NK$AN8
Exit the for loop
End
Else
Get the KCnn field in NK corresponding to $I
If NK$KCnn is not equal to blanks
Move blanks to NK$KCnn
Exit the for loop
End
End
End
End For
If a key hasn't been blanked out yet
If @H,2 is equal to 'Y'
Move blanks to NK$CO
End
End
End
If this is the last level in the hierarchy
Create a linked list to hold Item Number and Branch pairs from F34006.
Fetch all records from F34006 using the input SummaryCode, ActualType, and
ChildKey
For each record retrieved
Add a record to the linked list just created saving the Item Number
and Branch
End
End
End
*/ If called from the online simulation create a Link List to hold the calculated forecasts */
If ProgramID is equal to 'EP3461"
Create a DetailRecordList with the following fields
Date
Amount
Quantity
End
^
D3400890 - Forecast Calculate Method
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
cMethod | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
idTypeArray | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnNumberOfBuckets | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
jdBeginDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
jdEndDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
idPointerToDates | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnNumberOfPeriods | MATH04 | MATH_NUMERIC | NONE | NONE |
Event point for Math Numeric. | ||||
mnLastBucketPosition | MATH05 | MATH_NUMERIC | NONE | NONE |
Event point for Math Numeric. | ||||
idPtrToActualValues | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szSecondItemNumber | LITM | char | NONE | NONE |
A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to
| ||||
szThirdItemNumber | AITM | char | NONE | NONE |
The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item
| ||||
cBypassForce | BPFC | char | NONE | NONE |
A code that indicates whether to bypass the Forecast Forcing program (R34610). A Y indicates that the quantity and amount of a forecast
| ||||
szForecastType | TYPF | char | NONE | NONE |
A user defined code (34/DF) that indicates one of the following:
o The forecasting method used to calculate the numbers displayed about
| ||||
szActualType | TYPF | char | NONE | NONE |
A user defined code (34/DF) that indicates one of the following:
o The forecasting method used to calculate the numbers displayed about
| ||||
szProgramID | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
szSummaryCode | KVER | char | NONE | NONE |
A user defined code (40/KY) that indicates the type of summary forecast. | ||||
szCompany | CO | char | NONE | NONE |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
szCatCode1 | KV01 | char | NONE | NONE |
The first key postion of the forecasting hierarchy. The value in this field relates to the first level chosen in the forecasting constants. | ||||
szCatCode2 | KV02 | char | NONE | NONE |
The second key postion of the forecasting hierarchy. The value in this field relates to the second level chosen in the forecasting constants. | ||||
szCatCode3 | KV03 | char | NONE | NONE |
The third key postion of the forecasting hierarchy. The value in this field relates to the third level chosen in the forecasting constants. | ||||
szCatCode4 | KV04 | char | NONE | NONE |
The forth key postion of the forecasting hierarchy. The value in this field relates to the fourth level chosen in the forecasting constants. | ||||
szCatCode5 | KV05 | char | NONE | NONE |
The fifth key postion of the forecasting hierarchy. The value in this field relates to the fifth level chosen in the forecasting constants. | ||||
szCatCode6 | KV06 | char | NONE | NONE |
The sixth key postion of the forecasting hierarchy. The value in this field relates to the sixth level chosen in the forecasting constants. | ||||
szCatCode7 | KV07 | char | NONE | NONE |
The seventh key postion of the forecasting hierarchy. The value in this field relates to the seventh level chosen in the forecasting constants. | ||||
szCatCode8 | KV08 | char | NONE | NONE |
The eighth key postion of the forecasting hierarchy. The value in this field relates to the eighth level chosen in the forecasting constants. | ||||
szCatCode9 | KV09 | char | NONE | NONE |
The ninth key postion of the forecasting hierarchy. The value in this field relates to the ninth level chosen in the forecasting constants. | ||||
szCatCode10 | KV10 | char | NONE | NONE |
The tenth key postion of the forecasting hierarchy. The value in this field relates to the tenth level chosen in the forecasting constants. | ||||
mnAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
cMonthlyVsWeekly | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cForecastAmounts | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
idSummaryLinkList | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnPercentOverLastYear | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnCalcPercentNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnMoveAvgNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnLinearApproxNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnLSRNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnNumberMonthsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnFlexiblePercent | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnNumberWeightedPeriods | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight1PeriodPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight2PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight3PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight4PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight5PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight6PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight7PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight8PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight9PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight10PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight11PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnWeight12PeriodsPrior | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnLinearSmoothingNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnExponSmoothingNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnMethod11AlphaFactor | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
cSeasonality | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnMethod12AlphaFactor | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnMethod12BetaFactor | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
idPtrToHierarchy | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnChildKey | SFKE | MATH_NUMERIC | NONE | NONE |
Summary Forecast Key | ||||
szBranch | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
mn2ndDegreeApproxNoMonths | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
idPtrToExpoForecast | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
idDetailRecords | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
cDatePattern | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnMonthsBestFit | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
cMeanAbsoluteDeviation | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cWriteNegativeValues | EV06 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szTypeTransaction | TYTN | char | OPT | NONE |
The qualifier used to identify a specific type of transaction. |
B0000175 Get Next Transaction Number | ||||
B3400690 Forecast Retrieve Calculations | ||||
B3400775 Update Detail Forecast Records | ||||
B3400810 Forecast Calculate Dates | ||||
B3400820 F3460 Generate Actual Numbers | ||||
B3400880 Forecast Exponential Smoothing | ||||
B3400980 Forecast Release Actuals | ||||
B3401010 Forecast Calculate Best Fit | ||||
B3401050 Forecast Accumulate Actuals | ||||
B4001040 Get Item Master Description UOM | ||||
B9800100 Get Audit Information | ||||
B9800420 Get Data Dictionary Definition | ||||
N4700060 EDI Batch Number, Get Next Number |
F3002 Bill of Material Master File | ||||
F3400 Forecast Summary File | ||||
F34006 Forecast Summary Work File | ||||
F3460 Forecast File | ||||
F3460Z1 Forecast Unedited Transactions | ||||
F4091 Category Code Key Position File |