1.Functional Description
1.1Purpose
This function will retrieve the price for a given detail forecast record from the Forecast Price File
(F34007), create a new quantity or amount using that prices, update the detail record with the
numbers and if the summary code is not blank it will force the change up the forecast hierarchy.
1.2Setup Notes and Prerequisites
1.3Special Logic
2.Technical Specifications
1.Fetch to the Forecast Price file (F34007) with the key of Item, Branch, Customer, Forecast
Type and an Effective Date less than or equal to the Requested Date and a Expiration Date greater than or
equal to the Requested Date
If a record is found
If AmountQuantity is equal to '1'
Divide the amount passed in by the price to get Quantity
Move a '2' to TempRevisionFlag
Else
Multiply the quantity passed in by the price to get Amount
Move a '1' to TempRevisionFlag
End
Else
If AmountQuantity is equal to '1'
Move zero to Quantity
Move a '2' to TempRevisionFlag
Else
Move zero to Amount
Move a '1' to TempRevisionFlag
End
End
2.Fetch the F3460 detail record for the input Item, Branch, Customer, Forecast Type, and
Requested Date.
If SummaryCode is blank
If (TempRevisionFlag is '1' and F3460 RVIS is '2') or
(TempRevisionFlag is '2' and F3460 RVIS is '1')
Set F3460 RVIS to '3'
Else
Set F3460 RVIS to TempRevisionFlag
End
End
3.Update the F3460 record with the new data
4.Update the F3460 year record with the difference between the new and old quantity/amount.
5.If the Summary Code is not blank
Select all of the F34006 with the Item, Branch, Summary Code and Type passed in
Fetch the first record
Fetch to the F3400 with the child key equal to the key off the F34006
Compare the address number off that record to the address number passed in
If it is the same (-9999999 and 0 out of F3400 equal 0) as the address number passed in
and the DRQJ from F3400 equals the input RequestedDate
If a price record was found
If AmountQuantity is equal to '1'
Divide the amount passed in by the price to get Quantity
Move a '2' to RevisionFlag
Else
Multiply the quantity passed in by the price to get Amount
Move a '1' to RevisionFlag
End
Else
If AmountQuantity is equal to '1'
Move zero to Quantity
Move a '2' to RevisionFlag
Else
Move zero to Amount
Move a '1' to RevisionFlag
End
End
Update the F3400 record with the new data
Call ForecastForcing B3401030 with the parent number off the F3400 record
End
Fetch another F34006
End
^
D3400920 - Forecast Rollup Price
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
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
| ||||
szBranchPlant | 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
| ||||
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
| ||||
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
| ||||
mnAmount | AEXP | MATH_NUMERIC | NONE | NONE |
The number of units multiplied by the unit price. | ||||
mnQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
szSummaryCode | KVER | char | NONE | NONE |
A user defined code (40/KY) that indicates the type of summary forecast. | ||||
cAmountQuantity | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
jdRequestedDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
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
|
B3401030 F3400 Forecast Forcing | ||||
B9800100 Get Audit Information |
F3400 Forecast Summary File | ||||
F34006 Forecast Summary Work File | ||||
F34007 Forecast Prices | ||||
F3460 Forecast File |