MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Inventory Control > Programs > Component Availability Inquiry - Purpose > Component Availability Inquiry - Calculations

Component Availability Inquiry - Calculations

IC810E

A.   Housekeeping

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

2.   The following information is retrieved from the System Control file (CT100M):

a.   The company name record (COMNAM).

b.   The potency and lot control option flags (POTOPT, LOTOPT) are retrieved from the first inventory control record (ICCTL1).  Both flags must be yes (Y) for the system to be in a potency-controlled environment. 

c.   The manufacturing (MFG2, MFG3, MFG4) and distribution (DIST2, DIST3, DIST4) availability flags are retrieved from the second Inventory Control control record (ICCTL2).  If this record is not found, a message is sent to the system operator and the program ends.

3.   The following information is retrieved from the Reference file (REFERP):

a.   Date format (category 049).

b.   Entity name (category 002).

c.   The Order Type Code Array (OTC) and Order Type Description Array (OTD) are loaded from the order types record (category 401).

d.   The Order Policy Code Array (OPC) and Order Policy Description Array (OPD) are loaded from the order policy codes record (category 404).

e.   User authorization (category 409).

f.    Default Plant (category 428).

4.   Fast Path parameters are initialized to direct processing.

B.   Function Select

1.   The Function Select screen is displayed, the user is allowed to enter a Job Number (optional; displayed only if the Job Control module is installed), Part Number (required), Horizon Date (optional), and request code (required).

2.   The job number entered is validated to ensure it is an active job for the part and that availability exists.  The Part Number entered is validated to ensure that it exists on the Part Master file (DE100M) and that the part is not inactive and  not  a reference  (MTYPN = 5) or planning (MTYPN = 4) part.  A critical error message is displayed if these conditions are not met.

3.   For non-potency controlled parts when no job number is entered on the Function Select screen, the Warehouse Balance file (IC140M) is accessed to get manufacturing and distribution warehouse balances.  If the part is inactive and no record exists, a critical error message is displayed to the user.  If the part is active and no record exists, zeros are moved into the part's quantity display fields and into the starting balances used in calculations. 

4.   For potency-controlled parts when a job number is entered for a job-controlled part, the multiple location logical by job (IC130L13) is accessed to get manufacturing and distribution warehouse balances, and these are converted into potent units, as follows below.  If the part is inactive and no record exists, a critical error message is displayed to the user.  If the part is active and no record exists, zeros are moved into the part's quantity display fields and into the starting balances used in calculations. 

a.   The part number and a company/warehouse (manufacturing or distribution or both if analyzing across all company/warehouses) are used to retrieve the appropriate records from the multiple location logical by job (IC130L13).  This process continues in a loop until all records for the part/company/warehouse are read and processed.

b.   If at least one record is found, the first multiple location balance type quantity (LLBLT1, if manufacturing warehouse, ignored for distribution) 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 part master standard potency, PMSTPT, from DE100M), yielding the equivalent potent units.  This process occurs in subroutine POTCLC, after which the potent units (POTBLQ) is added to the manufacturing and/or distribution quantity display fields. 

c.   The remaining balance type quantities (LLBLT2, LLBLT3, LLBLT4) are processed similarly to LLBLT1, and added to the manufacturing and/or distribution quantity display fields if indicated by their respective order planning codes (MOPAC2=Y, MOPAC3=Y, MOPAC4=Y, if manufacturing company/warehouse) or distribution planning codes (DSTAC2=Y, DSTAC3=Y, DSTAC4=Y, if distribution company/warehouse is available for planning, added to manufacturing quantity fields or if distribution company/warehouse is not available for planning, added to distribution quantity display fields).

5.   For potency controlled parts when a job number is not entered, the multiple location file (IC130M) is accessed to get manufacturing and distribution warehouse balances, and these are converted into potent units, as follows below.  If the part is inactive and no records exist, a critical error message is displayed to the user on the Function Select screen.  If the part is active and no records exist, zeros are moved into the part's quantity display fields and into the starting balances used in calculations. 

a.   The part number and a company/warehouse (manufacturing or distribution or both if analyzing across all company/warehouses) are used to retrieve the appropriate records from the multiple location logical (IC130M).  This process continues in a loop until all records for the part/company/warehouse are read and processed.

b.   If at least one record is found, the first multiple location balance type quantity (LLBLT1, if manufacturing warehouse, ignored for distribution) 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 part master standard potency, PMSTPT, from DE100M), yielding the equivalent potent units.  This process occurs in subroutine POTCLC, after which the potent units (POTBLQ) is added to the manufacturing and/or distribution quantity display fields. 

c.   The remaining balance type quantities (LLBLT2, LLBLT3, LLBLT4) are processed similarly to LLBLT1, and added to the manufacturing and/or distribution quantity display fields if indicated by their respective order planning codes (MOPAC2=Y, MOPAC3=Y, MOPAC4=Y, if manufacturing company/warehouse) or distribution planning codes (DSTAC2=Y, DSTAC3=Y, DSTAC4=Y, if distribution company/warehouse is available for planning, added to manufacturing quantity fields or if distribution company/warehouse is not available for planning, added to distribution quantity display fields).

6.   For non-potency controlled parts when a job number is entered, the multiple location by job logical (IC130L13) is accessed to get manufacturing and distribution warehouse balances.  If the part is inactive and no records exist, a critical error message is displayed to the user on the Function Select screen.  If the part is active and no records exist, zeros are moved into the part's quantity display fields and into the starting balances used in calculations. 

a.   If at least one record is found, the first multiple location balance quantity (LLBLT1, if a manufacturing warehouse, ignored for distribution warehouse) is added to the planning balance for the job/part combination. 

b.   The remaining balance type quantities (LLBLT2, LLBLT3, LLBLT4) are processed similarly to LLBLT1, and added to the manufacturing and/or distribution quantity display fields if indicated by their respective order planning codes (MOPAC2=Y, MOPAC3=Y, MOPAC4=Y, if manufacturing company/warehouse) or distribution planning codes (DSTAC2=Y, DSTAC3=Y, DSTAC4=Y, if distribution company/warehouse is available for planning, added to manufacturing quantity fields or if distribution company/warehouse is not available for planning, added to distribution quantity display fields).

7.   The logical Availability file (IC100ML2) is accessed to determine if any availability records exist for the part.  (The Job/Part Available Logical file (IC100L21) is accessed if a valid job number is entered.)  If none are found, a critical error message is displayed.

8.   The warehouse balance record for the part is retrieved, and header information is saved for display.  Balance quantity fields are set.

a.   If the manufacturing flag is on the allocated quantity includes quantity for MOs, TOs, SOs (WBAQMF), quantity allocated for FAs (WBFRAQ), and quantity allocated for Synchro (WBSIAQ).

(1)  The  Reserved Quantity (TOROSQ), Backordered Quantity (TOBOSQ), and On-Order Quantity (CZOOQM) are set to the corresponding values from the warehouse balance record.

(2)  The Total Balance - Mfg Qty (CZAVQM) is set to the On-Hand Balance (WBBLT1) or sum of LLBLT1 from IC130M, IC130L13 in either standard or potent units, as applies.

(3)  The manufacturing availability flags (MFG2, MFG3, MFG4) are checked.  If any of these flags is Y, the corresponding balance quantity is added to the Total Balance - Mfg Qty.

(4)  The Work-in-Process balance (WBWIPB) is added to the Total Balance - Mfg Qty.  This is only done for non-job, non-potency controlled parts, as potency controlled and/or job-controlled parts derive their balances from the multiple location files (IC130M, IC130L13).

(5)  The distribution availability flags (DST2, DST3, DST4) are checked.  If both the manufacturing and distribution flags are Y for any balance type, and if sales orders sourced from distribution inventory at the warehouse are not considered for planning, then any quantity reserved for customer orders is subtracted from the Total Balance - Mfg Qty.

(6)  If any distribution warehouses associated with the plant are available for planning (WDAVPL), then the distribution balances at those warehouses are added to the Total Balance - Mfg Qty.

b.   If the distribution flag is on:

(1)  The Reserved (TOROSQ) and Backordered (TOBOSQ) Sales Order Quantities and the On-Order Quantity (CZOOQM) are set to the corresponding values from the warehouse balance record.

(2)  The distribution availability flags are checked.  If any of these flags is Y, the corresponding balance quantity is added to the Total Balance - Dist.

(3)  The Reserved (TOROSQ) and Backordered (TOBOSQ) Sales Order Quantities are subtracted from the Total Balance - Dist to calculate the Available Quantity.

9.   The Horizon Date on Request Code are validation.  See the Inventory Control User Manual for validation rules.  If the fields are in error an error message is displayed and the field in error is highlighted.

C.   Detail

1.   Starting balances are initialized for calculation:

a.   Parts On-Hand (COMPOH) is set to the On-Hand Balance Quantity (WBBLT1).

b.   Parts Available (CMPAUL) is set to the Available for Manufacturing Quantity (CZAVQM).

2.   Before each availability record is loaded into the workfile, it is validated as follows:

Manufacturing Order Record

a.   The Order Status (HSTATS) must be firm (F) or open (O).

b.   Quantity to be Received After Scrap (QTYASC) must be greater than the Quantity Received (HTQR) on the manufacturing order.

(1)  Quantity After Scrap (QTYASC)   =   Order Quantity (HORDQ) times Scrap Factor (SCPFCT).

(2)  Scrap Factor (SCPFCT) = 1 minus (IC Scrap Factor times .01).

c.   The order date (HDUEDT) must be within the horizon period (SAVDTE).

Purchase Order Release Detail Record

a.   The Purchase Order Type must be single (S) or multiple release (B).

b.   The Order Type must not be direct ship (D).

c.   The Release Status (PDSTAT) must be open (O).  The Line Status (PDPLST) must be open (O).  The Header Status (PDPHST) must be open (O).

d.   Balance Due on Release (PDBDSK) must be greater than zero.

e.   The order date (PDRLDD) must be within the horizon period (SAVDTE).

Transfer Order Supply Record

a.   The transfer order status must be open, released, or partially shipped.

b.   The promised ship date (TLPRDT) must be within the horizon period (SAVDTE).

c.   The balance due must be greater than zero.

Component Requirement Record

a.   Component must not be canceled (MZSTC=X) or a reference component (MZTYPE=R).

b.   The Order Status (MZORST) must be firm (F) or open (O).

c.   If the Order Status is open, the Required Quantity (MZRQTY) must be greater than the Quantity Issued (MZIQTY).

d.   The Requirement date (MZCSDT) must be within horizon period (SAVDTE).

Sales or Forecast Order Line Record

a.   The line status (SLLNST) must not be closed (C).

b.   The Sales Order Planning Flag must be set to Y.

c.   The Required Quantity (SLRQTY) must be greater than the total shipped quantity.

d.   The Sales order date (SLPRDT) must be within the horizon period (SAVPTE).

Flow Authorization Record

a.   The order status must be firmed or planned (FASTAT = 'F' or 'P').

b.   Flow Authorizations are split into daily quantities.  The Daily Receipt Quantity (RCTQTY) is calculated by processing each day the Flow Authorization covers.  (See the Just-in-Time User Manual for further explanation.)

Flow Requirement Record

a.   The order status must be firmed or planned (FRFAST = 'F' or 'P').

b.   The flow type must not be reference type (FRTYPE  ¹  'R').

c.   Flow Requirements Records are split into daily quantities.  The Issued Quantity (ISSQTY) is calculated by processing each day the Flow Requirement covers (see the Just-in-Time User Manual for further explanation) the total outstanding quantity is consumed.

Transfer Order Receiving Record

a.   The transfer order status must be open, released, or partially shipped.

b.   The due date (TLDUDT) must be within the horizon period (SAVDTE).

c.   The balance due must be greater than zero.

      If no availability records are found that meet the above requirements, a critical error message is written to the select display.

3.   For each valid availability record, constants and variables are loaded into the workfile.

4.   The workfile order quantities are determined by the availability record type.

Manufacturing Order Record

a.   Work Quantity (WKDQTY)  =  Quantity After Scrap (QTYASC) minus Quantity Removed Received (HTQR)

b.   This record is a supply record (WKRTYP = 'S').

Purchase Order Release Detail Record

a.   The Work Quantity (WKDQTY) is set to the Balance Due on Release (PDBDSK).

b.   This record is a supply record (WKRTYP = 'S').

Flow Authorization Record

a.   Work Quantity (WKDQTY)  =  The flow quantity (FAQTY) - the Receipt Quantity (RCTQTY)

b.   This record is a supply record (WKRTYP = 'S').

c.   Only days with an order quantity (WKDQTY) greater than zero are processed.

Component Requirement Record

a.   Work Quantity (WKDQTY)  =  Required Quantity (MZRQTY) minus Quantity Issued (MZIQTY).

b.   This record can be a demand record (WKRTYP = 'D' or a supply record (WKRTYPE = 'S').

c.   If the Part On-Hand Quantity is less than zero, it is set to zero.

Transfer Order Supply Record

a.   Work Quantity (WKDQTY) = Order Quantity (TLORQY) minus Quantity Shipped (TLSHQY).

b.   This record is a demand record (WKRTYP = 'D') for the supplying company/warehouse.

Transfer Order Demand Record

a.   If the inquiry is for a single company/warehouse, Work Quantity (WKDQTY) = [(Order Quantity (TLORQY) minus Quantity Shipped (TLSHQY)] times Scrap Factor from Part Master file (SCPFCT).

b.   If the inquiry is for all companies/warehouses, Work Quantity (WKDQTY) = [Order Quantity (TLORQY) minus Quantity Shipped (TLSHQY)] times Scrap Factor from Part Master file (SCPFCT).  This is because any difference between the received quantity and shipped quantity will be reflected in the balance for the in-transit warehouse.

c.   This record is a supply record (WKRTYP = 'S') for the receiving company/warehouse.

Sales Order Line Record

a.   Work Quantity (WKDQTY)  =  Order Quantity (SLORQY) minus Quantity Shipped (SLSHQO).

b.   If the resulting Part On-Hand Quantity is less than zero, it is set to zero.

c.   This record is a demand record (WKRTYP = 'D').

Flow Requirement Record

a.   Work Quantity (WKDQTY)  =  The Required quantity (FRRQTY) - the issued quantity (ISSQTY).

b.   This record is a demand record (WKRTYP = 'D') for a supply record (WKRTYP='S').

c.   Only days with an order quantity (WKDQTY) greater than zero are processed.  T/O Supply:

WKDQTY  =  ORDER QTY  -  QTY SHIPPED/WKRTYP  =  'D'.

Part/Delivery Point Record

a.   Work Quantity (WKDQTY)  =  Ship Due - End Day (DPTSDU).  This work Quantity is taken into account only if a valid endorsement exists for the some company/warehouse as the one of the processed part. 

b.   If the resulting quantity is < 0, set it to 0.  Only the back order is taken into account.  The advance is already netted against the existing offset releases. 

c.   This record is a demand record (WKRTYP = 'D').

Offset Release Record

a.   Work Quantity (WRKQTY)  =  (ROQNSK) Net Quantity - SKU.

b.   This record is a demand record (WRKTYP = 'D').

5.   The subfile is loaded using display and load method of subfile processing.

a.   The detail screen that will be displayed is based on the user's request.

·     If the user requested pegged (RCODE = '1') all component availability records are displayed.

·     If the user requested daily summary (RCODE = '2') component availability records are summarized on a daily basis.

·     If the user requested Weekly Summary (RCODE = '3') component availability records are summarized on a weekly basis.

b.   Time phased analysis is performed on each record to determine display field balances.

(1)  If the record is a demand Record (either MFG Order, Purchase Order, or Flow Authorization)

The part availability Quantity (CMPAUL) is incremented by the order quantity (CZOCQ).

(2)  If the record is a demand record (either Component Requirement, Sales order, or Flow Requirement),

·     The part availability Quantity (CMPAUL) is decreased by the order quantity (CZOCQ).

·     The Original Part Availability Quantity (CMPACD) is decreased by the order quantity (CZOCQ).

·     If the part on hand quantity (COMPOH) is not less than zero, it is decreased by the order quantity (CZOCQ).

6.   After available and on-hand balances are calculated, the Shortage Code (SHRTCD) is set to one of the following values:

a.   H    Indicates that the On-Hand Balance (COMPOH) has gone negative due to a component issue or customer sales order.  Manufacturing order and purchase order receipts do not affect the On-Hand Balance during time phasing.  The H remains for subsequent availability records in the subfile.

b.   H/T Indicates that the Original Part Availability Quantity (CMPACD) has gone negative due to a component issue or customer sales order.  Manufacturing order and purchase order receipts do not affect the Original Part Availability Quantity during time phasing.  The H/T remains for subsequent availability records in the subfile.

c.   H/T/O     Indicates that an issue has reduced the Part Availability Quantity (CMPAVL) to a negative value.  This Part Availability field accumulates both issues and receipts.  The O portion will appear and disappear as the balance changes between a negative (on) and positive (off) value.

7.   When all availability records have been processed, the detail screen is displayed.  If there are more availability records available for display, they will appear on another screen.  The user can scroll forward or backward to view them.

IC810E Program Menu