Documentation >
MAC-PAC Technical Library >
Manufacturing >
Design Engineering >
Programs >
RP Maintain Flow Supply for MRP Parts - Purpose >
RP Maintain Flow Supply for MRP Parts - Calculations
RP Maintain Flow Supply for MRP Parts - Calculations
DE080E
A. Housekeeping
1. Parameter lists, key lists, and work fields are defined.
2. The file status codes are retrieved from the Reference File (category 015).
3. The system time and date are retrieved.
B. Mainline
1. All firmed and planned flow authorizations are read from the Requirements Planning Supply file (RP095ML1) for the part being processed. The part number was passed from the calling program.
2. The flow authorization is past due if the flow authorization end date (FAEDTE) is less than the current date. In this case, the authorization is closed (MNTTYP = CLOSED). The Flow Authorization (JT100M) and Flow Requirements (JT120M) files are updated as follows:
a. The status of the flow authorization (FASTAT) is changed to closed.
b. Each flow requirement associated with the flow authorization is read from the Flow Requirement file (JT120M), and its status (FRFAST) is changed to closed.
c. For each flow requirement, the Requirements Planning net change flag on the component part's Part Master record (DE100M) is set to re-analyze. (The flag is not set if the part is a reference part.)
3. The flow authorization is in process if the flow authorization start date (FASDTE) is less than the current date. In this case, the flow authorization is ended (MNTTYP = END). The Flow Authorization (JT100M) and Flow Requirements (JT120M) files are updated as follows:
a. The flow authorization record is retrieved from the Flow Authorization file (JT100M).
b. The program determines the start and end dates of the current flow interval and calculates the number of days remaining in that flow interval.
c. The end date (FAEDTE) of the flow authorization is set equal to the day before the current date.
d. A new flow authorization is created with a start date equal to the current date and an end date equal to the original authorization's end date.
e. If the original flow authorization was over-produced, the excess quantity is added to the new flow authorization.
f. Each flow requirement associated with the flow authorization is changed as follows:
(1) The scrap factor is retrieved from the component part's Part Master record (DE100M).
(2) The component's offset days are used to change the start and end dates of the flow requirement so they correspond with the new dates on the flow authorization.
(3) For each flow requirement, the Requirements Planning net change flag on the component part's Part Master record is set to re-analyze. (The flag is not set if the part is a reference part.)
4. If the flow authorization is in the future, it is deleted (MNTTYPE = DELETE). The Flow Authorization (JT100M) and Flow Requirements (JT120M) files are updated as follows:
a. The flow authorization number is retrieved to lock the record.
b. The flow requirements records associated with the flow authorization are physically deleted from the Flow Requirements file (JT120M).
c. For each flow requirement, the Requirements Planning net change flag on the component part's Part Master record is set to re-analyze. (The flag is not set if the part is a reference part.)
d. The flow authorization record is physically deleted from the Flow Authorization file (JT110M).
5. If any errors occur during these processes, a message is written to the JIT Supply Error Update file (JT540AP).
6. Control returns to the calling program.