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

Master Schedule Available to Promise Inquiry - Calculations

MS830E

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 (MOPAC1, MOPAC2, MOPAC3, MOPAC4) and distribution (DSTAC2, DSTAC3, DSTAC4) 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 fence is retrieved from the Master Scheduling System Defaults record (category 464) and saved.  If these are not found, zero is used.

c.   The workstation assignment record is retrieved (category 409) for use in checking whether the user is authorized to a plant.

d.   The default plant for the workstation is retrieved from category 428.

e.   Production type codes are retrieved from category C01.

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

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

h.   The applications installed record (category 012) is used to determine if Shop Floor, Synchro, EDI, and Future 3 interface modules are installed.

i.    If EDI module or Future 3 interface module is installed, the four EDI demand types are retrieved (category D26) and saved for later use.

6.   If the program is called to calculate the promised ship date, the period option is set to weeks and the order quantity is retrieved from the fast path data structure.

7.   Date arrays are set up and starting days are determined.

a.   The planning period start dates are retrieved from the Planning Period Definition file (MS025M) and loaded into arrays, one for the standard master scheduling planning periods and one for the daily master scheduling planning periods.

b.   Week start dates from the Week Start Date file (CT140ML1) are loaded into an array.

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

B.   Function Select (performed only if program is called to display inquiry rather than calculate promised ship date).

1.   The select screen is displayed and validated.  For validation information, refer to the Master Scheduling User Manual

2.   For the plant specified on the select screen:

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 mask are 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.

C.   Detail

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

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

3.   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 Planning Balance.

c.   For the manufacturing warehouse, for balance types 2, 3, and 4, if the Order Planning flag on the balance type is Y, the quantity (WBBLT2, WBBLT3, or WBBLT4) is added to the Planning Balance.   If this flag is N, the quantity is added to the Non-Planning Balance.

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 Planning Balance.

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 Planning Balance.

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. 

4.   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 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 Planning Balance.  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 Planning Balance in potent units.

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

5.   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 unconsumed  demand.

6.   The logical Availability file (IC100L19) is accessed for each part.  All purchase orders, purchase requisitions, manufacturing orders, customer orders, transfer orders, transfer requisitions, offset releases, 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).

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

 

(6)  For a demand  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

 

If the consumption code for the part is 1 or 3 and the transfer order is planned, then the transfer order will be consumed against forecast.  Transfer orders that are unplanned are added to the demand that has been netted.

(7)  For a supply  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

 

(8)  For an offset release that is not closed,

CONSUMED OR UNCONSUMED DEMAND

=

NET QUANTITY

 

Consumed, unconsumed, planned, and unplanned are defined as follows.  Consumed demand depends on the value of the consumption code, which is found on the Part Master file. 

CONSUMPTION CODE

 

VALUE

0

 

No consumption

1

 

Planned sales orders, transfer orders, transfer requisitions, and Synchro offset releases

2

 

Component requirements and flow requirements

3

 

All requirements found under codes 1 and 2.

 

Planned sales orders, transfer orders, and transfer requisitions are those that are considered to satisfy projected demand (forecast).  They are entered with a Planned/Unplanned Code of 'P' through the corresponding maintenance conversations.  (Synchro delivery requests are always planned.)  Sales orders are only included in this quantity if they will be relieved from manufacturing inventory or if they will be relieved from distribution inventory at the manufacturing warehouse and the Sales Order Planning flag (on the Warehouse Description file) for this manufacturing warehouse is Yes.

Unconsumed demand varies depending on the value of the consumption code.

CONSUMPTION CODE

 

VALUE

0

 

All requirements listed for consumption codes 1 and 2

1

 

Component requirements and flow requirements

2

 

Planned sales orders, transfer orders, transfer requisitions, and Synchro offset releases

3

 

No requirements (All requirements in consumption codes 1 and 2 are consumed.)

 

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

8.   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 times QUANTITY PER)

minus

FORECAST AND CUSTOMER ORDER SHIPPED QUANTITY

 

The demand type is compared to the four EDI demand types.  EDI demand is accumulated separately from projected demand so that it may be added to net demand.

9.   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 unconsumed projected demand and consumed 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

                           

 

10.  If the program is called to display the inquiry, the calculations are written to the detail screen (MS830S02).

11.  If the program is called to calculate the promised ship date, the order quantity passed from the calling program is compared to the cumulative available to promise quantity for each period.  The program determines the first period where the cumulative ATP is greater than or equal to the order quantity.  The date corresponding to this period is moved into the promised ship date field (FPCPN) and returned to OP100E. 

      If the order can be filled in the current period, or if none of the periods have enough inventory to cover the order, the promised ship date field is formatted with blanks.  When a blank field is returned, OP100E will use a default ship date.