Documentation >
MAC-PAC Technical Library >
Manufacturing >
Inventory Control >
Programs >
Manufacturing Order Post - Purpose >
Manufacturing Order Post - Calculations
Manufacturing Order Post - Calculations
IC102E
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 company name (COMNAM) is retrieved from the System Control file (CT100M).
3. The date format (category 049) and decimal field precision (category 446) records are retrieved from the Reference file (REFERP). The applications installed record (category 012) is retrieved to determine whether the Shop Floor Control and Capacity Planning modules are installed.
4. Parameters used by the Manufacturing Order Generation program are:
PASSED FROM CALLING PROGRAMS:
|
|
|
|
|
|
|
PGMSTC
|
Program Status Code. Used to identify the calling program.
|
X
(AS1)
|
X
(AS2)
|
X
(AS3)
|
X
(AS4)
|
X
(AS1)
|
WRKSID
|
Workstation ID. Used to identify the workstation of the calling program. The completion message is sent to the user at this workstation.
|
X
|
X
|
X
|
X
|
|
CZORNO
|
Transaction Order Number. Used to identify async transaction records to be processed.
|
X
|
|
X
|
X
|
X
|
JOBNUM
|
Job Number from calling program. Used to identify transaction records in IC200AP1.
|
|
X
|
|
|
X
|
TRANID
|
Transaction ID. Used to identify transaction records in IC200AP1.
|
|
X
|
|
|
X
|
DATENT
|
Date Entered. Used to identify transaction records in IC200AP1.
|
|
X
|
X
|
|
X
|
TIMENT
|
Time Entered. Used for the same purposes as DATENT above.
|
|
X
|
X
|
|
X
|
RCODE
|
Request Code. Used to identify the shop paperwork option to be updated on the Manufacturing Order File.
|
|
|
X
|
|
X
|
ABTFLG
|
Abort Flag. Used to identify aborts in the program.
|
|
|
|
|
X
|
INFORMATION PASSED BETWEEN PROGRAM CALLED (IC104E) AND IC102E:
|
|
|
|
CZJOB
|
Job Number
|
X
|
|
CZORNO
|
Transaction Order Number
|
|
X
|
CZPPN
|
Transaction Part Number
|
|
X
|
CZORDQ
|
Transaction Order Quantity
|
X
|
|
CZSTDT
|
Transaction Start Date
|
|
X
|
TRANMD
|
Transaction Mode
|
|
X
|
CRGEN
|
Component Requirement Generation Return Code
|
|
X
|
ERRCDE
|
Error Code from IC104E processing
|
|
X
|
CZHIQP
|
Transaction High Quantity Per value, calculated by IC104E
|
|
X
|
5. If the Shop Floor Control application is installed, additional processing is performed as follows:
a. The process definition control record (MECTL1) is retrieved for identification of the piece rate standard, PRSTD.
b. The shop floor control record (SFCTL1) is retrieved for identification of:
SFMVRC - Automatic move-receive flag
SFPALR - Maintain alternate LR flag
SFPCLR - Maintain comments for LR flag
c. Work fields and program constants are initialized.
d. The following information is passed between the called program (SF106E) and IC102E:
|
|
|
|
SHDRCH
|
Generate or reschedule flag
|
X
|
|
CZFBSC
|
Forward/backward schedule flag
|
X
|
|
LRORNO
|
LR transaction order number
|
X
|
|
CZPPN
|
Transaction parent part number
|
X
|
|
CZORDQ
|
Transaction order quantity
|
X
|
|
STDT
|
Date from which to end/commence scheduling LR's
|
X
|
X
|
EFDT
|
Effectivity checking date
|
X
|
|
NOLRS
|
"L/R async. records exist" return code
|
|
X
|
SLERR
|
Any control error code from SF106E processing
|
|
X
|
ERRCDE
|
Any abort error code from SF106E processing
|
|
X
|
LRGEN
|
Labor requirements generation return code
|
|
X
|
ERROR
|
Error flag from SF106E processing
|
|
X
|
6. The company/location associated with the warehouse is retrieved from the Warehouse Description file (IC170M). The value-added tax flag for that company/location is then retrieved from the location defaults record (category 132) on the Reference file (REFERP).
7. If Capacity Planning is installed, the Open Order Load Option (CPODFG) is moved to a saved field (LDOOPT).
B. Mainline
Transactions from Manufacturing Order Maintenance (IC100E) and Manufacturing Configuration (EC200E).
Maintenance performed by the user in the Manufacturing Order Maintenance program (IC100E) results in the posting of transactions to the files IC100AP1 and IC100AP2. Transactions are also added to these files by the manufacturing configuration when a sales order is added for a manufacturing configured part whose reserved quantity is 0.
Manufacturing order transactions are contained in IC100AP1. These transactions may also cause maintenance to be performed on individual component requirements and labor requirements as well, depending on the order fields changed. A manufacturing order transaction record is generated for all valid maintenance activities performed by the user in the Manufacturing Order Maintenance program--adding an order, changing an order, releasing an order, firming a planned order, canceling an order, closing an open order, and reopening a closed order.
Component requirement transactions are contained in IC100AP2. The user may add, change, cancel, or reinstate component requirements for orders that are added, changed, released, or firmed. The user may not modify component requirements if the order is canceled, closed, or reopened. An application lock record is written for order maintenance to prevent intervening updates in the Manufacturing Order Maintenance program. The application locking record is a component requirement asynchronous transaction record written to IC100AP2 by the Manufacturing Order Maintenance program, which has the transaction number (CZORNO) as the order number and all nines in the Component Part Number (CZCPN) and Usage Code (CZUSCD) fields.
The following activities are performed in sequence for each type of order maintenance performed by the user in the Manufacturing Order Maintenance program and the Manufacturing Configuration program.
|
|
|
Add An Order
(from IC100E and EC200E)
|
A20
|
1. The manufacturing asynchronous transaction is retrieved from the transaction file (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The transaction is checked to determine whether component requirements were generated for the order during the Manufacturing Order Maintenance program (IC100E). All manufacturing orders, except rework orders, must have component requirement records.
|
|
|
If component requirements were not generated in the Manufacturing Order Maintenance program (CRPRES = 0 on the manufacturing order transaction) and the order being added is not a rework (CZTYPE R), the Component Requirements Generation program (IC104E) is called. This program writes component requirement add transactions (CZTRAN = C20) to the transaction file IC100AP2 and sends a successful completion message to this program. If no component requirements are added for the order or if there are no true components (i.e., all components are reference parts), an error is generated (MPC0009), a transaction register record is written to the Transaction Register Error File (IC100CP1), an error record is written to the Transaction Register Error File (IC505AP), an unsuccessful completion message (MPW0062) is displayed to the user, and processing for the order stops.
|
|
|
3. If Shop Floor Control is installed and Capacity Planning is not installed, the Labor Requirements Asynchronous program (SF106E) is called if the user requested Labor Requirements (LR). SF106E writes labor requirements add transactions (CZTRAN = L120) to the transaction file (IC100AP3). If the generation was unsuccessful, an error is generated and an error record is written to IC505AP. If either component requirement or labor requirement generation was unsuccessful, a "partial" maintenance (MPW0061) completion message is sent to the user. If LR generation was successful, master roll-up processing is performed. This connects the active operations to any master operations on the routing.
|
|
|
If Shop Floor and Capacity Planning are installed, and if the order status is planned, the capacity planning schedule flag is set to Y. Planned labor requirements will be generated for the order by the Capacity Planning Labor Requirements Generation program (CP100E). If Shop Floor is not installed, Capacity Planning is installed, and the Load Open Orders Option (LDOOPT) is set to Y, planned labor requirements will be generated for the order by the Capacity Planning Labor Requirements Generation program (CP100E). This processing is performed regardless of the order status. The capacity planning schedule flag (HCPFLG) is set to Y.
|
|
|
If the Load Open Orders Option (LDOOPT) is set to N, labor requirements will be generated for only firmed and planned orders by the Capacity Planning Labor Requirements Generation program (CP100E). The capacity planning schedule flag (HCPFLG) is set to Y if the order status is firmed or planned.
|
|
|
4. The Warehouse Balance record is read for updates.
|
|
|
5. The Part Master record is read for updates.
|
|
|
6. The Order Part (CZPPN) is validated. If the part is invalid, an error is generated (MPC0003 if the part is inactive or MPC0016 if the part is not a manufacturing, build-thru or transfer part), a transaction register record is written to IC100CP1, a transaction error record is written to the Transaction Register Error File, all transactions for the order are deleted from the Asynchronous Transaction Files, a message (MPW0062) is displayed to the user, and processing for the order stops.
|
|
|
In a job-controlled environment, the job number is validated (CZJOB). If the job is retrieved successfully, the job status is checked. An M.O. cannot be associated with a job that has a status of C (closed) or Z (costing closed). Online processing in IC100E prevents the addition of an M.O. associated with a closed job. Therefore, the batch update program (IC102E) only checks that the job has not been costing closed. If the job has been costing closed, an error (MPC3680) is generated and the Job Master File (JC100M) is released.
|
|
|
Note: For all other options (2-7), job number is display only.
|
|
|
If the part is configuration coded and the Expert Configurator is installed, the configuration code is validated.
|
|
|
7. The manufacturing order record is formatted from the transaction fields on IC100AP1 and added to the Manufacturing Order File (IC100M).
|
|
|
If the status of the added order was open (HSTATS=O), the print flags for the order are set, based on the Shop Paperwork Option (HSPO) specified.
|
|
|
a. If HSPO = N (neither) - no change
|
|
|
b. If HSPO = B (both) - HMOPF and HPLPF are set to 1
|
|
|
c. If HSPO = P (pick list) - HPLPF is set to 1
|
|
|
d. If HSPO = M (manufacturing order) - HMOPF is set to 1
|
|
|
A program flag is also set on. This flag causes the shop paperwork pending flag on the Inventory Control control record (ICCTL1) on the System Control File (CT100M) to be set on during the windup processing of this program.
|
|
|
If the manufacturing order record cannot be added to the file, a system abort (ABT0041) occurs.
|
|
|
8. The manufacturing order record just added is read for update to lock it during the remaining processing for the order. If it cannot be read for update, a system abort (ABT0041) occurs.
|
|
|
9. Two internally maintained manufacturing order fields are modified: the Last Activity Date field (HDTLA) and the High Quantity Per field (HZHIQP).
|
|
|
If the current System Date is greater than the last Activity Date, the current System Date is moved to the last Activity Date. If the Transaction High Quantity Per field (CZHIQP) is greater than the manufacturing order record value (HZHIQP), the transaction value is moved to the Manufacturing Order Record field.
|
|
|
10. The Warehouse Balance File Record is updated for the order part. The adjustment quantity is calculated as follows:
|
|
|
a. If order status is open (HSTATS=O) or firm (HSTATS=F)
|
|
|
ADJQTY = ADJQTY minus HORDQ (order quantity)
|
|
|
b. Otherwise
|
|
|
ADJQTY = ZERO
|
|
|
11. The Part Master record is updated for the order part.
|
|
|
12. The Component Requirement records for the order are added.
|
|
|
If labor requirements were generated, they are posted to the Labor Requirements Master File (see Post Labor Requirements under Windup).
|
|
|
13. The order record is updated on the Manufacturing Order File to reflect any code (HCMRCD) and/or high quantity per (HZHIQP). If the order was added without any component requirement records (a rework order) the manufacturing order record is released unchanged.
|
|
|
14. An audit trail record for the order is written to IC100BP1.
|
|
|
15. A transaction register record for the order is written to IC100CP1.
|
|
|
16. The asynchronous transaction records for the order are deleted from the Asynchronous Transaction Files. Component requirement, labor requirement and manufacturing order asynchronous transactions are deleted including the application lock record.
|
|
|
17. A completion message, either successful (MPW0060) or partial (MPW0061), is sent to the user.
|
Change an Order
(from IC100E)
|
A25
|
1. The manufacturing order asynchronous transaction is retrieved from the transaction file (IC100AP1). If no asynchronous transaction record for the order is found, the program ends and no error is produced.
|
|
|
2. The Manufacturing Order record is read for update.
|
|
|
3. The Warehouse Balance record for the order part is read for update.
|
|
|
4. The Part Master record for the order part is read for update.
|
|
|
5. Changes to the manufacturing order fields are processed. The following fields may be modified:
|
|
|
|
|
|
HORDQ
|
Order Quantity
|
|
|
HSTDT
|
Start Date
|
|
|
HDUEDT
|
Due Date
|
|
|
HDESC
|
Manufacturing Order Description
|
|
|
HBAC
|
Buyer/Analyst Code
|
|
|
HSPO
|
Shop Paperwork Option
|
|
|
HSFBSC
|
Forward/backward schedule flag
|
|
|
HZCFGC
|
Configuration Code
|
|
|
HLRS
|
Order has LR's flag (HLRS)
|
|
|
|
6. Two internally maintained manufacturing order fields are updated: the last Activity Date field (HDTLA) and the High Quantity Per field (HZHIQP). The last activity date is updated with the current system date if the current date is greater than the last activity date. The high quantity per is updated with the transaction high quantity per (CAHIQP) if the transaction value is greater.
|
|
|
7. The record on the Warehouse Balance File (IC140M) for the order part is updated. The adjustment quantity (ADJQTY) is calculated as follows:
|
|
|
For firm or open orders:
|
|
|
a. OLDBAL =PZORDQ minus HTQR
(previous order quantity less receipts)
|
|
|
NEWBAL = HORDQ minus HTQR
(current order quantity less receipts)
|
|
|
b. If NEWBAL and OLDBAL are greater than or equal to zero:
ADJQTY = NEWBAL minus OLDBAL
|
|
|
c. If NEWBAL and OLDBAL are less than zero: ADJQTY = zero
|
|
|
d. If NEWBAL is greater than or equal to zero and OLDBAL is less than zero: ADJQTY = NEWBAL
|
|
|
e. If NEWBAL is less than zero and OLDBAL is greater than or equal to zero: ADJQTY = (-1) times OLDBAL
|
|
|
f. Otherwise
ADJQTY = zero
|
|
|
8. The date of the last transaction for this Warehouse Balance record is replaced by the current system date if the current date is greater.
|
|
|
9. The Part Master net change flag is updated.
|
|
|
10. When a manufacturing order is changed, individual component requirements may be added (CZTRAN = C20), changed (CZTRAN = C25), canceled (which is treated as a change, CZTRAN =C25). In addition, all component requirements (CR's) may be affected by certain changes to the manufacturing order fields.
|
|
|
|
Update All CR's
|
|
HORDQ
|
Order Quantity
|
YES
|
|
HSTDT
|
Start Date
|
YES
|
|
HDUEDT
|
Due Date (change to later)
|
YES
|
|
HDUEDT
|
Due Date (change earlier)
|
NO
|
|
HDESC
|
Manufacturing Order Description
|
NO
|
|
HBAC
|
Buyer/Analyst Code
|
NO
|
|
HSPO
|
Shop Paperwork Option
|
NO
|
|
HSFBSC
|
Forward/Backward Schedule Flag
|
NO
|
|
HZCFGC
|
Configuration Code
|
NO
|
|
HLRS
|
Order has LR's flag
|
YES
|
|
|
Processing of the component requirements for the order proceeds in one of the two ways described below.
|
|
|
a. Update all component requirements--all components for the order are read sequentially and updated. As each record is read, the Component Requirement Asynchronous Transaction File (IC100AL) is also checked for additional records to be processed along with the maintenance required by the order change.
|
|
|
b. Post individual component requirements--each record is read from the Component Requirement Asynchronous Transaction File (IC100AL) and posted to the Component Requirements File (IC120M) in sequence of the transactions.
|
|
|
When a manufacturing order is changed, labor requirements for the order may be affected.
|
|
|
If Shop Floor Control and Capacity Planning are installed, labor requirements for firmed and released orders are generated by Shop Floor Control. Labor requirements for planned orders are generated by Capacity Planning.
|
|
|
If Shop Floor Control is not installed and Capacity Planning is installed, and if the Load Open Orders Option on the Capacity Planning control record (CPCTL1) on the System Control File is set to Y, Capacity Planning generates labor requirements for released, firmed, and planned orders.
|
|
|
If the Load Open Orders Option on the Capacity Planning control record (CPCTL1) on the System Control File is set to N, Capacity Planning generates labor requirements for only firmed and planned orders.
|
|
|
If Shop Floor Control is installed and Capacity Planning is not installed, the following conditions cause rescheduling of labor requirements:
|
|
|
Forward scheduling (CZFBSC = F)
· Due date is blank, or
· Start date changes.
|
|
|
Backward scheduling (CZFBSC = B)
· Start date is blank, or
· Due date changes.
|
|
|
Either scheduling direction
· Order quantity changed, or
· Schedule flag changes (CZFSBC not equal to HSFBSC).
|
|
|
If CLRGEN is Y, then LR's will be generated for the order.
|
|
|
11. The order record on the Manufacturing Order File (IC100M) is updated to reflect any change in the SIR Component Code (HCMRCD), or high quantity per (HZHIQP) is recalculated if all the component requirement records were processed.
|
|
|
If Shop Floor Control and Capacity Planning are installed, and if the manufacturing order status changes from planned to firmed or planned to released, the planned labor requirements are deleted from the Capacity Planning Labor Requirements File (CP100AP) and labor requirements for the firmed and released orders are generated and added to the Labor Requirements Master File (IC125M).
|
|
|
When order start date, order due date, and order quantity changes are made to planned orders, the capacity planning schedule flag (HCPFLG) on the Manufacturing Order File (IC100M) is set to Y. Planned labor requirements for the order are rescheduled by the Capacity Planning Labor Requirements Generation program (CP100E).
|
|
|
If Shop Floor Control is not installed and Capacity Planning is installed, and if the manufacturing order status is planned, checks are made for changes in the start and due dates and the order quantity. If a change has occurred, the capacity planning schedule flag (HCPFLG) is set to Y. Planned labor requirements for the order will be rescheduled by the Capacity Planning Labor Requirements Generation program (CP100E). Only planned orders for master scheduled parts can be maintained.
|
|
|
If the manufacturing order status is firmed or changes to firmed, the Order Status field on the logical Capacity Planning Labor Requirements File is updated to O. Checks are made for changes in the start and due dates and the order quantity. If a change has occurred, the capacity planning schedule flag (HCPFLG) is set to Y.
|
|
|
If the manufacturing order status changes to firmed, the order status field on the logical Capacity Planning Labor Requirements File is updated to O. Checks are made for changes in the start and due dates and the order quantity. If a change has occurred, the capacity planning schedule flag (HCPFLG) is set to Y.
|
|
|
If the manufacturing order status changes from firmed or planned to open and the Load Open Orders Option is N, the labor requirements for the order are deleted from the logical Capacity Planning Labor Requirements File (CP100AL1).
|
|
|
If the Load Open Orders Option is Y, the order status field on the logical Capacity Planning Labor Requirements File is updated to O if a planned order. Checks are made for changes in the start and due dates and the order quantity. If a change has occurred, the capacity planning schedule flag (HCPFLG) is set to Y.
|
|
|
12. The audit trail record for the order is written to IC100BP1 according to:
|
|
|
a. If no net change to the Manufacturing Order record or any component requirement records occurred for the order, no audit trail record is written.
|
|
|
b. If no net change to the Manufacturing Order record occurred, but at least one component requirement for the order had a net change, a manufacturing order audit trail header record (CZTRAN=A26) is written to IC100BP1 to sequence the report.
|
|
|
13. A transaction register record for the order is written to IC100CP1.
|
|
|
a. If neither the Manufacturing Order record nor any labor or component requirement for the order had a net change, a transaction register record is written to IC100CP1, and a transaction error record (MPC0041) is written to IC505AP.
|
|
|
b. If there was no net change on the Manufacturing Order record, but a net change did occur on at least one labor or component requirement for the order, a manufacturing order transaction register header record (CZTRAN=A26) is written.
|
|
|
14. The records for the order are deleted from the asynchronous transaction files. Both component requirement, labor requirement, and manufacturing order transactions are deleted, including the application lock record.
|
|
|
15. A completion message is displayed to the user. The message may be one of the following:
|
|
|
a. successful (MPC0060)
b. partial completion (MPC0061)
c. unsuccessful (MPC0062)
|
|
|
If none of the above is displayed, neither the manufacturing order nor any component requirements were changed.
|
Release An Order
(from IC100E)
|
A25
|
1. The manufacturing order asynchronous transaction is retrieved from the Transaction File (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The Manufacturing Balance record is read for update.
|
|
|
3. The Warehouse Balance record is read for update.
|
|
|
4. The Part Master record is read for update.
|
|
|
5. Changes to the manufacturing order fields are processed from the transaction record. The following fields may be updated:
|
|
|
|
|
HORDQ
|
Order Quantity
|
|
HSTDT
|
Start Date
|
|
HDUEDT
|
Due Date
|
|
HDESC
|
Manufacturing Order Description
|
|
HBAC
|
Buyer/Analyst Code
|
|
HSPO
|
Shop Paperwork Option
|
|
HORNO
|
Order Number
|
|
|
The print flags are also set, based on the shop paperwork option:
|
|
|
a. If HSPO=N (neither), no change to flag
b. If HSPO=B (both), flags HPCPF and HMOPF are set to 1
c. If HSPO=P (pick list), flag HPCPF is set to 1
d. If HSPO=M (manufacturing order), flag HMOPF is set to 0
|
|
|
6. Two internally maintained manufacturing order fields are updated (the file record is updated later). The first field modified is the Last Activity Date (HDTLA). The last activity date is updated with the current system date (if the current date is greater than the last activity date).
|
|
|
The second field modified is the High Quantity Per field (HZHIQP). The transaction high quantity per is updated with the transaction high quantity per (CAHIQP) (if the transaction value is greater).
|
|
|
7. The Warehouse Balance record is updated for the order part. The adjustment quantity is calculated as follows:
|
|
|
a. Releasing a planned order (changing HSTATS from P to O).
|
|
|
ADJQTY=HORDQ (order quantity)
|
|
|
b. Releasing a firmed order (changing HSTATS from F to O).
|
|
|
(1) OLDBAL = PZORDQ minus HTQR
(previous order quantity less receipts)
|
|
|
(2) NOWBAL = HORDQ minus HTQR
(current order quantity less receipts)
|
|
|
(3) If NEWBAL and OLDBAL is greater than or equal to zero:
ADJQTY = NEWBAL minus OLDBAL
|
|
|
(4) If NEWBAL and OLDBAL are both less than zero:
ADJQTY = zero
|
|
|
(5) If NEWBAL is greater than or equal to zero and OLDBAL is less than zero:
ADJQTY = NEWBAL
|
|
|
(6) If NEWBAL is less than zero and OLDBAL is greater than or equal to zero:
ADJQTY = (-1) times OLDBAL
|
|
|
8. The Part Master record is updated.
|
|
|
9. When releasing an order, individual component requirements may be added or changed, but all component requirements must be accessed to change the order status field, recalculate required quantities, and allocate Warehouse Balances.
|
|
|
When the Capacity Planning module is not installed, the release of an order is the same as changing an order for LR processing. LR generation can occur when releasing a firmed or planned order; rescheduling can occur when releasing a firmed order that already has LRs.
|
|
|
When Shop Floor Control and Capacity Planning are installed, if the status of the order on the Manufacturing Order File (IC100M) is planned and the order is released, existing planned labor requirements are deleted from the logical Capacity Planning Labor Requirements File (CP100AL1). The capacity planning schedule flag (HCPFLG) is set to N. Shop Floor Control generates labor requirements for released orders.
|
|
|
Labor requirements processing when Shop Floor Control is not installed and Capacity Planning is installed
|
|
|
If the status of the order on the Manufacturing Order File (IC100M) is P and the order is released, the order status of existing planned labor requirements on the logical Capacity Planning Labor Requirements File (CP100AL1) is updated to O if the Load Open Order Option is Y.
|
|
|
Checks are made for changes in the start and due dates and the order quantity. If a change has occurred, the capacity planning schedule flag (HCPFLG) is set to Y.
|
|
|
If the Load Open Orders Option is N, the labor requirements for the order are deleted and the capacity planning schedule flag (HCPFLG) is set to N.
|
|
|
If the order status is firmed (F) and the Load Open Orders Option is N, the labor requirements for the order are deleted and the capacity planning schedule flag (HCPFLG) is set to N.
|
|
|
If the order number was changed on the manufacturing order, all component requirement order numbers are also updated, regardless of any errors on locking or updating the part master or Warehouse Balance records for the component requirements.
|
|
|
Check all components for invalid configuration codes. If an invalid code exists do not release the order.
|
|
|
10. The record on Manufacturing Order File (IC100M) is updated to reflect any change in the SIR Component Code (HCMPCD) or High Quantity Per field (HZHIQP) that was recalculated in the all component requirements processing.
|
|
|
11. The audit trail record for the order is written to IC100BP1.
|
|
|
12. The transaction register record for the order is written to IC100CP1.
|
Firm A Planned Order
(from IC100E)
|
A25
|
1. The manufacturing order asynchronous transaction is retrieved from the Transaction File (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The Manufacturing Order record is read for updates.
|
|
|
3. The Warehouse Balance record is read for updates.
|
|
|
4. The Part Master record is read for updates.
|
|
|
5. Changes to the manufacturing order fields are processed. The following fields may be modified:
|
|
|
|
|
HORNO
|
Order Number
|
|
HORDQ
|
Order Quantity
|
|
HSTDT
|
Start Date
|
|
HDUEDT
|
Due Date (change to later)
|
|
HDUEDT
|
Due Date (change earlier)
|
|
HDESC
|
Manufacturing Order Description
|
|
HBAC
|
Buyer/Analyst Code
|
|
HSPO
|
Shop Paperwork Option
|
|
|
6. Two internally maintained manufacturing order fields are updated (the file record is updated later). The first field modified is the Last Activity Date (HDTLA). The last activity date is updated with the current system date if the current date is greater than the last activity date.
|
|
|
The second field modified is the High Quantity Per field (HZHIQP). The transaction high quantity per is updated with the transaction high quantity per (CAHIQP) if the transaction value is greater.
|
|
|
7. The Warehouse Balance record for the order part is updated. The adjustment quantity is ADJQTY=HORDQ (order quantity).
|
|
|
8. The Part Master record is updated.
|
|
|
9. When firming an order, individual component requirements may be added or changed, but all component requirements must be accessed to update the Order Status field.
|
|
|
If the Shop Floor Control module is installed and the Capacity Planning module is not installed, labor requirements, if generated, are posted to the Labor Requirements Master File (IC125M). See "Post Labor Requirements."
|
|
|
If the Shop Floor Control module and the Capacity Planning module are installed, planned labor requirements for the planned order are deleted.
|
|
|
Labor requirements for the firmed order are generated and posted to the Labor Requirements Master File (IC125M). See "Post Labor Requirements" under "Windup."
|
|
|
When the Capacity Planning module is installed and the Shop Floor Control module is not installed:
|
|
|
The order status on the Capacity Planning Labor Requirements File (CP100AP) is updated to released, O.
|
|
|
If the order number was changed on the manufacturing order, all component requirements are also updated, regardless of any errors on locking or updating the part master or Warehouse Balance records for the component records.
|
|
|
10. The order record is updated to reflect any change in the SIR Component Code (HCMRCD) or High Quantity Per (HZHIQP) field that was recalculated in updating all component requirements.
|
|
|
11. An audit trail record for the order is written to IC100BP1.
|
|
|
12. A transaction register record for the order is written to IC100CP1.
|
|
|
13. The records for the order are deleted from the Asynchronous Transaction Files. Both component requirements and manufacturing order records are deleted, including the application lock record.
|
|
|
14. A completion message is displayed to the user. The message may be successful (MPC0060) or partial completion (MPC0061).
|
Cancel An Order
(from IC100E and EC200E)
|
E45
|
1. The manufacturing order asynchronous transaction is retrieved from the transaction file (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The Manufacturing Order record is read for updates.
|
|
|
3. The Warehouse Balance record for the order part is read for updates.
|
|
|
4. The Part Master record is read for updates.
|
|
|
5. The Warehouse Balance record is released unchanged.
|
|
|
6. The Part Master record is released unchanged.
|
|
|
7. The component requirement records for the order are read sequentially and physically deleted from the Component Requirements File (IC120M).
|
|
|
a. If a file exception occurs during the read, a system abort (ABT0111) results.
|
|
|
b. The component record read for update is deleted.
|
|
|
c. An audit trail record for the component is written to IC100BP2.
|
|
|
8. When the Shop Floor Control module is installed and the Capacity Planning module is not installed:
|
|
|
a. The labor requirements records for the order are read sequentially and physically deleted from the Labor Requirements Master File (IC125M).
|
|
|
b. If a file exception occurs during the read, a system abort occurs.
|
|
|
c. The labor requirements record read for update is deleted.
|
|
|
d. An audit trail record for the labor requirement is written to the Audit Trail File.
|
|
|
When the Shop Floor Control module is not installed and Capacity Planning is installed:
|
|
|
a. Existing labor requirements records for the order are read sequentially and physically deleted from the Capacity Planning Labor Requirements File (CP100AP).
|
|
|
b. If a file exception occurs during the read, a system abort occurs.
|
|
|
c. The capacity planning schedule flag (HCPFLG) is set to N and the order is not processed by later runs of the Capacity Planning Labor Requirements Generation program.
|
|
|
9. The order record is deleted from the Manufacturing Order File (IC100M).
|
|
|
10. An audit trail record for the order is written to IC100BP1.
|
|
|
11. A transaction register record for the order is written to IC100CP1.
|
Close An Order
(from IC100E)
|
E40
|
1. The manufacturing order asynchronous transaction is retrieved from the transaction file (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The Manufacturing Order record is read for updates.
|
|
|
3. The Warehouse Balance record for the order part is read for updates.
|
|
|
4. The Part Master record for the order part is read for updates.
|
|
|
5. The manufacturing order status is changed to closed (HSTATS=C), the order close date (HCLSTDT) is set to the transaction date (CZTDT), and the last activity date is set to the system date.
|
|
|
6. The Warehouse Balance record for the order part is updated. The adjustment quantity is calculated as follows:
|
|
|
a. OLDBAL = Previous order quantity (PZORDQ)
minus Receipts (HTQR)
|
|
|
b. If OLDBAL is less than or equal to zero,
ADJQTY = zero
|
|
|
c. Otherwise,
ADJQTY = (-1) times OLDBAL
|
|
|
7. The Part Master record is updated.
|
|
|
All components for the order are read sequentially and updated. The order status for each component is changed to C. No component requirement maintenance is permitted when manufacturing orders are closed. In closing an order, if an error occurs during component requirements processing, the program attempts to reopen the order and the component requirements that it closed in order to restore the records to their original state.
|
|
|
8. Labor Requirements are updated.
|
|
|
If Shop Floor Control is installed and Capacity Planning is not installed, existing labor requirements records for the order are read sequentially from the Labor Requirements Master File (IC125M) and updated. The order status field is changed to C. An audit trail record for the labor requirement is written to the Audit Trail File.
|
|
|
If both Shop Floor Control and Capacity Planning are installed, existing labor requirements records for the order are read sequentially from the Labor Requirements Master File (IC125M) and updated. The order status field is changed to C. An audit trail record for the labor requirement is written to the Audit Trail File.
|
|
|
If the Shop Floor Control module is not installed and Capacity Planning is installed, existing labor requirements records for the order are read sequentially and physically deleted from the Capacity Planning Labor Requirements File (CP100AP). If a file exception occurs during the read, a system abort occurs.
|
|
|
The capacity planning schedule flag (HCPFLG) is set to N and the order is not processed by later runs of the Capacity Planning Labor Requirements Generation program.
|
|
|
9. The order record is updated on the Manufacturing Order File (IC100M).
|
|
|
10. An audit trail record for the order is written to IC100BP1.
|
|
|
11. A transaction register record for the order is written to IC100CP1.
|
|
|
12. The records for the order are deleted from the Asynchronous Transaction File (IC100AP1).
|
|
|
13. A successful completion message (MPW0060) is displayed to the user.
|
Reopen An Order
(from IC100E)
|
E20
|
1. The manufacturing order asynchronous transaction is retrieved from the transaction file (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The Manufacturing Order record is read for updates.
|
|
|
An M.O. cannot be reopened if it is associated with a job that has been closed (status equals C) or costing closed (status equals Z).
|
|
|
3. The Warehouse Balance record for the order part is read for updates.
|
|
|
4. The Part Master record is read for updates.
|
|
|
5. The order status is changed to open (HSTATS=O) and the order close date (HCLSDT) is cleared.
|
|
|
6. Two internally maintained manufacturing order fields are updated (the file record is updated later). The first field modified is the Last Activity Date (HDTLA). The last activity date is updated with the current system date if the current date is greater than the last activity date.
|
|
|
The second field modified is the High Quantity Per field (HZHIQP). The master file high quantity per is updated with the transaction high quantity per (CZHIQP) if the transaction value is greater.
|
|
|
7. The Warehouse Balance record is updated for the order part. The adjustment quantity is calculated as follows:
|
|
|
NEWBAL = order quantity (HORDQ) minus receipts (HTQR)
|
|
|
a. If NEWBAL is less than or equal to zero
ADJQTY = zero
|
|
|
b. If NEWBAL is greater than zero
ADJQTY = ADJQTY minus NEWBAL
|
|
|
8. The Part Master record is updated.
|
|
|
9. All components for the order are read sequentially and updated. The order status of each component is changed to O (open). No user maintenance of component requirements is permitted when reopening a manufacturing order. If the component Warehouse Balance or part master records cannot be successfully read for update, the following steps are performed in sequence.
|
|
|
a. The component requirement status is changed to canceled (MZSTC=X), and the record is updated.
|
|
|
b. An audit trail record for the component requirement is written to IC100BP2.
|
|
|
c. A transaction register record is written for the component requirement to IC100CP2.
|
|
|
d. A transaction error record (MPC0170) is written for the component requirement to the Transaction Register Error File (IC505AP).
|
|
|
e. A program flag is set that causes a partial post completion message (MPW0061) to be displayed to the user after the remaining order maintenance is performed.
|
|
|
f. Processing continues with the next sequential component requirement record.
|
|
|
10. Labor requirements are updated.
|
|
|
If Shop Floor Control is installed, existing labor requirements records for the order are read sequentially from the Labor Requirements Master File (IC125M) and updated. The Order Status field is set to O. An audit trail record for the labor requirement is written to the Audit Trail File.
|
|
|
If Shop Floor Control is not installed and Capacity Planning is installed, and if the Load Open Order Option (LDOOPT) equals Y, open orders are included in the Capacity Planning load calculations. The manufacturing order record on the Manufacturing Order File (IC100M) is checked for changes to the order start date, order due date, and order quantity. If changes were made, the capacity planning schedule flag (HCPFLG) is set to Y. Labor requirements for the order will be rescheduled by the Capacity Planning Labor Requirements Generation program (CP100E).
|
|
|
If the Load Open Order Option (LDOOPT) equals N, open orders are excluded from the Capacity Planning load calculations.
|
|
|
11. The order record is updated on the Manufacturing Order File (IC100M).
|
|
|
12. An audit trail record for the order is written to IC100BP1.
|
|
|
13. A transaction register record for the order is written to IC100CP1.
|
|
|
14. The records for the order are deleted from the Asynchronous Transaction File (IC100AL).
|
|
|
15. A completion message is displayed to the user. The message displayed is either successful (MPW0060) or partial post (MPW0061).
|
|
|
|
|
|
|
|
|
TRANSACTIONS FROM IC200E:
Manufacturing Order Release
Maintenance performed by the user in the Manufacturing Order Release program (IC200E) results in the posting of transactions to the physical transaction file, the Order Release Asynchronous file (IC200AP). The transactions in this file identify which orders are to be released (the status is changed to open). A shop paperwork option change request may also be indicated on the transactions.
Transactions to release an order also cause all component requirements for the order to be updated as well, and may request LR generation.
The following activities are performed in sequence for each order being released. Unlike order maintenance processing initiated by the Manufacturing Order Maintenance program (IC100E) or the Shop Paperwork Request program (IC320E), all orders generated by the Manufacturing Order Release program (IC200E) are read from the Order Release Asynchronous Transaction file (IC200AP) after one call from the asynchronous message monitor.
|
|
|
Release An Order (IC200C)
|
OR1
|
1. The manufacturing order asynchronous transaction is retrieved from the Order Release Asynchronous Transaction File. If no asynchronous transaction record for the job is found, the program ends and no error is produced.
|
|
|
2. An application lock record is written to the component requirement Asynchronous Transaction File (IC100AP2) to prevent any maintenance to the order by the Manufacturing Order Maintenance program while the order is being released.
|
|
|
If the application lock record cannot be added because one is already on the file (because of maintenance being performed in IC100E), an error is generated (MPC0170), a transaction register record is written to IC100CP1, a transaction error record is written to the Transaction Register Error File (IC505AP), an unsuccessful completion message (MPW0062) is displayed to the user, and processing for the order stops. If a file exception occurs, a generation system abort (ABT0033) results and the program terminates.
|
|
|
3. The manufacturing order record is read for updates.
|
|
|
4. The order status is checked to verify that it is not already open (HSTATS=O). If the order is already open (HSTATS=O), an error is generated (MPC0352), a transaction register record is written to the data base control record (IC100CP1), a transaction error record is written to the Transaction Register Error File, an unsuccessful completion message (MPW0062) is displayed to the user, and processing for the order stops.
|
|
|
5. If Shop Floor Control is installed, the Labor Requirements Asynchronous program (SF106E) is called if the user requested LRs. SF106E writes labor requirements add transactions(CZTRAN = L20) to the transaction file (IC100AP3). If the generation was unsuccessful, an error is generated and an error record is written to the Transaction Register Error File (IC505AP). If either CR or LR generation was unsuccessful, a partial post completion message (MPW0061) is sent to the user. If LR generation was successful, master roll-up processing is performed. This connects the active operations to any master operations on the routing.
|
|
|
If both Shop Floor Control and Capacity Planning are installed, and if the order status (HSTATS) on the Manufacturing Order File (IC100M) is P and the order status on the transaction manufacturing record is O, existing planned labor requirements are deleted from the logical Capacity Planning Labor Requirements File (CP100AL1). The capacity planning schedule flag (HCPFLG) is set to N to prevent the order from being processed by later runs of the Capacity Planning Labor Requirements Generation program.
|
|
|
If the Shop Floor Control module is not installed and Capacity Planning is installed, and if the order status (HSTATS) on the Manufacturing Order File (IC100M) equals P, the order is released, and the Load Open Orders Option is Y, the order status on the Capacity Planning Labor Requirements File (CP100AL1) is updated to O. If the Load Open Orders Option is N the labor requirements for the order are deleted.
|
|
|
If a firmed order is released and the Load Open Orders Option is N, the labor requirements for the order are deleted.
|
|
|
6. The Warehouse Balance record is read for updates. If an error occurs, the application lock record is also deleted from the transaction file.
|
|
|
7. The Part Master record is read for updates. If an error occurs, the application lock record is also deleted from the transaction file.
|
|
|
8. The manufacturing order status is changed to open (HSTATS=O) and the shop paperwork request flag is updated:
|
|
|
a. If HSPO = N (neither) - No change
|
|
|
b. If HSPO = B (both) - HMOPF and HPLPF are set to 1
|
|
|
c. If HSPO = P (pick list) - HPLPF is set to 1
|
|
|
d. If HSPO = M (manufacturing order) - HMOPF is set to 1
|
|
|
The last activity date (HDTLA) is updated with the current system date.
|
|
|
9. The Warehouse Balance record is updated. The adjustment quantity is calculated as follows:
|
|
|
a. Releasing a planned order (HSTATS changed from P to O).
|
|
|
ADJQTY = HORDQ (order quantity)
|
|
|
b. Releasing a firm order (HSTATS changed from F to O).
|
|
|
ADJQTY = zero.
|
|
|
10. The Part Master record is released unchanged.
|
|
|
11. All the components are accessed sequentially and updated. The Order Status field is updated, and the Warehouse Balanced fields are updated.
|
|
|
If labor requirements were generated, they are posted to the LR master file (see Post Labor Requirements under Windup).
|
|
|
12. The order record is updated on the Manufacturing Order File (IC100M).
|
|
|
13. An audit trail record for the order is written to IC100BP1.
|
|
|
14. A transaction register record for the order is written to IC100CP1.
|
|
|
15. The records for the order are deleted from the logical asynchronous transaction files. Both component requirements and manufacturing order asynchronous transactions are deleted, including the application lock record.
|
|
|
16. A completion message is displayed to the user. The message is either successful (MPW0060) or partial completion (MPW0061).
|
TRANSACTIONS FROM IC320E:
Shop Paperwork Request
There are no transaction files associated with this type of maintenance. All required parameters are passed to this program in the call.
|
|
|
Shop Paperwork Request
|
SP1
|
1. The manufacturing order record is read for update.
|
|
|
2. The Shop Paperwork Option is formatted based on the input parameter (RCODE) from the Shop Paperwork Request program (IC320E).
|
|
|
a. If RCODE = 1, the Shop Paperwork Option (HSPO) is set to P (pick list)
|
|
|
b. If RCODE = 2, the Shop Paperwork Option (HSPO) is set to M (manufacturing order)
|
|
|
c. If RCODE = 3, the Shop Paperwork Option (HSPO) is set to B (both)
|
|
|
3. The print flags are set based on the Shop Paperwork Option
|
|
|
a. If HSPO = N (neither), no change.
|
|
|
b. If HSPO = B (both), HPLPF and HMOPF are set to 1.
|
|
|
c. If HSPO = P (pick list), HPLPF is set to 1.
|
|
|
d. If HSPO = M (manufacturing order), HMOPF is set to 1.
|
|
|
4. The order record is updated on the Manufacturing Order File (IC100M).
|
|
|
5. A successful completion message (MPW0060) is displayed to the user.
|
TRANSACTIONS FROM SF100E:
Labor Requirements Maintenance
Maintenance performed by the user in SF100E results in the posting of a Manufacturing Order transaction to IC100AP1 and may also post asynchronous labor requirements to IC100AP3.
An application lock for the order is written to IC100AP2 by SF100E. The application locking record is a component requirement record written to IC100AP2 by SF100E, which has the transaction number (CZORNO) and all nines in the Component Part Number (CZCPN) field.
If the user wishes to generate labor requirements for the order without displaying them on the screen, only the manufacturing order async is written with a request to generate (CLRGEN = Y). If the user has maintained labor requirements online, those labor requirements requiring posting are on the labor requirements asynchronous file.
If the user has displayed labor requirements online and now wishes to maintain the order dates, the manufacturing order async is a "change order" (A25) and the order start and due dates are updated on the manufacturing order master file.
The following activities are performed in sequence for each type of labor requirements maintenance performed by the user in SF100E:
|
|
|
Change An Order
|
A25
|
1. The manufacturing asynchronous transaction is retrieved from the transaction file (IC100AP1). If no record for the order is found, the program ends and no error is produced.
|
|
|
2. The manufacturing order record is read for update. See section on the lock manufacturing order record (page 32).
|
|
|
3. The Warehouse Balance record for the order part is read for update. See section on the lock Warehouse Balance record (page 31).
|
|
|
4. The part master record for the order part is read for update. See section on the lock Part Master Record (page 31).
|
|
|
5. The scheduled labor requirement records are rolled up into their master operations.
|
|
|
6. Labor requirements records are posted to the LR master file. See Post Labor Requirements (page 44).
|
|
|
7. Changes to the manufacturing order fields are processed. The following fields may be modified:
|
|
|
Start date (HSTDT)
Due date (HDUEDT)
|
|
|
8. If necessary, all the CR records for the order are updated.
|
|
|
9. The audit trail record for the order is written to IC100BP1.
|
|
|
10. The transaction register record for the order is written to IC100CP1.
|
|
|
11. The records for the order (including the locking record) are deleted from the Asynchronous Transaction File IC100AP1.
|
|
|
12. A completion message is sent to the user.
|
SUMMARY OF REQUIRED QUANTITY CALCULATIONS
QUANTITY CALCULATIONS - COMPONENT REQUIREMENTS
1. Required quantity calculation for component requirement records:
a. If the component part is a requisition part, the required quantity may be input by the user. If left blank, it is calculated by the program.
Required Quantity = Order Quantity times Quantity Per divided by (1 minus Calculated Scrap Factor)
b. If the component part is an SIR part, the required quantity is always calculated by the program.
Required Quantity = [(Order Quantity minus Quantity Received) times Quantity Per divided by (1 minus Calculated Scrap Factor)] plus Issue Quantity
where:
Calculated Scrap Factor = Scrap Factor divided by 100
Example of quantity calculations (for SIR component part):
|
Order
Qty
|
Qty
Received
|
Bal
Due
|
Qty
Per
|
Scrap
Factor
|
Qty
Issued
|
Req'd
Qty
|
ORIGINAL
|
100
|
10
|
90
|
10
|
50
|
100
|
1,900
|
UPDATE
|
100
|
10
|
90
|
5
|
50
|
100
|
1,000
|
SUMMARY OF ON-ORDER AND ALLOCATED
WAREHOUSE BALANCE QUANTITY ADJUSTMENTS
Quantity Calculations - Warehouse Balances
|
|
|
Add Open Order
|
Increase By Order Qty
|
Increase By Required Qty
|
Add Firm Order
|
Increase By Order Qty
|
No Change
|
Change Open Order
|
Change Open Order (+/-)
|
Adjust by Required Qty Change (+/-)
|
Change Firm Order
|
Adjust By Qty Change (+/-)
|
No Change
|
Release Firm Order
|
Adjust By Qty Change (+/-)
|
Increase By Required Qty
|
Release Planned Order
|
Increase By Order Qty
|
Increase By Required Qty
|
Firm Planned Order
|
Increase By Order Qty
|
No Change
|
Cancel A Firm Order
|
Decrease By Order Qty
|
No Change
|
Close An Open Order
|
Decrease By Balance Due
(Order Qty minus Qty Received)
|
Decrease By Balance To Issue
(Qty Req'd minus Qty Received)
|
Reopen A Closed Order
|
Increase By Balance Due
(Order Qty minus Qty Received)
|
Increase By Balance To Issue
(Qty Req'd minus Qty Received)
|
SUMMARY OF NET CHANGE FLAG UPDATING
1. The net change flag (PMNCFL on DE100M) for the order part is ensured to be replanned (not 0 or 1) if the part is not a reference part and if any of the following changes occur during the processing of the order:
a. An order is added.
b. An order is reopened and the order quantity (HZORDQ) is greater than the quantity received (HTQR).
c. An order is closed and the order quantity (HZORDQ) is greater than the quantity received (HTQR).
d. The order quantity (HORDQ) is changed.
e. The order start date (HDWEDT) is moved later in time.
f. The order is canceled.
2. The net change flag (PMNCFL on DE100M) for the component part is ensured to be on (not 0) if the part is not a reference part, if the component does not have a cancel status (MZSTCF=X), and if any of the following changes occur during the processing of the order:
a. The component is added.
b. The component's required quantity (MZRQTY) is changed.
c. The start date of the order is moved earlier in time.
d. The order is canceled.
e. The status of the component (MZSTC) is changed.
SUMMARY OF DATA BASE FLAGGING LOGIC
1. If the Part Master and Warehouse Balance records cannot be locked in the reopen process, which is invoked when an error occurs during Close An Order maintenance, the data base is flagged (DBACT set to N), indicating that the integrity of the data on the data base has been damaged.
2. If at any time during processing a file exception occurs during a write or update to a master file after any valid write or update has occurred, the data base is flagged (DBACT set to N), indicating the integrity of the data has been damaged.
RECORD LOCKING MATRIX
If the calling program is IC100E or IC200E:
|
|
Manufacturing Order Record
(update read, IC100ML)
|
To update fields and exclude maintenance to the order while the program processes the component requirement records.
|
Component Requirements Record (update read, IC120M)
|
To update fields and exclude maintenance during processing of Warehouse Balance and part master records for the component part.
|
Part Master Record
|
To update net change flag field, and to prevent any other program from adding Warehouse Balance records during processing.
|
Warehouse Balance Record
(update read, IC140M)
|
To update fields and to prevent intervening updates to on-order or allocated quantity fields.
|
Job Master Record
(read, JC100M)
|
To prevent intervening updates to the Job Status field.
|
If the calling program is IC320E:
|
|
Manufacturing Order Record
(update read, IC100ML)
|
To update the shop paperwork field.
|
C. Windup
1. The data base control record--Data Base (CT100P01) File's Data Base Activity Flag (DBACT) is updated if an error occurred that damaged the integrity of the data base.
2. If the shop paperwork print flags were modified, the system control file shop paperwork generation pending flag (on the ICCTL1 record) is set to (SPGEND=Y).
Lock Manufacturing Order Record
1. The manufacturing order record is read for updates. The read locks the record preventing other users from updating this record during the processing of changes to the manufacturing order and component requirement records. The actual update of the record occurs at the end of the processing.
2. If the manufacturing order record cannot be read successfully for updates, the following steps are performed:
a. A transaction register record is written to IC100CP1.
b. Two transaction error records (error codes MPC0170 and MPW0069) are written to the Transaction Register Error file (IC505AP).
c. All transactions for the order are deleted from the Asynchronous Transaction file (IC100AL).
d. An unsuccessful completion message (MPW0062) is displayed to the user.
e. Processing of the order stops.
3. If a file exception occurs at any point, a system abort (ABT0041) results.
Lock Part Master Record
1. The record on the Part Master file (DE100M) for the part is read for updates. The read locks the part master record, preventing other users from updating this record while the changes to the net change flag are being determined.
2. If the Part Master record cannot be read for updates, a transaction register record is written to IC100CP1 for an order part and to IC100CP2 for a component, and a transaction error record (MPC0001 if the record does not exist, otherwise MPC0170) is written to the Transaction Register Error file. A second error record (MPW0069) is written if the error occurred on the order part.
3. If the error occurred while processing the order part, an unsuccessful completion message (MPW0062) is displayed to the user, all transaction records for the order are deleted from the Asynchronous Transaction file (IC100AL), and processing of the order stops.
4. If the error occurred while processing a component part, a program flag is set to display a partial completion message (MPW0061) to the user, and processing continues with the next component requirement.
5. If a file exception occurs at any point, a system abort (ABT0155) results.
Lock Warehouse Balance Record
1. The record on the Warehouse Balance file (IC140M) for the part number within the manufacturing warehouse is read for update. The read locks the Warehouse Balance record, preventing other users from updating this record while the program continues processing.
2. If a Warehouse Balance record for the part does not exist, processing continues and the record is added during later processing of the program.
3. If the record exists but cannot be successfully read for update, a transaction register record is written to the transaction file (IC100CP1) for an order part or to IC100CP2 for a component part. The transaction error record (MPC0170) is written to the Transaction Register Error file (IC505AP). A second error record (MPW0069) is also written if the error occurred on the order part.
4. If the error occurred while processing the order part, an unsuccessful completion message (MPW0062) is displayed to the user, all transaction records for the order are deleted from the Asynchronous Transaction file (IC100AL), and processing of the order stops.
5. If the error occurred while processing a component part, a program flag is set to display a partial completion message (MPW0061) to the user. Processing continues with the next component requirement.
6. If a file exception occurs at any point, a system abort (ABT0079) results.
Lock Job Master Record
1. The Job Master record is locked to prevent changes to the job status while adding an M.O.
2. If errors occurred during locking or validation, the record is released. If the record is already locked, an in-use message (MPC3722) is displayed.
Update Warehouse Balance Record
1. The record on the Warehouse Balance file (IC140M) for the part is updated.
2. If a record for the part does not exist, one is created with the system date as the date of last transaction (WBDTCT). A counter is incremented each time a record is added: the total is used to update the active record count on the Data Base - Warehouse Balance file (CT110P14).
3. If the adjustment quantity is not zero, the Warehouse Balance record (manufacturing warehouse) is updated.
4. If the manufacturing order part is being processed, the on-order quantity (WB00MP) is increased by the adjustment quantity. The on-order quantity cannot be adjusted to less than zero.
5. If a consumed component part (Usage Code = C) is being processed, the allocated quantity (WBAQMF) is increased by the adjustment quantity. If a produced component part (Usage Code = P) is being processed, the on-order quantity (WBOOMF) is increased by the adjustment quantity. The allocated and on-order quantities cannot be adjusted to less than zero.
6. The program monitors for overflow on adjustments to quantity fields.
a. If an overflow affects the on-order quantity (WBOOMF):
(1) A transaction register record is written to IC100CP1.
(2) A transaction error record (MPC0425) is written to the Transaction Register Error file.
(3) A second transaction error record (MPW0069) is written to the Transaction Register Error file.
(4) Processing for the order stops (no master file updates have occurred).
b. If an overflow affects the allocated quantity (WBAQMF):
(1) The component record is restored to its values before maintenance (except order number, if it changed).
(2) A transaction register record is written to IC100CP2.
(3) A transaction error record (MPC0425) is written to the Transaction Register Error file.
(4) Part Master and Warehouse Balance Records are released from their locks unchanged.
(5) Processing continues with the next component requirement.
Update Part Master Record
1. The part master net change flag (PMNCFL) on the Part Master file (DE100M) record is updated.
2. If the part master net change flag is of (PMNCFL=0), and the part is not a reference or build-thru part, at least one of the following activities occurred during processing:
a. If an order part is being processed:
(1) The order was added.
(2) The order was reopened.
(3) The order was closed with order quantity (PZORDQ) greater than quantity received.
(4) The order quantity (HORDQ) was increased.
(5) The order start date (HSTDT) was moved up.
(6) The order due date (HDUBDT) was moved back.
b. If a component part is being processed:
(1) The component was added.
(2) The component status was changed.
(3) The component quantity per (MZUQTY and/or MZDCC) was changed.
(4) The component required quantity changed.
(5) If any field changes in (a) above were made to the order, the Part Master record is updated.
3. If the conditions above are not met, the record is released unchanged.
Update All Component Requirements
1. The Component Requirement Asynchronous Transaction file (IC100AP2) is searched for component requirement add transactions (CZTRAN = C20) for the order. All the additions are posted to the Component Requirements file (IC120M) before any other processing takes place.
2. Beginning values for two internally maintained manufacturing order fields are initialized: The High Quantity Per field (HZHIQP) will be recalculated as all component requirements for the order are processed. CZHIQP is cleared as a work field to accumulate the High Quantity Per field. The SIR Component Code (HCMRCD) is set to a default value of R. The value is changed to S if any component for the order has an Issue Code (CDISS) of S.
3. The Component Requirements Asynchronous Transaction file is read sequentially. The next component is read for updates. If a file exception occurs during the read, a system abort (ABT0111) results.
4. The Warehouse Balance record for the component part is read for updates.
5. The Part Master record for the component part is read for updates.
6. If the maintenance being performed is change an order, release an order or firm a planned order (Manufacturing Order CZTRAN=AZT), the following steps are performed in sequence:
a. If the order number changed, the new order number (CZNORN) is moved to the Component Order Number field (MZORNO).
b. If the Order Start Date (HSTDT) was changed, the new start date (CZSTDT) is moved to the Component Requirement Start Date field (MZSTDT).
c. The Component Requirements Asynchronous Transaction file is checked for any transactions read for the component record. If an add transaction (CZTRAN = C20) exists on the Component Requirement Asynchronous file, the component was just added, and steps 4-6 will be skipped.
d. The required quantity (MZRQTY) is recalculated if an asynchronous change transaction (CZTRAN = C25) was not found, if the order quantity (HZORDQ) was changed, and if the existing required quantity (MZUQTY) and quantity per (MZUQTY) are not both zero. The required quantity is calculated as follows:
(1) If the Component Issue Code (MZISCD) is S:
[(Order Quantity (HORDQ) minus Quantity Received (HTQR)) times Quantity Per (MZUQTY)] divided by (1 minus Calculated Scrap Factor) = Required Quantity (MZRQTY)
(2) If the Component Issue Code (MZISCD) is R:
[Order Quantity (HORDQ) times Quantity Per (MZUQTY)] divided by (1 minus Calculated Scrap Factor) = Required Quantity (MZRQTY)
where:
Calculated Scrap Factor = Scrap Factor divided by 100
e. The changes entered by the user are processed if a component requirement change transaction (CZTRAN = C25) was found for the component in step 3. If the Issue Code was changed to R, validation is performed to ensure the component part type is not B (by-product) or C (non-stocked) and the usage code is not P (produced). The following fields can be modified by the user:
(1) Issue Code (MZISCD). If the Issue Code was changed to S, validation is performed to ensure the component part is not lot-controlled and that an SIR location exists (AMSIRL not NOSRLOC). If the change is invalid, an error is generated (MPC0332 if lot-controlled, MPC0100 if no SIR location, MPC3444 if produced component has an issue code of R), a transaction register record is written to IC100CP, a transaction error record file is written to IC505AP, a flag is set that conditions the display of a partial completion message (MPW0061) to the user, and processing continues with the next component requirement record in sequence.
(2) Status Code (MZSTC). If the order is open (MNCLAS = O) and the component status (MZSTC) is changed to X (canceled), the adjustment quantity (ADJQTY) to the Allocated Quantity (WBAQMF) or On-order Quantity (WBOOMF) is calculated as follows:
Previous Required Quantity (PZRQTY) minus Issue Quantity (MZIQTY) = Old Balance (OLDBAL)
If OLDBAL is greater than zero, ADJQTY = (-1) times OLDBAL
(3) Quantity Per (MZUQTY).
(4) Decimal Control Code (MZDCC).
(5) Scrap Factor (MZSCRF).
(6) Operation Number (MZOPNO).
(7) Revision Level (MZRLVL).
(8) Required Quantity (MZRQTY). The Required Quantity field is updated. However, the required quantity is recalculated if the status of the order being maintained is open (MNCLAS = O), and the Component Issue Code (MZISCD) is not R. The required quantity is recalculated as follows:
[Order Quantity (HORDQ) minus Quantity Received (HTQR)) times Quantity Per (MZUQTY, decimal MZDCC)] divided by (1 minus Calculated Scrap Factor (MZSCRF/100)) = Required Quantity (MZRQTY)
f. The adjustment quantity (ADJQTY), is calculated if the component was not added, if the component does not have a canceled status (MZSTC = X), if the component part is not a reference or non-stocked part, and if the order status is not firm. The adjustment quantity (ADJQTY) is used to update the Allocated Quantity (WBAQMF) for a consumed component and the On-order Quantity (WBOOMF) for a produced component.
The calculation is as follows:
(1) If the component status was changed to open (MZSTC = O):
ADJQTY = required quantity (MZRQTY) minus issued quantity (MZIQTY) (and ADJQTY must not be less than zero)
(2) If the order status was open (HZSTATS = O):
Previous Quantity (PZRQTY) minus Issued Quantity (MZIQTY) = Old Balance (OLDBAL)
Required Quantity (PZRQTY) minus Issued Quantity (MZIQTY) = New Balance (NEWBAL)
(3) If NEWBAL and OLDBAL are greater than or equal to zero:
ADJQTY = NEWBAL minus OLDBAL
(4) If NEWBAL and OLDBAL are less than zero:
ADJQTY = zero
(5) If NEWBAL is greater than or equal to zero and OLDBAL is less than zero:
ADJQTY = NEWBAL
(6) If NEWBAL is less than zero and OLDBAL is greater than or equal to zero:
ADJQTY = OLDBAL times (-1)
(7) If the order was being released
ADJQTY = MZRQTY
7. If the maintenance being performed is reopen an order, the following activities are performed in sequence.
a. If the component status is closed (MZSTC = C), the status is changed to open (MZSTC = O).
Note: If a component requirement record is found with an open status (MZSTC = O), processing of the component requirements stops. This situation occurs only when an attempt is made to close the order, but an error occurred in the processing of a component requirement. When the error occurred, the reopen logic is invoked to return the component requirements to their before maintenance status.
b. The adjustment quantity (ADJQTY), which is used to update the allocated quantity (WBAQMF) or on-order quantity (WBOOMF) depending on the component usage code, is calculated if the component is not a reference or non-stocked part, and its order status is not canceled (MZSTC = X).
NEWBAL = MZRQTY minus MZIQTY (i.e., required quantity minus issue quantity)
(1) If NEWBAL is greater than or equal to zero
ADJQTY = NEWBAL
(2) If NEWBAL is less than zero
ADJQTY = zero
8. If an order is being closed (manufacturing order CZTRAN = E40), the following steps are performed in sequence:
a. The component status is changed to closed (MZSTC = C) unless it is presently canceled.
b. The adjustment quantity (ADJQTY), which is used to update the allocated quantity (WBAQMF) or on-order quantity (WBOOMF) depending on the component usage code, is calculated if the component is not a reference part (MTYPN = 5) or a non-stocked part (MTYPN = C).
OLDBAL = PZRQTY minus MZJQTY (previous required quantity before maintenance less issue quantity)
(1) If OLDBAL is greater than or equal to zero
ADJQTY = (-1) times OLDBAL
(2) If OLDBAL is less than zero
ADJQTY = zero
9. If a manufacturing order is being released (manufacturing order CZTRAN = OR1 from IC200E), the following steps are performed in sequence:
The adjustment quantity (ADJQTY), which is used to update the allocated quantity (WBAQMF) or on-order quantity (WBOOMF) depending on the component usage code, is calculated if the component is not a reference part (MTYPN = 5) or a non-stocked part (MTYPN = C) and if the component status is not closed (MZSTC = X).
ADJQTY = MZRQTY
10. The Warehouse Balance record is updated.
11. The Part Master net change flag is updated.
12. The Component Requirements file (IC120M) is updated.
13. An audit trail record for the component is written to IC100BP2 if any of the following component requirement fields were changed during processing:
a. Status Code (MZSTC)
b. Quantity Per (MZUQTY and/or MZDCC)
c. Scrap Factor (MZSCRF)
d. Required Quantity (MZRQTY)
e. Issue Code (MZISCD)
f. Operation Number (MZOPNO)
g. Engineering Revision Level (MZRCUL)
14. A transaction record for the component is written (file IC100BP2) if a record for the component was found on IC100AP2 and if at least one of the fields named previously was changed.
15. The previous steps to update all component requirements are repeated for each component associated with the order.
Post Individual Component Requirements
1. The component requirements Asynchronous Transaction file (IC100AP2) is searched for component requirement add transactions (CZTRAN = C20) for the order. All add transactions are posted to the file before any further processing takes place.
2. The next sequential component requirement asynchronous transaction for the order is read from the file (IC100AP1). If a file exception occurs during the read, a system abort (ABT0111) results. If the transaction read is an add (CZTRAN = C20), steps 3 through 8 are skipped because the required activity was performed in IND-A. If the Issue Code was changed to R, validation is performed to ensure that the component part type is not B (by-product) or C (non-stocked) and the usage code is not P (produced).
3. The component requirement record is read for update. If the record cannot be successfully read for update, a system abort results.
4. The Warehouse Balance record is read for update.
5. The Part Master record is read for update.
6. The changes entered by the user are processed. The following fields may have been modified by the user:
a. Issue Code (MZISCD). If the Issue Code was changed to S, validation is performed to ensure the component part is not lot-controlled (IZLCF not Y) and that an SIR location exists (AMSIRL not NOSRLOC). If the Issue Code was changed to R, validation is performed to ensure that the component part type is not B (by-product) or C (non-stocked) and the usage code is not P (produced). If the change is not valid, an error is generated (MPC0332 if lot-controlled, MPC0100 if no SIR location, MPC3444 if produced component has an issue code of R), a transaction register record is written to IC100CP1, a transaction error record is written to IC505AP, a flag is set that conditions the display of a partial completion message (MPW0061) to the user, and processing of the component requirement records continues with the next record in sequence.
b. Status Code (MZSTC). If the order is open (MNCLAS = O) and the component status (MZSTC) is changed to X, the adjustment quantity (ADJQTY) to the allocated quantity (WBAQMF) or on-order quantity (WBOOMF) is calculated as follows:
Previous required quantity (PZRQTY) minus issue quantity (MZIQTY) = OLDBAL
If OLDBAL is greater than zero, ADJQTY = (-1) times OLDBAL.
c. Quantity Per (MZUQTY).
d. Decimal Control Code (MZDCC).
e. Scrap Factor (MZSCRF).
f. Operation Number (MZOPNO).
g. Revision Level (MZRLVL).
h. Required Quantity (MZRQTY). The Required Quantity field is updated with the user-specified value. The required quantity is recalculated if the status of the order being maintained is open (MNCLAS = O), and the Component Issue Code (MZISCD) is S. The required quantity is recalculated as follows:
(Order Quantity (HORDQ) minus Quantity Received (HTQR)) times Quantity Per (MZUQTY, decimal MZDCC) = Required Quantity (MZRQTY)
7. The adjustment quantity (ADJQTY), which is used to update the allocated quantity-MFG (WBAWMF) or on-order quantity (WBOOMF) depending on the component usage code, is calculated if:
The component was not previously added.
The part is not a reference part (MTYPN 5), or a non-stocked part (MTYPN C).
The component is not canceled (MZSTC = X).
The order status is open (MNCLAS = O).
a. If the component requirement asynchronous transaction changed the component status to open (MZSTC = O):
ADJQTY = required quantity (MZRQTY) minus issue quantity (MZIQTY)
b. Otherwise:
OLDBAL =previous required quantity (PZRQTY) minus issue quantity (MZIQTY)
NEWBAL =current required quantity (MZRQTY) minus issue quantity (MZIQTY)
(1) If NEWBAL is greater than or equal to zero and OLDBAL is greater than or equal to zero:
ADJQTY = NEWBAL minus OLDBAL
(2) If NEWBAL is greater than or equal to zero and OLDBAL is less than zero:
ADJQTY = NEWBAL
(3) If NEWBAL is less than zero and OLDBAL is greater than or equal to zero:
ADJQTY = (-1) times OLDBAL
(4) If NEWBAL is less than zero and OLDBAL is less than zero:
ADJQTY = zero
8. The Warehouse Balance record is updated.
9. An audit trail record for the component is written to IC100BP2 if any of the following component requirement fields were changed during processing.
a. Status Code (MZSTC)
b. Quantity Per (MZUQTY and/or MXDCC)
c. Scrap Factor (MZSCRF)
d. Required Quantity (MZRQTY)
e. Issue Code (MZISCD)
f. Operation Number (MZOPNO)
g. Engineering Revision Level (MZRLVL)
10. A transaction register record for the component is written to IC100BP2 if at least one of the fields named in step 9 was changed by the user.
Add Component Requirements
1. The component requirement records for the order are added to the Component Requirement file (IC120M). The following activities are performed in sequence.
a. The Component Requirement Asynchronous Transaction file (IC100AP1) is read to obtain the add transaction. If the application lock record is read, the addition of a component requirement is complete. If a file exception occurs on a read, a system abort (ABT0033) results.
b. The Warehouse Balance record for the component part is read for update.
c. The Part Master record for the component part is read for update.
d. The SIR location is validated if the component is a simultaneous issue and receipt (CDISS = S). The usage code is validated if the component's issue code is requisition (CDISS = R). If the part is not valid, an error is generated (MPC0332 if the part is lot-controlled, MPC0100 if the part has no SIR relief location, and MPC3444 if produced component has an issue code of R), and a transaction register record (file IC100CP1) and a transaction error record (file IC505AP) are written for the component. A flag is set that displays a partial completion message (MPW0061) to the user. Processing of the component requirement additions continues with the next component requirement asynchronous transaction record.
Note: If a SIR component is added, the SIR Component Code (HCMRCD) on the order record is ensured to have a value of S.
e. The component requirement record fields are formatted from the values of the transaction.
f. The required quantity is calculated if the order added has open status (HSTATS = O), and the component is an SIR part (MZISCD = 2). The required quantity (MZRQTY) is calculated by multiplying the order quantity (HORDQ) by the quantity per (formatted from MZUQTY and MZDCC). The required quantity is rounded up to the next whole integer.
g. The record is added to the Component Requirements file (IC120M). If the record cannot be added, a system abort (ABT0111) occurs.
h. The record on the Warehouse Balance file (IC140M) for the component part is updated. If the record does not exist, one is created using the system date as the date of last transaction (WBDTLT). If the added order is open (HSTATS = O), the component part is not a reference or non-stocked part, and the added component does not have a canceled status (CZSTC not X), then the following processing occurs: the Allocated Quantity field (WBAQMF) is increased by the Required Quantity (MZUQTY), the on-order quantity field (WBOOMF) is increased by the Required Quantity (MZUQTY) (if the component has a usage code of consumed (MZUSCD = C), and the component has a usage code of produced (MZUSCD = P)), the Date of Last Transaction field (WKTDT) is updated with the current system date (if the system date is greater than the date of last transaction), and the file record is updated. If the above conditions are not met, the record is released unchanged from record lock.
i. The part master net change flag for the component part is updated.
j. An audit trail record for the component is written to IC100BL.
k. A transaction record for the component is written to IC100CL.
Master Operation Rollup
1. This processing takes the labor requirement asynchronous records and connects any master operations to those operations associated with each master. Maintenance can add, change, and delete operations, comments, or alternates. Maintenance also activates alternates and adds or deletes masters. Master operations can thus become out-of-date. Corrections must be made before posting the labor requirements to the master file.
2. Sequential processing of IC100AL3 and IC100AL4 is performed, with IC100AL4 as the driving file.
3. The file is scanned for any operations that are to be associated with Master operations.
4. The following conditions define which operations will be associated with a master operation:
a. The operation is prior to the master operation.
b. The operation is active.
c. Between the operation and the master operation, there are no:
(1) workcenter changes on other active operations
(2) operations with activity reported (LRACTR = Y)
(3) other master operations.
5. For each master operation:
a. The piece rates of associated operations (except for fixed-time operations) are rolled into the master operation's piece rate field.
b. The start date of the most prior operation is placed into the master operation's start date field.
c. The due date of the least prior operation is placed into the master operation's due date field.
d. The setup data of all the operations is summed and placed in the master operation's piece rate field.
e. The operation number of the master operation is placed in all the CZDMOP fields of the associated operations.
Post Labor Requirements
1. Updating the Labor Requirements Master file consists of one of the following:
a. Updating the status of the labor requirements for the order (close, reopen, or release an order with labor requirements).
b. Deleting all the labor requirements for the order (cancel the order).
c. Reading the Labor Requirements Master file for update and moving the new values from the asynchronous file to the master file (change an order/post labor requirement).
d. Posting the new records from the asynchronous file to the Labor Requirements Master file (generate labor requirements).
2. For steps c. and d. above, when the number of records on the master file can change, the processing takes the following form:
a. The last operation flag is set off on the last reportable operation on the order, using file IC125ML2.
b. The asynchronous file is used sequentially.
c. The asynchronous records are posted:
(1) L20 (add) - labor requirement fields are formatted and the record written to the Labor Requirement file.
(2) L30 (change), L31 (activate), and L34 (program updated) - labor requirement fields that have changed are formatted and the Labor Requirement file is updated.
(3) L35 (delete) - the labor requirement record is physically deleted.
3. For each of these, the audit trail fields are formatted and a record is written to IC100BP3.
For (1) and (2) above, for each active record posted, error messages are generated on IC505AP for any scheduling inconsistencies.
For (3) above, if the operation is not a comment, the Labor Requirements Master file is scanned, and any associated comments are deleted. Audit records are written for these deletions also.
Closing Error
1. The component requirement record being processed is released unchanged.
2. A manufacturing order audit trail record is written to IC100BP1.
3. A manufacturing order transaction register record is written to IC100CP1.
4. A manufacturing order transaction error record (MPC0170) is written for the order to IC505AP.
5. An unsuccessful message (MPW0062) is sent to the user.
6. The order is reopened (returned to its condition prior to maintenance) by performing the following steps:
a. The Warehouse Balance record (file IC140M) for the Order Part (CZPPN) is read for update. If the record does not exist, processing continues without error (the record is added later in the process). If the record exists but cannot be successfully read for update, processing for the order stops and a system abort (ABT0155) occurs. A flag is set that causes a flag to be set on in windup, indicating that the integrity of the data base has been damaged.
b. The Part Master record on DE100M for the Order Part (CZPPN) is read for update. If the record cannot be successfully read for update, a system abort occurs (ABT0155). A flag is set that causes a flag to be set in windup indicating the integrity of the data base has been damaged.
c. Steps 7 thru 15 of the Reopen An Order section are performed.
d. The manufacturing order record is released unchanged.
e. The asynchronous transaction records are deleted.