MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Master Scheduling > Programs > Master Schedule Available to Promise Report - Purpose > Master Schedule Available to Promise Report - Calculations

Master Schedule Available to Promise Report - Calculations

MS530E

A.   Housekeeping

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

2.   Key lists are defined for each keyed file the program retrieves.

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

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

a.   The potency control and lot control options (POTOPT, LOTOPT) are retrieved from the first Inventory Control control record (ICCTL1).  If both flags are set to yes (Y), then the system is considered to be in a potency controlled environment. 

b.   The warehouse balances available for manufacturing and distribution are retrieved from the second Inventory Control control record (ICCTL2).

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

a.   The date format is retrieved from the date format record (category 049).

b.   The standard and daily  demand fences are retrieved from the Master Scheduling System Defaults record (category 464) and saved.  If these are not found, zero is used.

c.   Production type codes are retrieved from category C01.

d.   Part type codes and descriptions are retrieved from the part type codes record (category 405) and loaded into arrays.  If this record is not found, blanks are used.

e.   Order policy codes and descriptions are retrieved from the order policy codes record (category 404) and loaded into arrays.  If this record is not found, blanks are used.

f.    The applications installed record (category 012) is accessed to determine if Synchro, EDI, and Future 3 are installed.  These flags are saved.

g.   If the EDI or Future 3 module is installed, demand types are retrieved from category D26.

h.   The number of decimals is retrieved from category 446 for formatting reports.

6.   A prime read is performed on the Master Scheduling Report Request file (MS310AP).  If no records are found, an error message is written on the Available to Promise report, and processing ends.

B.   Mainline

1.   The Master Scheduling Report Request file (MS310AP) is read in key sequence for records with a transaction code (CZTRAN) equal to R30 (Available to Promise Report Request).

2.   For each new plant:

a.   The company and location associated with the plant are retrieved from the Warehouse Description file (IC170ML2). 

b.   The company and location names are retrieved from Reference File category 002.

c.   The daily and standard master scheduling planning masks retrieved from the Planning Period Definition file (MS025M).

d.   The demand fence date is calculated by calling MS090E (Planning Horizon Date Calculation).  The standard  demand fence and the demand fence code are passed for standard master scheduled parts.  The daily demand fence and the demand fence code are passed for daily master scheduled parts. 

e.   Week start dates from the Week Start Date file (CT140ML1) are loaded into an array, based on the plant's calendar code.

f.    The current week start date, current month start date and current period start date are determined and saved.

3.   If a printer was specified on the report request, the command outqueue is set to the requested output queue.

4.   For each request found, the Print Part Option (CRPOPT) is determined.  This option can be:

1 - by week

2 - by month

3 - by planning period mask

4 - daily intervals

If option 3 was selected and no planning period mask was previously set up, an error message is written and the next record from the Master Scheduling Report Request file (MS310AP) is read.  The begin date for the demand fence is determined from the print part option (CRPOPT).

5.   The Horizon Date (CRHZDT) is checked to ensure it is not greater than the last date on the calendar file (MCALDT).  If it is, the last date on the calendar file (MCALDT) is used as the default horizon date.

6.   The Request Option (CRQOPT) is determined.  It can be either:

a.   A full request (CRQOPT = F); in this case, the logical Part Master file (DE100L13) is read sequentially; or

b.   A request by planner (CRQOPT = P); in this case, the logical Part Master file (DE100L13) is read for a selected planner (analyst).

7.   Initial processing for the part is started (subroutine STRPRT).

a.   Part Master fields are saved for printing on the report header.

b.   The planning period data structure, past activity, and the print arrays are initialized.

8.   A data structure of parent parts for each part is created to speed up processing and reduce the number of input/output operations.

a.   The Product Structure Where-Used file (DE120ML) is read keyed by component part.

b.   If a parent record is found, the Part Master file (DE100M) is accessed to determine the part type.  The part type is used to determine where the part's demand can be found.  If the parent part is not a planning part, it is ignored.  For planning parts, the indirect demand will come from the forecast file.

c.   Accepted parent parts are built into the data structure.  If the number of parents exceeds the maximum size of the data structure (30), an error message is written to the system operator and processing continues.

9.   Past due supply (PASTDS) and past due demand (PASTDD) are calculated.

a.   The Availability file (IC100L19) is read to determine all customer orders, manufacturing orders, purchase orders, purchase requisitions, transfer orders, transfer requisitions, component requirements, and offset releases for the part.  These orders are included only if

·     They are not closed or planned for standard master scheduled parts.

·     They are not closed or planned for daily master scheduled parts.

·     The due date is before the current forecast start date.

·     They affect the manufacturing warehouse.

·     They have a manufacturing relief code.

The past due demand/supply quantity for each order is calculated by subtracting the quantity received/shipped from the original quantity requested.  The quantity for purchase orders, transfer orders, and transfer requisitions is adjusted by multiplying the remaining quantity by the scrap factor.  The quantity for manufacturing orders is adjusted in the same way if Shop Floor is not installed.  If Shop Floor is installed, the actual reported scrap is also calculated, and the lesser of the two values is used.

b.   The Component Availability file (IC100L23) is read to determine all open flow authorizations and flow requirements for the part that begin before the current date.  If a flow authorization spans past and current periods, it is split and only the remaining quantity from the past period is included in the past due amount.  The past due quantity is calculated by subtracting the quantity received/issued from the original quantity requested.

10.  For non-potency controlled parts, the Warehouse Balance file (IC140M) is accessed for each part record read to retrieve balance quantities.  These quantities are printed as part of the report heading.  The Planning Balance is  calculated as follows:

a.   The first balance type (on-hand) field (WBBLT1) on the Warehouse Balance file is added to the Planning Balance.

b.   The JIT work-in-process balance is added to the total available for planning.

c.   For the manufacturing warehouse, for balance types 2, 3, and 4, if the Order Planning flag (MOPACX, where X = 2, 3, or 4) on the balance type is Y, the quantity (WBBLTX, where X = 2, 3, or 4) is added to the total available for planning.

d.   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.

e.   For every distribution warehouse associated with the plant, the Warehouse Description file is read to determine if balances at the warehouse are available for planning.  If so, any distribution balance at the warehouse is added to the total.

f.    For JIT parts, the inventory netting flag is checked.  If the flag is set to yes (PMNETF = Y), the warehouse balance file quantities are retrieved and totaled.  If the flag is set to no (PMNETF = N), the warehouse balance file quantities are ignored, and the balances are set to zero, and a warning message to this effect is printed. 

11.  For potency controlled parts, the multiple location logical file (IC130ML6) is accessed for all location records for the part in the warehouse.  These quantities are printed as part of the report heading.  The potent planning balance is calculated as follows: 

a.   For the manufacturing warehouse, if the order planning flag (MOPAC2, MOPAC3, MOPAC4) on the balance type (LLBLT2, LLBLT3, LLBLT4) is Y for each multiple location record read, the quantity is converted into potent units and added to the total.  Potent units for each applicable balance type are calculated by multiplying 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, SVSTFT, from DE100M) by the balance type quantity, yielding the equivalent potent units.  This process occurs in subroutine POTCLC, after which the equivalent potent units (POTBLQ) is added to the current inventory balance.

b.   Since the multiple location file does not have a work-in-process balance quantity (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. 

c.   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.  For potency controlled parts, the inventory reserved quantity for customer and transfer order lines (WBRSOQ) is subtracted from the aforementioned total at Standard Potency (i.e. stock keeping, not potent, units) because not all of the warehouse balance reserved quantity (WBRSOQ) will necessarily also be reserved at the multiple location file level (WBRSOQ = LLRSV2 + LLRSV3 + LLRSV4, from IC130ML6). 

d.   For every distribution warehouse associated with the plant, the Warehouse Description file is read to determine if balances at the warehouse are available for planning.  If so, any distribution balance at the warehouse is added to the total in potent units. 

e.   For potency controlled JIT parts, the inventory netting flag is checked.  If the flag is set to yes (PMNETF = Y), the multiple location file quantities are processed and converted to potent units.  If the flag is set to no (PMNETF = N), the multiple location file quantities are not processed, and the balance is set to zero, and a warning message to this effect is printed. 

12.  Once the beginning Planning Balance has been determined, this quantity is used as the initial projected available quantity.  For the first period, the in-process shipments for Synchro are calculated and added to the dependent demand.

13.  The logical Availability file (IC100L19) is accessed for each part.  All purchase orders, purchase requisitions, offset releases, manufacturing orders, customer orders, transfer orders, transfer requisitions, and component requirements associated with the part are retrieved.  (Note that a customer order is included only if the planning flag for the order is Y.  This flag is set to Y for orders that are sourced from manufacturing inventory or that are sourced from distribution inventory at a manufacturing warehouse where the Sales Order Planning Flag = Yes). 

The Part/Delivery file (GA120MLF) is also accessed to determine demand at the delivery point.

a.   As each order, requirement or requisition is read, it is placed in a time period bucket associated with the due date for that order or requirement. 

b.   Once the time period is established, each order or requirement is processed depending on its type:

(1)  For a manufacturing order that is not closed, accounting closed, or planned, the scrap factor is multiplied by the order quantity minus the quantity received to determine the expected yield on the order.  The total is added to the Current Schedule quantity. 

CURRENT SCHEDULE

=

(ORDER QUANTITY - QUANTITY RECEIVED)

times

SCRAP FACTOR from the Part Master File

 

If the Shop Floor Control module is installed, the current schedule is calculated once with the scrap factor from the Part Master file and once with the actual scrap factor.  The program will then use the lesser of the two quantities.

(2)  For a purchase order originating from the manufacturing company and warehouse, the purchase order release balance due, deflated by the scrap factor, is added to the Current Schedule quantity.  Phantom orders are not considered.

CURRENT SCHEDULE

=

PO RELEASE BALANCE DUE

minus

(PO ORDER QUANTITY -  RELEASE BALANCE DUE)

times

SCRAP FACTOR

 

(3)  For a requisition originating from the manufacturing company and warehouse, the Uncovered Quantity, adjusted for scrap, is added to the Current Schedule Quantity.

CURRENT SCHEDULE

=

(REQUISITION QUANTITY x SCRAP FACTOR)

times

COVERED QUANTITY

 

(4)  For a component requirement, the issued quantity is subtracted from the required quantity.  The result is added to the unconsumed or consumed quantity if the usage code is consumed.  If the usage code is produced, it is added to the current schedule.

UNCONSUMED OR CONSUMED

=

REQUIRED QUANTITY

minus

ISSUED QUANTITY

 

(5)  For a planned customer order, the sales order quantity less the quantity shipped is added to the consumed or unconsumed quantity.

CONSUMED OR UNCONSUMED

=

SALES ORDER QUANTITY

minus

QUANTITY SHIPPED

 

For an unplanned customer order, the order quantity less the quantity shipped is added to the Unplanned Customer Order quantity.

UNPLANNED CUSTOMER ORDERS

=

SALES ORDER QUANTITY

minus

QUANTITY SHIPPED

 

Note that a customer order is included only if the planning flag on the order is Y.  This flag is set to Y for orders that are sourced from manufacturing inventory or that are sourced from distribution inventory at a manufacturing warehouse where the Sales Order Planning Flag = Yes.

(6)  For an offset release that is not closed, add demand to planned demand accumulator.

CONSUMABLE OR UNCONSUMABLE DEMAND

=

OFFSET RELEASE
NET QUANTITY

 

(7)  For a supply transfer order that is not canceled, and that is for a manufacturing company/warehouse with a relief code of manufacturing,

DEPENDENT DEMAND

=

TRANSFER ORDER QUANTITY

minus

QUANTITY SHIPPED

 

(8)  For a demand transfer order that is not covered or planned, and that has a relief code of manufacturing:

CURRENT SCHEDULE

=

 

TRANSFER ORDER QUANTITY

minus

QUANTITY RECEIVED

 

times

SCRAP FACTOR

 

14.  The availability file (IC100L23) is a logical view of flow authorizations (JT100M) and flow requirements (JT120M), that is processed in two steps.

a.   The first step processes FAs and FRs up to and including today.  Any flow that has an outstanding balance on the current day are accumulated in a work field that is used to initialize the accumulators in the future processing (step b).  FAs are added to the Current Schedule.  FRs are added to the consumed or unconsumed demand.

b.   The second step initializes accumulators with the work field that contains the outstanding quantity on the current day, then accumulates outstanding flow quantities.

15.  The Projected Demand file (MS150ML1) is accessed for each part according to the effectivity date.  It is also accessed for every planning parent associated with the part, whose where-used information has been already stored in the planning parent part data structure (PLANDS).  The forecast quantity for the period is multiplied by the part's quantity per, and any customer orders shipped or forecast shipped are subtracted to provide the Projected Demand quantity.  This quantity represents the unfulfilled projected demand.  (Note that a customer order is included only if the planning flag for the order is Y.  This flag is set to Y for orders that are sourced from manufacturing inventory or that are sourced from distribution inventory at a manufacturing warehouse where the Sales Order Planning Flag = Yes). 

PROJECTED DEMAND

=

(FORECAST QUANTITY x QUANTITY PER)

minus

FORECAST AND CUSTOMER ORDER SHIPPED QUANTITY

16.  After the orders and requirements have been processed for a part, the remaining quantities are calculated for the report:

a.  

NET DEMAND

=

The greater of projected demand and consumable demand

b.  

TOTAL DEMAND

=

NET DEMAND

plus

UN-PLANNED CUSTOMER ORDERS

plus

UNCONSUMED DEMAND

minus

DEMAND ISSUES

plus

EDI DEMAND

c.  

PROJECTED AVAILABLE

=

CURRENT SCHEDULE

minus

TOTAL DEMAND

plus

PREVIOUS PROJECTED AVAILABLE

d.  

UNCONSUMED PROJECTED DEMAND

=

PROJECTED DEMAND

minus

 

SHIPPED/
ISSUED
CONSUMED DEMAND

plus

FORECAST SHIPPED

 

e.   If the Unconsumed Projected Demand is greater than consumed demand, and if the period start date is greater than or equal to the demand fence date, then:

 

ATP

=

PROJECTED AVAILABLE

plus

UNCONSUMED PROJECTED DEMAND

minus

CONSUMED DEMAND

 

 

 

 

 

 

 

                 

Otherwise (inside the demand fence)

ATP

=

PROJECTED AVAILABLE

f.

CUMULATIVE AVAILABLE TO PROMISE

=

PREVIOUS CUMULATIVE AVAILABLE TO PROMISE

plus

PRESENT AVAILABLE TO PROMISE

17.  The Available to Promise report (MS530) is formatted and the detail lines are printed.