MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Requirements Planning > Programs > Requirements Planning Generation for JIT Parts - Purpose > Requirements Planning Generation for JIT Parts - Calculations

Requirements Planning Generation for JIT Parts - Calculations

RP105E

A.   Housekeeping

1.   See Common Processing Routines - Housekeeping for a general discussion of this subroutine.  Processing specific to this program is described below.

2.   Parameter lists are set up.  One is for the parameters passed to this program from the Requirements Planning Generation program (RP100E).  A second list is passed to the Warehouse Balance File Creation program (IC225E).  A third list is passed to the Simulated/Actual Demand Sourcing program (SDMSRC).  A fourth list is passed to the RP Simulated Supply/Demand Delete/Copy program (RP101E).  A fifth list is passed to the Batch RP Forecast Consumption/Target Inventory Calculation program (RP130E).  A sixth list is passed to the RP Selective Request Retrieval program (RP102E).

3.   Work fields are defined and program constants are initialized.

4.   The following records are retrieved from the Reference file (REFERP):

a.   The operating system’s file status codes are retrieved from category 015.  If this record is not found, a message is sent to the system operator, and the program aborts.

b.   The date format is retrieved from category 049.  If this record is not found, the date format defaults to MMDDYY.

c.   The quantity field size is retrieved from category 446.  If this record is not found, the program terminates.

d.   The applications installed category (012) is read to determine if Synchro is installed.

e.   The flow authorization start number is retrieved from category C09.  If this record is not found, the program terminates.  Either the actual or simulated record is retrieved from this category, depending on the RP run mode.

f.    The RP Families to Exclude (up to five families to exclude for RP planning) are retrieved from Reference File category D85.  If the category does not exist, then the values are set to blanks.

g.   The part status codes, decodes, and planning flags are retrieved from Reference File category D88.  All part status data and corresponding information is loaded into corresponding arrays.

5.   The following record is retrieved from the System Control file (CT100M).  If this record is not found, the program terminates.

Control Record

Information Retrieved

Inventory Control
(ICCTL1)

Lot Control and Potency Control Environment (LOTOPT, POTOPT). 

Inventory Control
(ICCTL2)

Order Planning Codes (MOPAC2, MOPAC3, MOPAC4)
Distribution Codes (DSTAC2, DSTAC3, DSTAC4)
Last Calendar Date (LCALDT)

B.   Mainline

1.   The priming read is performed on the logical Part Master file (DE100L12).  The parameters necessary to retrieve the first part are passed from the Requirements Planning Generation program (RP100E).  Critical part data are stored in save fields for further processing.

2.   The part status (IZACD) and part status planning flag (RD88PL) are validated.

a.   The part status array is searched for the current part status.

(1)  If the part status is not found in the array, the part is written to the Part Status Exception Report file (RP100AP8) for processing at the end of the program, and the part is bypassed by the conversation.

(2)  The part status found in the array is used to find the corresponding planning flag in the planning flag array.

(a)  If the planning flag is N, the part is written to the Part Status Exception Report file and bypassed by the conversation.

(b)  If the planning flag is Y, the part is processed by the conversation.

(c)  If the part’s family ID (PMFAM) is equal to the RP Families to Exclude (RD85FI) (up to five families to exclude), and PMFAM is not equal to blanks, then regardless of the value of the Planning flag (Y/N), the part’s Planning flag is set to No and the part is bypassed by the conversation.

3.   Plant data are retrieved if the part master plant code (PMPLNT) is not equal to the saved plant code (SAVPLT).

a.   Set the record pointer to the occurrence which corresponds to the plant code if the part’s plant code (PMPLNT) is found in the plant code array (APLT).  Also, set the occurrence of the calendar code data structure to the position of the plant’s calendar code (CALCOD) in the calendar code array (ACCD) if the plant’s calendar code (CALCOD) is not equal to the saved calendar code (SAVCCD).

b.   Retrieve the requirements planning generation request parameters from the Requirements Planning Generation Request file (RP110AP) if the part’s plant code (PMPLNT) has not already been loaded into the plant code array (APLT).

c.   The requirements planning selection flag (CZSBMR) is checked.  If the plant has been selected for processing, the record is further processed.  Otherwise, processing ends abnormally because a data integrity problem must exist if a part has been retrieved for a plant that has not been selected.

(1)  The plant data structure (RPPLDS) is formatted with information from the request file and from the Warehouse Description file (IC170ML2).

(2)  The calendar code data structure (MPXCAL) is formatted if the plant’s calendar code (WDCLCD) has not already been loaded into the calendar code array (ACCD).  Otherwise, the occurrence is set in the calendar code data structure if the plant’s calendar code has already been processed.

d.   The RP horizon date (that is, the RP stop date or the RP planning horizon date) is determined based upon the RP Generation Days field (CZHZDY) on the RP110AP request record for the plant.  This date is used to determine the point up until which RP will continue to analyze supply and demand, plan new supply (if needed), and generate planning action messages.  After this point, demand and supply are only totaled and summarized on the RP Planning Action report for the part.  If the calculated RP stop date falls before the RP print horizon date for the part, then the RP print horizon date is set equal to the RP stop date.

e.   The Flow Interval Start Dates Array (FIA) is loaded.  This array is used to calculate the number of days spanned by flow intervals, and to store the start dates of each flow interval to be processed.  The parameter which specifies the flow interval type is the Flow Interval Information category (C05).  Flow intervals can span the following periods:

(1)  The flow interval spans weeks.  The Flow Interval Start Date Array is loaded with week start dates, as identified on the Calendar Date file (CT140ML1).

(2)  The flow interval spans months.  The Flow Interval Start Date Array is loaded with month start dates.

(3)  The flow interval spans user-defined periods.  The Flow Interval Start Date Array is loaded with user-defined period start dates retrieved from the Flow Interval Start Date file (CT150M).

f.    The arrays containing calendar dates (ACAL) and shop dates (ASHP) are loaded.  These arrays are used for converting calendar dates to shop dates and shop dates to calendar dates.

4.   The arrays and work fields, which contain information specific to the part currently being processed, are initialized.  The processing described below is performed for each valid part.

5.   Part print parameters are retrieved based on the part’s commodity code.  If the parameters are not found, all information is printed.

6.   The part print flag (HDRPRT) is set.  This flag is used in conjunction with several other indicators to determine whether part information will be printed on the Planning Action report.

a.   If the planning action report option (CPLNAR) is set to N, the part print flag is set to N*.  No part information is printed on the report, even if production schedule action is needed within the firm horizon.

b.   If the planning action report option (CPLNAR) is set to Y, and the part (exceptions only) print option (CPPO) is set to N, the part print flag is set to Y.  All part information is printed on the report regardless of the production schedule action needs.

c.   If the planning action report option (CPLNAR), the part print option (HDRPRT), and the Requirements Planning force print option (MPEGCD) from the Part Master file (DE100M) are all set to Y, the part print flag is set to Y.  All part information is printed on the Planning Action report.

d.   Otherwise, if the first two options are set to Y, and the requirements planning force print option for the part is N, the part print flag is set to Y based on the Requirements Planning Print parameter.  If the print planned exception flag (CPPOE) equals Y, then either a change to firmed or planned order will cause the part print flag to be set to Y.  If the print errors beyond horizon flag (CPEBH) equals Y, then a change to an order beyond the horizon will cause the report to be written, and all order action messages will be displayed on the Planning Action report.

e.   Nine scenarios for the part print flag are summarized in the following table:

Conditions

1

2

3

4

5

6

7

8

9

Planning Action Report Option

N

N

Y

Y

Y

Y

Y

Y

Y

Part (exception only)
Print Option

-

-

N

Y

Y

Y

Y

Y

Y

Requirements Planning
Force Print Option

-

-

-

Y

N

N

N

N

N

Print Errors Beyond
Horizon Option

-

-

-

-

-

-

Y**

-

Y**

*     If production schedule action is needed for days with the firm horizon, the flag is set to Y so that the Planning Action Report program (RP520E) recognizes that the part has exceptions.  Note that no report is printed for the part; however, an action message will be written to the Order Action Inquiry File by the Planning Action Report program.

**    If the Print Errors Beyond Horizon flag is set to Y, exceptions beyond the horizon are printed on the Planning Action report.

Conditions

1

2

3

4

5

6

7

8

9

Print Planned Order
Exception Option

-

-

-

-

-

-

-

Y

N

Order Action Needed on Firm Flow Authorization within Horizon

N

Y

-

-

Y

N

N

N

N

Order Action Needed on Firm Flow Authorization beyond Horizon

-

-

-

-

-

N

Y

N

N

Order Action Needed on Planned Part Only

-

-

-

-

-

N

-

Y

Y

Part Print Flag on Report Header Record

N

Y*

Y

Y

Y

N

Y

Y

N

Will Part Print on  Planning Action report

N

Y

Y

Y

Y

N

Y

Y

N

7.   The calculated RP firm horizon date (SAVFDT) is used as the RP end firm horizon date, and the JIT part master firm date (SVFMDT, determined by the JIT Production Schedule Firm/Unfirm program (JT230E)) is used as the part’s firm horizon date, up until which planning action messages will be sent, if this date is less than the RP firm horizon date (SAVFDT).

8.   The flow interval start date (FISTDT) and the next flow interval start date (NFISDT) are retrieved from the flow interval start dates array.

9.   The flow interval length is calculated:

Flow Interval Length (FILEN)


equals

Next Flow Interval Start Date (NFISDT)


minus

Current Flow Interval Start Date (FISTDT)

10.  The Date Array (DTA) is loaded with calendar dates, beginning with the current flow interval start date (FISTDT).

*     If production schedule action is needed for days with the firm horizon, the flag is set to Y so that the Planning Action Report program (RP520E) recognizes that the part has exceptions.  Note that no report is printed for the part; however, an action message will be written to the Order Action Inquiry File by the Planning Action Report program.

**    If the Print Errors Beyond Horizon flag is set to Y, exceptions beyond the horizon are printed on the Planning Action report.

11.  Once the appropriate processing is completed, the header record for the part is written to the Planning Action Report Header file (RP100AP1).  The net change processing flag (PMNCFL) (if RP is running in actual mode) and the RP selection flag (PMRPSF) on the Part Master file (DE100M) are reset to 0.  The next part record is retrieved from the logical Part Master file (DE100L12).

C.   Process Current Inventory Level

1.   The beginning inventory for the part (HDRINV) is calculated if the inventory netting flag (PMNETF) on the Part Master file (DE100M), is set to Y.  (If the part is not potency controlled). 

a.   The part number and plant’s company/warehouse are used to retrieve the corresponding record from the Warehouse Balance file (IC140M).

b.   If the record does not exist, the Warehouse Balance File Creation program (IC225E) is called to dynamically create the record.  The projected inventory balance (PRJINV) is assumed to be zero.

c.   If the record is found, the first balance type quantity (WBBLT1) and the work-in-process inventory balance quantity (WBWIPB) are added to the projected inventory balance (PRJINV).

d.   The remaining balance type quantities (WBBLT2, WBBLT3, WBBLT4) are added to projected inventory balance only if indicated by their respective order planning codes (MOPAC2 = Y, MOPAC3 = Y, MOPAC4 = Y).

e.   For the manufacturing warehouse, if any balance types are available for both planning and distribution (both Order Planning Flag and Distribution Flag = Y on the balance type), and sales orders are not considered for planning (the Sales Order Planning Flag on the Warehouse Description file is N), then the inventory quantity reserved for customer orders is subtracted from the total.

f.    The distribution balances from each of the plant’s distribution warehouses that are available for planning (WDAVPL = Y) are added to the projected inventory balance.

g.   If the beginning projected inventory balance for the part is less than zero, the negative inventory is treated as additional demand.  A negative planning balance requirement record is written.  This balance will print as a requirement for the current date (CURDTE) on the Planning Action report.  The projected inventory balance is set to zero.

2.   The beginning inventory for the part (HDRINV) is calculated if the inventory netting flag (PMNETF) on the part master file (DE100M), is set to Y (if the part is potency controlled). 

a.   The part number and plant’s company/warehouse are used to retrieve the corresponding record from the Warehouse Balance file (IC140M).

b.   If the record does not exist, the Warehouse Balance File Creation program (IC225E) is called to dynamically create the record.  The projected inventory balance (PRJINV) is assumed to be zero.

c.   If the warehouse balance record is found, then the part, company, and warehouse are used to retrieve all applicable multiple location file (IC130ML6) records and process them.

d.   If at least one record is found, the first multiple location balance type quantity (LLBLT1) is multiplied by the internally calculated potency factor (PTFCTR, derived by dividing the actual potency, LCACPT, from IC150M for the location’s lot number, LLLTNO, by the saved part master standard potency, SAVSPT, from DE100M), yielding the equivalent potent units.  This process occurs in subroutine POTCLC, after which the potent units (POTLBQ) is added the inventory.  If the Lot Master Available for Planning flag, LCAVPL, is No, then the effective potent units are considered to be zero.

e.   The remaining balance type quantities (LLBLT2, LLBLT3, LLBLT4) are processed similarly to LLBLT1 and added to the inventory only if indicated by their respective order planning codes (MOPAC2=Y, MOPAC3=Y, MOPAC4=Y).

f.    Since the multiple location file does not have a work-in-process balance (WBWIPB) similar to that on IC140M, this is not directly taken into account.  The quantity which resides in WBWIPB on IC140M would also be accounted in some multiple location record, so the equivalent work-in-process multiple location records will be converted into potent units and added to the inventory. 

g.   For the manufacturing warehouse, if any balance types are available for both planning and distribution (both Order Planning Flag and Distribution Flag = Y on the balance type), and sales orders are not considered for planning (the Sales Order Planning Flag on the Warehouse Description file is N), then the inventory quantity reserved for customer orders and transfer orders is subtracted from the total.  For potency controlled parts, the inventory reserved quantity for customer and transfer order lines is subtracted from the aforementioned total at standard potency (i.e. stock keeping not potent, units) because not all of warehouse balance reserved quantity (WBRSOQ) will be guaranteed also to be reserved at the multiple location file (LUPSV2, LLRSV3, LLRSV4).

h.   The distribution balances from each of the plant’s distribution warehouses that are available for planning (WDAVPL = Y) are added to the projected inventory balance. 

i.    If the beginning projected inventory balance for the part is less than zero, the negative inventory is treated as additional demand.  A negative planning balance requirement record is written.  This balance will print as a requirement for the current date (CURDTE) on the Planning Action report.  The projected inventory balance is set to zero. 

3.   If the Planning Action report has been requested, a planning action report detail record is written for the safety stock requirement, if a requirement exists and the inventory netting flag (PMNETF) is set to Y.

4.   If the Synchro module is installed, the in-process shipments are retrieved from the Item Delivery Point file (GA120MLF).  For each Part, Delivery Point, the valid endorsement is searched (only one endorsement is valid at a time for a specific Blanket Order, Customer, Ship To, Delivery Point, Part across plants).  If this one is for the same Company/Warehouse as the processed part, the in-process shipment of the Part/Delivery point is calculated:  (using WKISHP = DPTSDU - DPTSMP).  If WKISHP is negative, it defaults to zero, otherwise it is cumulated (QTYCUM).  The calculation of the in-process quantity is done by the common subroutine INPSHP.

5.   If Synchro is installed, the in-process shipments are retrieved from the Item Delivery Point file (GA120MLF) and accumulated into the planned demand.

6.   If the inventory netting flag is set to Y, subtract the safety stock quantity from the projected inventory balance.  If projected inventory is insufficient to cover the safety stock demand, add the outstanding safety stock quantity to the current date’s position in the Actual Demand Array (ADA).

7.   If the inventory netting flag is set to N, the safety stock requirement is ignored.

D.   Retrieve Requirements

1.   In actual RP run mode, requirements records for a part are retrieved sequentially from the Requirements Planning Demand Logical file (RP095ML2).  In simulation RP run mode, the requirement records are retrieved from the Simulated Requirements Planning Demand Logical file.  All requirements within the flow interval or within the outbound stock queue days horizon are processed.

2.   If a requirements record is found, the requirement quantity (REQQTY) is calculated according to one of the following formulas:

a.   Sales Order Records.  These are processed only if the following conditions are met:

(1)  The Sales Order Planning Flag (SLPLFG) is set to Y.  This flag is Y if the order is sourced from manufacturing inventory or if the Sales Order Planning flag on the Warehouse Description file is Y.

(2)  The sales order type is a regular order, blanket release, or a backorder release.

Requirement Quantity

equals

SKU Sales Order Quantity (SLRQTY)

minus

SKU Quantity Shipped (SLSQTY)

b.   Component Requirement Records (actual or simulated):

Requirement Quantity

equals

Component Required Quantity (MZRQTY or SDRQTY)

minus

Quantity Issued (MZIQTY or SDIQTY)

c.   Projected Demand Records (where FCVQTY does not equal zero:

Requirement Quantity

equals

Demand Quantity (FCQTY)

minus

Shipped Quantity (FCSQTY)

d.   Consolidated Projected Demand Records (actual or simulated):

Requirement Quantity

equals

Demand Quantity (UFUQTY)

e.   Target Inventory Demand Records (actual or simulated):

Requirement Quantity

equals

Demand Quantity (TIINVQ)

f.    Transfer Order Records:

Requirement Quantity

equals

Transfer Order Quantity (TLORQY or SDRQTY)

minus

Quantity Shipped (TLSHQY or SDIQTY)

g.   Transfer Requisition Records (actual or simulated):

Requirement Quantity

equals

Transfer Requisition Quantity (QTRQTY or SDRQTY)

minus

Quantity Received (QTRCQT or SDIQTY)

h.   Actual flow requirement records are processed for each day they span (flow requirements end date (FREDTE) minus flow requirement start date (FRSDTE).  Simulated flow requirement records are processed for each day they span (flow requirements end date (FDEDTE) minus flow requirement start date (FDSTDT)

(1)  If the flow requirement start date is less than the current date (CURDTE), then all, or a portion of the flow requirement, is past due.  The past due portion of the flow requirement is processed as follows (for either actual or simulated flow requirements):

(a)  The total issued quantity (FRIQTY or FDIQTY) is greater than the daily demand quantity (FRDQTY or FDDQTY - quantity has not been increased for scrap).  The daily demand quantity is subtracted from the total issued quantity.  Therefore, the total issued quantity is reduced and no requirement quantity exists.

(b)  The total issued quantity is equal to the daily demand quantity.  The daily demand quantity is subtracted from the total issued quantity.  Therefore, the total issued quantity is reduced and no requirement quantity exists.

(c)  The total issued quantity is less than the daily demand quantity.  The total issued quantity is subtracted from the daily required quantity (FRRQTY or FDRQTY - quantity has been increased for scrap) and then set to zero.  The result is the requirement quantity.

(2)  If the flow requirement start date is greater than the current date (CURDTE), and less than the outbound stock queue days horizon (QNFISD), the requirement quantity is equal to the daily required quantity.

i.    Synchro Offset Releases.

(1)  An offset release record. 

Requirement Quantity

equals

Net Quantity
(ROQNSK)

3.   The fields of the requirements record are formatted into the corresponding fields of the Planning Action Report Detail-Demand file (RP100AP3).  This will occur for each point demand record (sales order, component requirement, projected demand, transfer order, and transfer requisition), and for each day the flow requirements span.  These records are formatted and written accordingly to the RP run mode.

a.   If the requirement due date (REQDTE) is less than or equal to the just-in-time horizon date (SAVJHZ), the report record is written to the Planning Action Report Detail-Demand file (RP100AP3).

b.   If the requirement due date (REQDTE) is greater than the just-in-time horizon date (SAVJHZ), the requirement quantity is added to the trailer requirements (TRLREQ) on the Planning Action Report header record (RP100AP1).

4.   The requirement quantity is added to the position on the Actual Demand Array that corresponds to the requirement due date.  Past due requirements are added to the current date’s position of the Actual Demand Array.  If overflow occurs, an error message is written to the Just-In-Time Supply Update Error file (JT540AP) (if RP is running in actual mode), and the array entry is replaced with the maximum quantity.

5.   If the outbound stock queue days (SAVQDY) or the P/M target inventory days (SVTGIN) are greater than zero, then the greater of the two fields is used as the queue days demand, which is factored into the demand calculations.  The demand quantity for the day being processed plus the sum of the demand for the number of queue days (QUEINV) are added together.  The projected inventory from the previous days demand (PRVINV) calculation is subtracted from the accumulated demand.  The difference is the demand to be placed on the day being processed.  The calculated demand quantity replaces actual demand quantity in the Actual Demand Array (ADA).  The projected inventory for that day replaces the previous days projected inventory.  The difference between the number of entries in array ADA and the sum of the flow interval and planning quantity is used if it is less than the original stock queue days saved.  Also, if the first period is processed, stock queue day processing will start with the beginning of the period.  Otherwise, it will be performed starting with the index 1 plus the planning policy quantity of the part since the indices below this have already been processed from previous period.

E.   Retrieve Supply

1.   Actual RP supply records for a part are retrieved sequentially from the Requirements Planning Supply Logical file (RP095ML1).  Simulated RP supply records for a part are retrieved sequentially from the Requirements Planning Simulated Supply Logical file (RP140AL7).  All records with due dates within the flow interval are processed.

2.   The point supply records (purchase order release, purchase requisition, manufacturing order, transfer order, and transfer requisition) are processed as follows:

a.   The supply yield (SUPYLD) is calculated:

(1)  If the supply record is a purchase order release record (actual or simulated), the supply quantity (SUPQTY) is equal to the balance due quantity (PDBDSK or SSORDQ - SSQTYR).

(2)  The supply record is a purchase requisition (actual or simulated).

(a)  If the supply record is a planned purchase requisition, it is deleted.

(b)  If the supply record is a released purchase requisition record, the supply quantity is equal to the requisition quantity (RQQTY or SSORDQ), reduced by the scrap factor, minus the covered quantity (RQCVQT or SSQTYR).

(3)  The supply record is a manufacturing order record (actual or simulated).

(a)  If the supply record is a planned manufacturing order, it is deleted.  All component requirements and planned labor requirements associated with the order are also deleted.

(b)  If the supply record is firm or open manufacturing order, the supply quantity is equal to the order quantity (HORDQ or SSORDQ) minus the total quantity received (HTQR or SSQTYR).

(4)  If the supply record is a transfer order record, the supply quantity is equal to the order quantity (TLORQY or SSORDQ) minus the quantity received (TLRCQY or SSQTYR).

(5)  The supply record is a transfer requisition.

(a)  If the supply record is a planned transfer requisition, it is deleted.

(b)  If the supply record is a released transfer requisition record, the supply quantity is equal to the requisition quantity (QTRQTY or SSORDQ), reduced by the scrap factor, minus the quantity received (QTRCQT or SSQTYR).

(6)  If the supply quantity is greater than zero, the supply yield is calculated as:

Supply Yield = Supply Quantity times (1 minus IC Scrap Factor divided by 100)

c.   The fields of each point supply record are formatted into the corresponding fields of the Planning Action Report Detail-Supply file (RP100AP2).

(1)  If the supply quantity is greater than zero and the supply due date (SUPDDT) is less than or equal to the just-in-time horizon date (SAVJHZ), the record is written.

(2)  If the supply quantity is greater than zero and the supply due date (SUPDDT) is greater than the just-in-time horizon date (SAVJHZ), the supply yield (SUPYLD) is accumulated into the trailer supply (TRLSUP) on the planning action report header record (RP100AP1).

d.   The supply yield is added to the position on the Point Supply Array (PSA) that corresponds to the supply due date.  Past due supply is added to the current date’s position of the Point Supply Array.  If overflow occurs, an error message is written to the Just-In-Time Supply Update Error file (JT540AP), and the array entry is replaced with the maximum quantity.

3.   The flow authorization records (actual or simulated) are processed as follows:

a.   If the flow authorization end date (FAEDTE or SFEDTE) is less than the current date (CURDTE), the flow authorization is past due.  Past due flow authorization records are given a status of closed.  The corresponding flow requirements records are also closed.  If an RP firm horizon date (SAVFDT) has been defined and is greater than the RP run date (CURDTE), then any flow authorizations that are past due are split.  The quantity received to date (FATQR or SFATQR) is compared with the remaining flow authorization quantity that is not past due (AVARET), which is calculated as the flow authorization work days remaining after the split (FANDAY) multiplied by the daily flow authorization scheduled quantity (FAQTY or SFAQTY).  If the quantity received (FATQR or SFATQR) is greater than the remaining flow authorization quantity to produce (AVARET), then the over/under quantity to apply towards days (ARQTY) within the RP firm horizon is zero.  Otherwise, the quantity received (FATQR or SFATQR) is subtracted from the remaining flow authorization quantity (AVARET) and the result is added to the over/under quantity to apply (ARQTY) towards flows within the RP firm horizon.

b.   If the flow authorization start date (FASDTE or SFSTDT) is less than the current date (CURDTE), the flow authorization end date (FAEDTE or SFEDTE) is greater than the current date, the flow authorization is in-process.  The past due portion of the flow authorization record is given a status of closed.  The end date is replaced with the date of the last valid working day prior to the current date.  The flow authorization record is updated to reflect the new information.  A new flow authorization is added to reflect the future portion of the record.  It contains the same data as the original except that the start date (FASDTE or SFSTDT) is the current date, the number of workdays (FAWDYS or SFWDYS) is calculated, and the receipt quantity (FATQR or SFATQR) is set to zero.

c.   If the flow authorization start date is greater than or equal to the current date (CURDTE), the flow authorization record is processed as follows:

(1)  Flow authorization records are processed for each day they are in effect during the flow interval.

(2)  The flow authorization quantity (FAQTY or SFAQTY) is added to the corresponding days of the Actual Supply Array (ASA) for each day the flow authorization is effective within the flow interval.

F.   Create New Production Schedule

1.   The Revision Level Logical file (DE170ML2) is read sequentially for the part being processed from the flow interval start date (FISTDT) to the next flow internal start date (NFISDT).  If a record is found, the revision level number (RVLVL) is loaded into the position in the Revision Level Array (RLA) that corresponds to the revision effectivity date (RVEFF).  If a record is not found, the Revision Level Array is loaded with the engineering revision level number (AMERL) from the Part Master file (DE100L12).  The Revision Level Array is loaded for each day the flow interval spans.  The above logic is bypassed if the start date of the flow interval that is being analyzed (FISTDT) is greater than the calculated RP stop date (RPSTOP).  This is done for both the current flow interval and any future flow intervals analyzed.

2.   The Suggested Supply Array (SSA) is loaded with the supply quantities needed to meet demand.  The four methods for determining supply quantities are the fixed quantity, fixed time, partial method and the averaged method.  The method is specified as the Planning Policy Code (MOPOC) on the Part Master file (DE100L12).

a.   If the planning policy is fixed time (MOPOC = 2), the suggested supply array is loaded as follows: 

(1)  The Actual Array (ADA) quantities for the flow interval are accumulated into demand quantity (DEMQTY).

(2)  The Point Supply Array (PSA) quantity is subtracted from the demand quantity (DEMQTY). 

(a)  If the point supply quantity exceeded the demand quantity (DEMQTY), the demand quantity is set to zero and the surplus inventory is added to inventory (RNDQTY). 

(b)  If the demand quantity (DEMQTY) is greater than the point supply quantity, the remaining demand is reduced by existing inventory.

(3)  The quantity is calculated for the fixed time period using the order policy increment.  If the order policy increment is equal to zero, the amount required will be the amount suggested.  Any remainder based on the difference between the calculated quantity and the demand quantity (DEMQTY) is added to available (RNDQTY). 

b.   If the planning policy is fixed quantity (MOPOC = 3), the suggested supply array is loaded as follows: 

(1)  The Actual Array (ADA) quantities for the flow  interval are accumulated into demand quantity (DEMQTY). 

(2)  The Point Supply Array (PSA) quantity is subtracted from the demand quantity (DEMQTY). 

(a)  If the point supply quantity exceeded the demand quantity (DEMQTY), the demand quantity is set to zero and the surplus inventory is added to inventory (RNDQTY).

(b)  If the demand quantity (DEMQTY) is greater than the point supply quantity, the remaining demand is reduced by existing inventory. 

(3)  The fixed quantity is calculated using the order policy quantity and order policy increment.  If the order policy increment is equal to zero, it is assumed to be equal to the order policy quantity.  Any remainder based on the difference between the calculated quantity and the demand quantity (DEMQTY) is added to available (RNDQTY).

c.   If the Planning Policy Code is partial (MOPOC = 6), the Suggested Supply Array is loaded for each day of the flow interval as follows:

(1)  The demand quantity (DEMQTY) is initialized to the Actual Demand Array quantity.

(2)  The Point Supply Array (PSA) quantity is subtracted from the demand quantity (DEMQTY).

(a)  If the point supply quantity exceeded the demand quantity (DEMQTY), the demand quantity is set to zero and the surplus inventory is added to inventory (RNDQTY).

(b)  If the demand quantity (DEMQTY) is greater than point supply quantity, the remaining demand is reduced by the existing inventory.  First, the demand quantity is reduced by the inventory quantity (RNDQTY) which is accumulated through point supply surplus.  Second, if the demand is not satisfied, the demand quantity is reduced by the projected inventory (PRJINV) taken from the Warehouse Balance file (IC140M).  The projected inventory (PRJINV) is netted from only if the inventory netting flag (PMNETF) is set to Y.

(3)  The Suggested Supply Array (SSA) quantity is set to the demand quantity (DEMQTY).

d.   If the Planning Policy Code is average (MOPOC = 7), the Suggested Supply Array is loaded as follows:

(1)  The Actual Demand Array (ADA) quantities for the flow interval are accumulated into demand quantity (DEMQTY).

(2)  The Point Supply Array (PSA) quantities for the flow interval are accumulated into a work field (WRKF4).

(3)  The accumulated supply quantity (WRKF4) is subtracted from the demand quantity (DEMQTY).

(a)  If the point supply quantity exceeded the demand quantity (DEMQTY), the demand quantity is set to zero and the surplus inventory is added to inventory (RNDQTY).

(b)  If the demand quantity (DEMQTY) is greater than point supply quantity, the remaining demand is reduced by the existing inventory.  First, the demand quantity is reduced by the inventory quantity (RNDQTY) which is accumulated through point supply surplus or the surplus caused by the rounding calculation of averaging the suggested supply quantity.  Second, if the demand is not satisfied, the demand quantity is reduced by the projected inventory (PRJINV) taken from the Warehouse Balance file (IC140M).  The projected inventory (PRJINV) is netted from only if the inventory netting flag (PMNETF) is set to Y.

(c)  The demand quantity is divided by the number of days in the flow interval.  All positions in the Suggested Supply Array which correspond to the flow interval are set equal to the quotient.  Any additional inventory quantities caused by the smoothing of the daily rate are added to the inventory balance (RNDQTY).  This inventory will be netted from in the processing of the next flow interval.

(d)  If the remaining demand quantity for the flow interval exceeds the maximum quantity that can be satisfied by a flow authorization, the maximum quantity is used as the suggested supply quantity.  The remaining unsatisfied demand will be processed in the next flow interval.

3.   The Suggested Supply Data Structure (RPXSUG) is loaded with all the information needed to either maintain existing FAs or generate new FAs for each day within the flow interval.  If no RP firm horizon date is defined (SAVFDT = CURDTE), then the following steps occur:

a.   If any or all of the dates within the flow interval fall within the JIT firm horizon date (PMFMDT), the following processing occurs.

(1)  For days in which the Actual Supply Array (ASA) quantity is not zero, the Suggested Supply Data Structure (RPXSUG) is loaded with the existing production rate.  The supply start date (XRPSSD), end date (XRPSED), and number of working days (XRPSWD) are calculated based on flow authorization breaking logic.  The supply status (XRPSTS) is formatted with a code of firm (F).  The revision level (XRPSRL) is set to that of that revision level which is effective on the date being processed, which is not necessarily the revision level of the existing firm flow authorization.

(2)  For days in which the Suggested Supply Array (SSA) production rate and the Actual Supply Array (ASA) production rate are not equal, planning action messages are generated.  Increase and decrease action messages are generated.  An increase message is generated when the suggested quantity is greater than the actual flow authorization quantity.  A decrease message is generated when the actual flow authorization quantity exceeds the suggested quantity.  Action messages are only generated if the planning action report is requested and the day being processed is within the just-in-time horizon date (JTHZDT).

(3)  The fields from the Suggested Supply Data Structure (XRPSUG) are used to format the record field of the Planning Action Report Detail-Supply file (RP100AP2).  A record is written for each day actual supply exists or action messages are produced.

b.   For days outside of the firm horizon date (PMFMDT), the following processing occurs:

(1)  If the Suggested Supply Array (SSA) production rate is not zero, the Suggested Supply Data Structure (XRPSUG) is formatted.  The fields formatted are as follows:  the suggested supply start date (XRPSSD) with the suggested supply date; the suggested supply status (XRPSTS) with a code of planned (P); the suggested revision level (XRPSRL) with the revision level effective on that day; the suggested supply end date (XRPSED) with the last day of the flow interval or with the last day of smooth production; and the suggested number of work days (XRPSWD) is calculated.

(2)  The fields from the Suggested Supply Data Structure (XRPSUG) are used to format the record field of the Planning Action Report Detail-Supply file (RP100AP2).  A record is written for each day a suggested supply rate exists.

c.   If all days within the flow interval have been processed, the suggested production schedule is finished.

4.   For an RP generation request that has an RP firm horizon date (SAVFDT is not equal to and is greater than CURDTE), the following steps occur:

a.   If any or all dates within the flow interval fall within the calculated RP firm horizon date (SAVFDT), the following processing occurs.

(1)  For each day in the working day array (DTA) that is less than the RP firm horizon date (SAVFDT), the process firm horizon subroutine (PERPRC) is invoked to apply the previously calculated JIT over/under quantity to apply (ARQTY) toward any days within the RP firm horizon, in a chronological fashion.

(2)  An “over” quantity (APQTY is less than or equal to zero) will consume firmed flow authorizations until used up.  This will result in a production schedule, after RP processing occurs, which is less than the original schedule (or possibly even zero) for each day consumed within the horizon.  The following diagram illustrates the before and after schedule profiles.  In this case, no planning action messages are sent.

(3)  An “under” quantity (ARQTY is greater than zero) will result in the flow authorization on today’s date (CURDTE), if it exists, to be increased to meet the past due production schedule requirement.  In addition, if no flow authorization exists on today’s date, the projected inventory or available quantity is negative on today’s date, and the Replan Past FA flag (SAVRP) from Reference File category D84 is N (no), then RP will carry forward the negative projected inventory.  If the negative projected condition still exists on the first working day after the RP firm horizon date (SAVFDT), then a flow authorization will either be created or an existing flow authorization increased to meet this demand.  No action messages are sent.

(4)  If there is no flow authorization on today’s date, the projected inventory or available quantity is negative on today’s date, and the Replan Past Flow Authorization flag (SAVRP) from Reference File category D84 is Y (yes), then RP will replan the quantity necessary to make the projected inventory zero on today’s date, and will write a planning action message of “RP” (replan) to the RP Planning Action Supply file (RP100AP2) for the part and date.

{bmc g:\dev\mptchlib\rppd\firmhorz.bmp}

RP FIRM HORIZON
PROCESSING (JIT PARTS)

Automatic day-by-day application ("consumption") of current/future schedule within firm horizon (over production in past.)

Automatic reschedule of past-due production on today, regardless of planning policy code (partial, average, etc.)

Reference File category option to "Replan Past FA" on today's date even if no schedule exists (planning balance is negative, or available quantity on today is negative.)

G.   Implement Suggested Production Schedule

1.   Retrieve the first flow authorization record of the flow interval if the supply retrieved flag (SPLRTV) has been set.  The supply retrieved flag is set when the first flow authorization record is retrieved within the flow interval.

2.   Maintain the existing flow authorization records until all records within the flow interval reflect the records in the Suggested Supply Data Structure, or until there are no more existing flow authorization records.

a.   Leave the flow authorization intact because all flow authorization breaking logic is satisfied.  If the net change flag from the parent’s Part Master file (DE100L12) is equal to Replan (PMNCFL = 2), new flow requirements will be created for the flow authorization.

b.   Change the existing flow authorization record.

(1)  Format the flow authorization record fields with the corresponding fields from the Suggested Supply Data Structure (XRPSUG).  Update the Flow Authorization file (JT100M).

(2)  Maintain the flow requirement records that correspond to the flow authorization record.

(a)  Delete the existing flow requirements records, and generate new flow requirements records if the net change flag is equal to Replan (PMNCFL = 2), or, in simulated mode, set the RP Select flag (PMRPSF) to 2.  The flow requirements are physically deleted from the Flow Requirements file (JT120M), or the Simulated Flow Requirements Logical file (RP140L22).

(b)  Change the existing flow requirements.  The flow requirement records are updated with the information found on the changed flow authorization.  All flow requirements attached to the parent part’s flow authorization are updated with the new data.  For each component part processed, the net change flag is set to Reanalyze (PMNCFL = 1) (if RP is running in actual mode) and the RP selection flag is set on (PMRPSF = 1), if RP is running in actual mode, or (PMRSF = 2) if RP is running in simulated mode.  This will only occur in net change processing mode if the net change flag or the selection flag is not already set.

c.   Delete the existing flow authorization, which is no longer needed.

(1)  Physically delete the flow authorization record.

(2)  Physically delete all flow requirements records that correspond to the flow authorization record.

(3)  Set the net change flag on the Part Master File to Reanalyze (PMNCFL = 1) (if RP is running in actual mode) and the RP selection flag to one (PMRPSF = 1), if RP is running in actual mode, or (PMRSF = 2) if RP is running in simulated mode for the component part if the net change flag or the selection flag is equal to zero.

3.   Add a flow authorization record.

a.   Format the flow authorization record fields with the corresponding fields from the Suggested Supply Data Structure (XRPSUG).  The remaining fields will come from the Part Master file (DE100L12) or from the system (date and time).

b.   Write the formatted flow authorization record to the Flow Authorization file (JT100M).  If the flow authorization record already exists, continue incrementing the flow authorization number (FANO) and writing the flow authorization record until a successful write occurs.

c.   Add the flow requirements for the component parts.

(1)  The first time a flow authorization is added for a part, the Requirements Planning Product Structure Data Structure (RPPSDS) is loaded with the first level of components in the part’s bill of material.  Planning parts, non-standard parts, and reference structures are omitted (except for reference parts).  The Part Master file (DE100M) is retrieved and data stored in the data structure for each component part.  The information in the data structure is then used to format the flow requirement records.

The information is stored on a data structure to reduce the retrieval time of product structure records for component parts.  Once the data structure is initially loaded, the Product Structure file (DE120M) is accessed only for build-through parts, or if the first level of the part’s bill of material is larger than the size of the data structure (twenty-five elements).

(2)  If the part does not have a bill of material, a warning message is formatted and written to the Just-In-Time Supply Update Error file (JT540AP).  No flow requirement records are written.

(3)  If the part has a bill of material, each component is checked for effectivity.  If no components are effective, a warning message is formatted and written to the Just-In-Time Supply Update Error file (JT540AP).  Flow requirement records are not written for non-effective components.

(4)  If a component on the part’s bill of material is a build-through part (MTYPE = 6), flow requirements are generated for the build-through part’s bill of material.  If a build-through part does not have a valid component, a warning message is formatted and written to the Just-In-Time Supply Update Error file (JT540AP).

(5)  The daily demand quantity (FRDQTY or FDDQTY) of a component is calculated by multiplying the flow authorization quantity (FAQTY or SFAQTY) by the quantity of component per parent (PZQTY).  Then, the product is divided by the component scrap factor (1 - (FRSCRF - 100)).  Components of a build-through part have their demand quantities calculated by multiplying the daily demand quantity of the build-through part by the quantity of component per parent (build-through).  This product is also inflated for the component scrap factor.

A flow authorization quantity of 500 will produce a flow requirement B of 1000 (500 x 2.0) and a flow requirement D of 6000 ((500 x 3.0) x 4.0).

(6)  The daily required quantity (FRRQTY or FDRQTY) of a component is calculated setting the daily required quantity to the daily demand quantity (FRDQTY or FDDQTY).  The daily required quantity is then adjusted for scrap according to the following formula:

Daily Required Quantity

equals

Daily Demand Quantity

divided by

((1 - IC Scrap Factor) / 100)

The result is always rounded up.

(7)  If overflow occurs while calculating the daily demand quantity (FRDQTY or FDDQTY), the flow requirement is generated for the maximum quantity.  A message is written to the Just-In-Time Supply Update Error file (JT540AP).

(8)  The quantity of component per parent (FRQTYP or FDQTYP) for the components of build-through parts is computed by dividing the daily demand quantity (FRDQTY or FDDQTY) of the build-through component by the flow authorization quantity.  Using the previous example, the quantity of component per parent for the flow requirement D is 12.0 (6000 / 500).  That is to say, A to D = 12.0.

(9)  The component scrap factor (FRSCRF or FDSCRF) for the components of build-through parts is computed by dividing the work field for daily required quantity without scrap (WKRQTY) by the daily required quantity with scrap (WKRQTS).  The quotient is subtracted from one.  This number is used to format the component scrap factor on the Flow Requirement file.

(10) The flow requirement start date (FRSDTE or FDSTDT) is equal to the flow authorization start date minus the component offset days (PSOFFD).

(11) The flow requirement end date (FREDTE or FDEDTE) is equal to the flow authorization end date minus the component offset days (PSOFFD).

(12) Format the remainder of the flow requirement record fields with the corresponding fields from the Flow Authorization file (JT100M), Part Master file (DE100M), and the Product Structure file (DE120ML2).  Write the record to the Flow Requirements file (JT120M).

(13) Set the net change flag and the RP selection flag to one on the Part Master File (DE100M) to Reanalyze (PMNCFL = 1) (if RP is running in actual mode) for the component part if the net change flag or the RP selection flag is equal to zero.

f.    If more requirements exist, set the flow interval start date (FISTDT) equal to the new flow interval start date (NFISDT).  Retrieve the new next flow interval start date from the Flow Interval Start Date Array (FIA).   This process will terminate if the flow interval start date (FISTDT) is greater than the calculated RP stop date (RPSTOP).

(1)  If more start dates exist in the Flow Interval Start Date Array (FIA), initialize the necessary work fields and arrays, and process the next flow interval in the same manner as the first flow interval.

(2)  If all flow intervals have been processed and demand records still exist, format and write a critical message to the Just-In-Time Supply Update Error file (JT540AP).  If supply records still exist, format and write the Planning Action Report Detail - Supply record (RP100AP2) for each of the remaining point supply records.  Retrieve the next part from the logical Part Master file (DE100L12).  Repeat above processing for each valid part.

H.   Windup

1.   When processing is complete, the next flow authorization number is updated on the flow authorization starting number record (category C09) on the Reference file (REFERP).

2.   Control is passed back to the Requirements Planning Generation program (RP100E).  The parameters passed back are the low level code, production type, plant code, part type, and part number of the next part to be processed.

RP105E Program Menu