Functional Description
Purpose
Retrieve all records from MPS/MPR/DRP Summary File (F3413) for Short Item Number and Branch/Plant
passed in. Accumulate the Total Forecasting Amount for each record found if the F3413 Start Date is
within the range of From and Thru Date passed in and the F3413 Quantity Type is a valid UDC code.
Setup Notes and Prerequisites
None
Special Logic
None
Technical Specifications
This function first sets the keys to retrieve F3413
Default Index to 1
Keys = 1: ITM
Keys = 2: ITM, MCU
Keys = 3: ITM, MCU, QT
Keys = 4: ITM, MCU, QT, STRT (FromDate)
Next, it retrieves all records for Short Item Number and Branch/Plant passed in.
It verifies the UDC for Quantity Type (MRQT) using GetUDC. Then, calculates the
following:
If ( FromDate <= F3413::MRSTRT AND F3413::MRSTRT <= ThruDate )
TotalPrice = TotalPrice + ( MRTRQT * UnitPrice )
TotalCost = TotalCost + ( MRTRQT * UnitCost )
After all records read it calculates: TotalForecasteAmount = TotalPrice - TotalCost
^
D4100760 - Calculate Total Forecaste Amount
Data Item Data Structure DescriptionI/ORequired
MCU BranchPlant I Y
ITM ShortItemNumber I Y
UNPR UnitPrice I N
UNCS UnitCost I N
TRDJ FromDate I Y
TRDJ ThruDate I Y
CUMA TotalForecasteAmount I N
EV01 SuppressErrorMessage I N
DTAI ErrorMessageID O
CDL Index I Y
CDL Keys I Y
QT Quantity Type I N
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
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
| ||||
mnUnitPrice | UNPR | MATH_NUMERIC | NONE | NONE |
Retrieve this from F4106. If 0, only TotalUnitPrice will be returned.ab
| ||||
mnUnitCost | UNCS | MATH_NUMERIC | NONE | NONE |
Retrieve this from F4105. If 0, only TotalUnitCost will returned.ab
| ||||
jdFromDate | TRDJ | JDEDATE | NONE | NONE |
If Keys is set to 4, FromDate is used as part of the key.ab
| ||||
jdThruDate | TRDJ | JDEDATE | NONE | NONE |
The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing. | ||||
mnTotalForecasteAmount | CUMA | MATH_NUMERIC | NONE | NONE |
The total amount of all transactions in the Item Ledger for an Item. | ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorMessageID | DTAI | char | NONE | NONE |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
| ||||
mnIndex | CDL | MATH_NUMERIC | NONE | NONE |
Currently defaulted to 1ab
| ||||
mnKeys | CDL | MATH_NUMERIC | NONE | NONE |
Defaulted to 4ab
| ||||
szQuantityType | QT | char | NONE | NONE |
This code is used to distinguish different quantities generated in the MPS/MRP system. |
X0005 Get User Defined Codes |
F3413 MPS/MRP/DRP Summary File |