1.Functional Description
1.1Purpose
This function will update either the Detail Forecast or the Summary Forecast records from the 54
period buckets passed in.
1.2Setup Notes and Prerequisites
1.3 Special Logic
2.Technical Specifications
1.Move the 54 Periods passed in to an array @P
2.Move the dates from PntrToDates to an array @D
3.Move 1 to X
If MonthlyVsWeekly is not equal to '1'
Move 14 to $Y
Else
Move 54 to $Y
End
Move BeginDate to PreviousDate
Do $Y times
If DetailRecord is not equal to '1'
Fetch the F3400 record with the keys passed in and the SGDRQJ between PreviousDate and @D,X
If the record was found
If AmountQuantity equals '1'
Move @P,X to SGFQT
Adjust SGFAM by the ratio between the original qty and amt
If SGRVIS equals '1' or '3'
Move a '3' to the Revision Flag
Else
Move a '2' to the Revision Flag
End
Else
Move @P,X toSGFAM
Adjust SGFQT by the ratio between the original qty and amt
If SGRVIS equals '2' or '3'
Move a '3' to the Revision Flag
Else
Move a '1' to the Revision Flag
End
End
Update the Audit Info
Update the F3400 record
Else
Move a '1' to Error Flag
Set an error on the Period field corresponding to @P,X
End
Else
Fetch to the F3460 record with the Item, Branch, Type, Address, and MFDRQJ between
PreviousDate and @D,X
If the record was found
If AmountQuantity equals '1'
Subtract MFFQT from @P,X to get SummaryQty
Move @P,X to MFFQT
Adjust MFFAM by the ratio between the original qty and amt
If MFRVIS equals '1' or '3'
Move a '3' to the Revision Flag
Else
Move a '2' to the Revision Flag
End
Else
Subtract MFFAM from @P,X to get SummaryAmt
Move @P,X toMFFAM
Adjust MFFQT by the ratio between the original qty and amt
If MFRVIS equals '2' or '3'
Move a '3' to the Revision Flag
Else
Move a '1' to the Revision Flag
End
End
Update the Audit Info
Update the F3460 record
Else
If @P,X is not blanks
If AmountQuantity equals '1'
Move @P,X to SummaryQty
Else
Move @P,X to SummaryAmt
End
Fetch to the Item Master F4101 by Short Item to retrieve the
Second and Third Item Numbers
Call WriteDetailForecastRecords B3400770
End
End
Fetch to the Item Master F4101 by Short Item to retrieve the Second and
Third Item Numbers
Move @D,X to PreviousDate
End
Add 1 to X
EndDo
^
D3400660 - Forecast Update Records
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szSummaryCode | KVER | char | NONE | NONE |
A user defined code (40/KY) that indicates the type of summary 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
| ||||
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
| ||||
szCategoryCode01 | 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. | ||||
szCategoryCode02 | 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. | ||||
szCategoryCode03 | 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. | ||||
szCategoryCode04 | 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. | ||||
szCategoryCode05 | 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. | ||||
szCategoryCode06 | 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. | ||||
szCategoryCode07 | 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. | ||||
szCategoryCode08 | 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. | ||||
szCategoryCode09 | 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. | ||||
szCategoryCode10 | 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. | ||||
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
| ||||
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
| ||||
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
| ||||
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
| ||||
cDetailRecord | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szPeriod1 | TQ01 | char | NONE | NONE |
Time Series Column 01. This column will hold Time Series Dates or Quantities. | ||||
szPeriod2 | TQ02 | char | NONE | NONE |
Time Series Column 02. This column will hold Time Series Dates or Quantities. | ||||
szPeriod3 | TQ03 | char | NONE | NONE |
Time Series Column 03. This column will hold Time Series Dates or Quantities. | ||||
szPeriod4 | TQ04 | char | NONE | NONE |
Time Series Column 04. This column will hold Time Series Dates or Quantities. | ||||
szPeriod5 | TQ05 | char | NONE | NONE |
Time Series Column 05. This column will hold Time Series Dates or Quantities. | ||||
szPeriod6 | TQ06 | char | NONE | NONE |
Time Series Column 06. This column will hold Time Series Dates or Quantities. | ||||
szPeriod7 | TQ07 | char | NONE | NONE |
Time Series Column 07. This column will hold Time Series Dates or Quantities. | ||||
szPeriod8 | TQ08 | char | NONE | NONE |
Time Series Column 08. This column will hold Time Series Dates or Quantities. | ||||
szPeriod9 | TQ09 | char | NONE | NONE |
Time Series Column 09. This column will hold Time Series Dates or Quantities. | ||||
szPeriod10 | TQ10 | char | NONE | NONE |
Time Series Column 10. This column will hold Time Series Dates or Quantities. | ||||
szPeriod11 | TQ11 | char | NONE | NONE |
Time Series Column 11. This column will hold Time Series Dates or Quantities. | ||||
szPeriod12 | TQ12 | char | NONE | NONE |
Time Series Column 12. This column will hold Time Series Dates or Quantities. | ||||
szPeriod13 | TQ13 | char | NONE | NONE |
Time Series Column 13. This column will hold Time Series Dates or Quantities. | ||||
szPeriod14 | TQ14 | char | NONE | NONE |
Time Series Column 14. This column will hold Time Series Dates or Quantities. | ||||
szPeriod15 | TQ15 | char | NONE | NONE |
Time Series Column 15. This column will hold Time Series Dates or Quantities. | ||||
szPeriod16 | TQ16 | char | NONE | NONE |
Time Series Column 16. This column will hold Time Series Dates or Quantities. | ||||
szPeriod17 | TQ17 | char | NONE | NONE |
Time Series Column 17. This column will hold Time Series Dates or Quantities. | ||||
szPeriod18 | TQ18 | char | NONE | NONE |
Time Series Column 18. This column will hold Time Series Dates or Quantities. | ||||
szPeriod19 | TQ19 | char | NONE | NONE |
Time Series Column 19. This column will hold Time Series Dates or Quantities. | ||||
szPeriod20 | TQ20 | char | NONE | NONE |
Time Series Column 20. This column will hold Time Series Dates or Quantities. | ||||
szPeriod21 | TQ21 | char | NONE | NONE |
Time Series Column 21. This column will hold Time Series Dates or Quantities. | ||||
szPeriod22 | TQ22 | char | NONE | NONE |
Time Series Column 22. This column will hold Time Series Dates or Quantities. | ||||
szPeriod23 | TQ23 | char | NONE | NONE |
Time Series Column 23. This column will hold Time Series Dates or Quantities. | ||||
szPeriod24 | TQ24 | char | NONE | NONE |
Time Series Column 24. This column will hold Time Series Dates or Quantities. | ||||
szPeriod25 | TQ25 | char | NONE | NONE |
Time Series Column 25. This column will hold Time Series Dates or Quantities. | ||||
szPeriod26 | TQ26 | char | NONE | NONE |
Time Series Column 26. This column will hold Time Series Dates or Quantities. | ||||
szPeriod27 | TQ27 | char | NONE | NONE |
Time Series Column 27. This column will hold Time Series Dates or Quantities. | ||||
szPeriod28 | TQ28 | char | NONE | NONE |
Time Series Column 28. This column will hold Time Series Dates or Quantities. | ||||
szPeriod29 | TQ29 | char | NONE | NONE |
Time Series Column 29. This column will hold Time Series Dates or Quantities. | ||||
szPeriod30 | TQ30 | char | NONE | NONE |
Time Series Column 30. This column will hold Time Series Dates or Quantities. | ||||
szPeriod31 | TQ31 | char | NONE | NONE |
Time Series Column 31. This column will hold Time Series Dates or Quantities. | ||||
szPeriod32 | TQ32 | char | NONE | NONE |
Time Series Column 32. This column will hold Time Series Dates or Quantities. | ||||
szPeriod33 | TQ33 | char | NONE | NONE |
Time Series Column 33. This column will hold Time Series Dates or Quantities. | ||||
szPeriod34 | TQ34 | char | NONE | NONE |
Time Series Column 34. This column will hold Time Series Dates or Quantities. | ||||
szPeriod35 | TQ35 | char | NONE | NONE |
Time Series Column 35. This column will hold Time Series Dates or Quantities. | ||||
szPeriod36 | TQ36 | char | NONE | NONE |
Time Series Column 36. This column will hold Time Series Dates or Quantities. | ||||
szPeriod37 | TQ37 | char | NONE | NONE |
Time Series Column 37. This column will hold Time Series Dates or Quantities. | ||||
szPeriod38 | TQ38 | char | NONE | NONE |
Time Series Column 38. This column will hold Time Series Dates or Quantities. | ||||
szPeriod39 | TQ39 | char | NONE | NONE |
Time Series Column 39. This column will hold Time Series Dates or Quantities. | ||||
szPeriod40 | TQ40 | char | NONE | NONE |
Time Series Column 40. This column will hold Time Series Dates or Quantities. | ||||
szPeriod41 | TQ41 | char | NONE | NONE |
Time Series Column 41. This column will hold Time Series Dates or Quantities. | ||||
szPeriod42 | TQ42 | char | NONE | NONE |
Time Series Column 42. This column will hold Time Series Dates or Quantities. | ||||
szPeriod43 | TQ43 | char | NONE | NONE |
Time Series Column 43. This column will hold Time Series Dates or Quantities. | ||||
szPeriod44 | TQ44 | char | NONE | NONE |
Time Series Column 44. This column will hold Time Series Dates or Quantities. | ||||
szPeriod45 | TQ45 | char | NONE | NONE |
Time Series Column 45. This column will hold Time Series Dates or Quantities. | ||||
szPeriod46 | TQ46 | char | NONE | NONE |
Time Series Column 46. This column will hold Time Series Dates or Quantities. | ||||
szPeriod47 | TQ47 | char | NONE | NONE |
Time Series Column 47. This column will hold Time Series Dates or Quantities. | ||||
szPeriod48 | TQ48 | char | NONE | NONE |
Time Series Column 48. This column will hold Time Series Dates or Quantities. | ||||
szPeriod49 | TQ49 | char | NONE | NONE |
Time Series Column 49. This column will hold Time Series Dates or Quantities. | ||||
szPeriod50 | TQ50 | char | NONE | NONE |
Time Series Column 50. This column will hold Time Series Dates or Quantities. | ||||
szPeriod51 | TQ51 | char | NONE | NONE |
Time Series Column 51. This column will hold Time Series Dates or Quantities. | ||||
szPeriod52 | TQ52 | char | NONE | NONE |
Time Series Column 52. This column will hold Time Series Dates or Quantities. | ||||
szPeriod53 | TQ53 | char | NONE | NONE |
Time Series Column 53. This column will hold Time Series Dates or Quantities. | ||||
szPeriod54 | TQ54 | char | NONE | NONE |
Time Series Column 54. This column will hold Time Series Dates or Quantities. | ||||
cAmountQuantity | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
idPtrToDates | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
cMonthlyVsWeekly | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cErrorFlag | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
jdBeginDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. |
B3400770 Write Detail Forecast Records | ||||
B9800100 Get Audit Information |
F3400 Forecast Summary File | ||||
F3460 Forecast File | ||||
F4101 Item Master |