1.Functional Description
1.1Purpose
This function will accumulate the "actuals" for the forecast records.
1.2Setup Notes and Prerequisites
1.3Special Logic
2.Technical Specifications
1.If LastBucketPosition is equal to zero
Move LastDateForActuals to MMDDYY format
Call CalculateBucketPosition
Move BucketPosition to LastBucketPosition
End
Move RequestDate to MMDDYY format
Call CalculateBucketPosition
If the PntrToCustomers is zero
Create the LinkList for it
End
Lookup CustomerNumber in PntrToCustomer
If not found in list
Add the customer to the list
Create a PntrToActuals to associate with it
Else
Get the PntrToActuals associated with the customer to use
End
If BucketPosition is greater than zero
If PtrToActualValues is not equal to 0
If ClearList is equal to '1'
Initialize all nodes in the the list to zeros and set the NULL flags
to TRUE
End
Add ForecastQty and ForecastAmt to PntrToActualValues,BucketPosition
Set NULL flag off
End
If PtrToActualValues is equal to 0
Create a new linked list and add BucketPosition nodes to the list with zero
values and the NULL flag set to TRUE
End
End
2.Calculate Bucket Position
If MonthlyWeekly = blank
Move MM to BucketPosition
Subtract YearOffFirstDate from YY to get $Z
Multiply $Z by 12
Add $Z to BucketPosition
Else
Subtract YearOffFirstDate from YY to get $Z
Multiply $Z by 52
Look in the PntrToDates for the first date with a year equal to YY = Position1
Look for the date in the list that is greater than or equal to RequestDate = Position2
Add the difference between the two positions to $Z to get BucketPosition
End
^
D3401050 - Forecast Accumulate Actuals
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
idPtrToCustomers | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
jdRequestedDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
mnLastBucketPosition | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnYearOffFirstDate | YR | MATH_NUMERIC | NONE | NONE |
The calendar year for this calendar. | ||||
mnForecastQuantity | QTY | MATH_NUMERIC | NONE | NONE |
The number of units associated with an asset. | ||||
mnForecastAmount | FAM | MATH_NUMERIC | NONE | NONE |
The current amount of the forecasted units for a planning period. | ||||
cMonthlyVsWeekly | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
idPointerToDates | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
cClearList | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnCustomerNumber | 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
| ||||
jdLastDateForActuals | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. |
None |
None |