MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Design Engineering > Programs > Product Structure Maintenance - Purpose > Product Structure Maintenance - Calculations

Product Structure Maintenance - Calculations

DE120E

A.   Housekeeping

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

2.   Records retrieved from the System Control file (CT100M):

a.   The company name is retrieved from the company name record (COMNAM) for output on reports.  If this information is not available, a message is sent to the system operator and processing continues.

3.   Records retrieved from the Reference file (REFERP):

a.   The date format is retrieved from the Reference File (category 049).  If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.

b.   The ECO date update option is retrieved from the Reference File (category C12).  If this information is not available, the program aborts and a system error report is written.

c.   Reference File category 409 is read to determine to which plants the user is authorized.

d. The default plant is retrieved from the Reference File (category 428).

e. Reference File category N37 is read to determine the message queue assignment for the manufacturing monitor (monitors).

B.   Mainline

1.   This program is directed by the Program Status field (PGMSTS) and is dependent upon the processing mode.

a.   In Online Update mode, the program performs key validation and retrieves current Product Structure file values for display when program status is PMT (Function Select Screen).

(1)  After the user has entered data on the Function Select screen, the program status is changed to DET (Detail Screen).  Detailed field validation is performed and the transaction, if valid, is posted.  Bill of material comments can be added at this time via function key (F18).  DE125E (BOM Comment Maintenance program) is called.  See Design Engineering Program Documentation for DE215E for further processing information.

(2)  Report records are written for the Product Structure Maintenance Audit Trail file (DE120BL) and the Product Structure Transaction Register file (DE120CL).

(3)  If the transaction is invalid, all errors are displayed and the Product Structure file (DE120M) is not updated.

b.   When a copy bill of material transaction is entered in Online Update mode, detail field validation is performed.

(1)  The user can specify whether to copy BOM comments along with the product structure.  The Copy Comments field is validated.  If the Copy Comments field is set equal to Y, DE121E is called to process the BOM comment copy.

(2)  Errors found at this level are displayed.  If no errors are found, the transaction is written to the Product Structure Asynchronous Transaction file (DE120DP).

(3)  A message is sent to the Asynchronous Message Queue along with the transaction key.  At this point, the user can continue entering transactions in Online Update mode.

(4)  The Asynchronous Message Monitor reads the message from the queue and calls the Product Structure Maintenance program in Asynchronous mode.  The program reads the transaction, validates the fields and posts valid transactions.

(5)  Report records are written.  If errors are found, the transaction image and all errors are written to the Transaction Register file (DE120CL).

c.   Data Entry processing is similar to Online Update processing, with several exceptions.

(1)  Current master file values are not displayed in Data Entry mode.

(2)  Instead of updating the master file, the Product Structure Transaction file (DE120AL) is created for off-line processing.  Transactions in error can be accepted for entry using a command key.

(3)  This capability allows the user to enter transactions with errors, assuming those errors will not exist when the transaction is processed off-line.

(4)  Report records are not written in Data Entry mode.

d.   In off-line processing mode, input is taken from the Product Structure Transaction file (DE115AL), which is read in posting key sequence.

(1)  Off-line processing input comes from two sources.  The first is via product structure data entry through alternate maintenance mode.  In this way the files DE120AP1 and DE120AP2 are updated; significant field values are shown below (PSTSEQ and FUNCTN).

Secondly, these transaction files may be populated in another manner, for example, when converting from another system.  When populating these transaction files (DE120AP1 and DE120AP2), the significant field values below must be included exactly as shown.  Thus, FUNCTN fields must be in upper case and right-justified.

 

Transaction Code*


Posting Description

Sequence (PSTSEQ)


   File   


Function (FUNCTN)

SA1

Addition

34

DE120AP1

'ADDITION'

SA2

Copy BOM

31

DE120AP2

'COPY BOM'

SD1

Delete

32

DE120AP1

'DELETION'

SC1

Change Description

36

DE120AP1

'CHANGE (DESC)'

SM1

Mass Deletion

30

DE120AP1

'MASS DELETION'

 

* On audit trails and transaction registers.

(2)  The Program Status field is DET (Detail Screen) until the end of the transaction file is read.

(3)  If a transaction is valid, the new values are moved into the corresponding master file fields.

(4)  Report records are written to the Product Structure Maintenance Audit Trail file (DE120BL) and the Transaction Register file (DE120CL), but output of the product structure record is held until a key break is determined.

(5)  An image of each invalid transaction is output to the Transaction Register file (DE120CL).

(6)  Error records for each error encountered are output to the Design Engineering Transaction Error file (DE545AP).

(7)  The Product Structure file is not changed by invalid transactions.

2.   The following functions are performed during product structure maintenance.

Plant Validation

a.   When F17 is pressed, the user may input the plant from which all part validation will be performed.

b.   The default plant was loaded in Housekeeping from the Reference File (category 428) based on the terminal ID.

c.   The plant must be a valid plant on the Warehouse Description file (IC170ML2) and the user must be authorized to maintain this plant based on Reference File category 409.

d.   The current cost effectivity date is loaded from the Cost Generation Request file (PC130AP) for the specified plant.

Function Select

a.   Maintenance function, Part Number and Sequence Number (sequence number entered in Online Update mode only) are entered and the Maintenance Code is validated.

b.   The program remains in the selected function until a new function is requested.

c.   A reference number may be specified to identify transactions.  The default value is the user profile name.

Addition

a.   All required fields and desired optional fields that are entered are validated.  See the Design Engineering User Manual for validation rules.

b.   The part master record for the parent part is read for update.  This prevents other users from deleting the parent part.  A new product structure record is added to the file.

(1)  When the addition is complete, the product structure flag (OLFLG5) on the parent part master record is set to 1.

(2)  The cost flag (OLFLG1) is set to 1 and the part master net change flag is set for re-planning (PMNCFL = 2) unless the parent part is a planning part or the structure being added is a reference structure.

c.   The low level codes of the new structures are checked, validated, and updated on the Part Master file (DE100MU).

d.   The component part master record is retrieved.  If the part has been flagged for deletion or the part type has been changed to cause an invalid combination with the parent part, a critical error results; the structure is deleted and the low level codes are reversed.

(1)  Valid part types for the parent part are:  manufacturing, planning, build-thru, and transfer.  Valid part types for the component parts are:  purchased, manufacturing, raw materials, planning, reference, build-thru, transfer, by-product, and non-stocked.  If the component part is a planning part type then the parent must also be a planning part type.

(2)  If the parent part is a planning part, then the scrap factor must be zero.

(3)  If the component is not a by-product, the usage code must be consumed:  C.  Otherwise, for by-product components it can be Produced:  P or Consumed:  C.

(4)  For reference components, the reference code must be R (for Reference Product Structure).  Otherwise, it can be blank or R.

e.   The Eng Change Order-In and Out and Eng Effectivity Date In and Out fields are validated against the Engineering Change Order file and Reference File category C12, ECO date update option.

(1)  If category C12 is equal to 1, then one of the Eng Change Order-In and Out fields is required and the Eng Effectivity Date-In and Out fields are defaulted from the Engineering Change Order file (DE160M).

(2)  If category C12 is equal to 2, then the Eng Change Order-In and Out and Eng Effectivity Date-In and Out fields are optional.  If the Eng Change Order-In and/or Out fields are entered, the Eng Effectivity Date-In and/or Out fields are defaulted from the Engineering Change Order file.  If the Eng Effectivity Date-In and/or Out fields are entered, the eng change order-in or out cannot be entered.

(3)  If category C12 is equal to 3, then the Eng Change Order-In and Out and Eng Effectivity Date-In and Out fields are optional.  If the Eng Change Order field is entered and the Effectivity Date field is left blank, the effectivity date will be defaulted from the Engineering Change Order file (DE160M).

f.    If the addition is valid, report records are written during online and off-line processing to record data base activity.  Report records are not written in Data Entry mode.

(1)  Report records are written to the Design Engineering Transaction Register file (DE120CP1) and the Maintenance Audit Trail file (DE120BP1).

Change:  The following processing occurs for each product structure change transaction.

a.   The Product Structure file (DE120M) and the Part Master file (DE100M) are read for inquiry.  All transaction change fields are validated.  See the Design Engineering User Manual for validation rules.  If the user has not made changes, the transaction is rejected as invalid.

b.   The product structure record and the parent part master record are read for update.  If another user has updated the product structure record since this transaction was begun (intervening update), a warning message is output.

(1)  The product structure record is updated with the changed fields.  (In Data Entry mode, instead of updating the master file, a transaction is output to DE120AP1.)

(2)  The product structure flag (OLFLG5) is set to 1 on the parent part master record.

(3)  If the Quantity Per was changed or if the structure was changed to or from a reference structure, the cost flag (OLFLG0) is set to 1.  The cost flag may also be set to 1 if an effectivity date is changed that moves the date in or out of the period marked by the Current Cost Effectivity Date (CZDAT1) and the Part Master Bill of Material Effectivity Date (AMCEA).

(4)  If the parent part is a planning or build-thru part type or if the structure is a reference structure, the cost flag (OLFLG0) is not set to 1.

(5)  If the Batch Quantity, Quantity Per, Scrap Factor, Usage Code, Reference Code, Component Offset Days, Deduct Operation, Effectivity Date-In or Effectivity Date-Out is changed, the parent part master net change flag is set for re-planning (PMNCFL = 2).  After the successful update of the product structure record, the parent part master record is updated.

c.   Report records are written during online and off-line processing to record data base activity.  Report records are not written in Data Entry mode.

(1)  Report records are written to the Transaction Register file (DE120CP1) and the Maintenance Audit Trail file (DE120BP2).

Copy Bill of Material

a.   In both Online Update and Data Entry modes, the fields are validated and the transaction is written to the appropriate transaction file.  See the Design Engineering User Manual for validation rules.

(1)  In Online Update mode, the transaction is written to the Asynchronous Transaction file (DE120DP) and a message is sent to the Asynchronous Message Monitor.

(2)  In Data Entry mode, the transaction is written to the physical Product Structure Transactions file (DE120AP2), for later processing off-line.

b.   In Asynchronous mode, the transaction is read and field validation is performed.  Errors are written to the Design Engineering Transaction Error file (DE545AP) and appear on the Transaction Register report.

(1)  If there are no critical errors, the first structure to be copied is read for inquiry.  The new addition is formatted and processed like a regular addition.

(2)  If a critical error occurs, a message is output to warn the user that not all components were copied.  The original structure is read until all structures are processed.  The current cost flag (OLFLG0), the product structure flag (OLFLG5) and the net change flag (PMNCFL) are updated, using the same logic as that described for addition transactions.

c.   Report records are written during online and off-line processing to record data base activity.

(1)  Transaction register (DE120CP2) and maintenance audit trail (DE120BP1) report records are output.  One audit trail report record is written for each addition.

Deletion

a.   The product structure record is read for inquiry.  A warning message is displayed requesting the user to press the Enter key in order to process the transaction.

b.   The product structure record and the parent part master record are read for update.  The product structure record is physically deleted from the file.  The parent part master structure flag (OLFLG5) and cost flag (OLFLG0) are set to 1 , the net change flag is set for re-planning (PMNCFL = 2) for non-reference parts, and the record is updated.  (Data Entry processing outputs a transaction record to file DE120AP1 instead of updating the files.)

c.   Report records are written during online and off-line processing to record data base activity.  Report records are not written in Data Entry mode.

(1)  Report records are written to the Transaction Register file (DE120CP1) and the Maintenance Audit Trail file (DE120BP1).

Mass Deletion

a.   The Product Structure file (DE120M) is checked to ensure that at least one structure record exists for the specified part.  A warning message is displayed requesting the user to press the Enter key in order to process the transaction.

b.   The parent part master record and the first product structure record are read for update.  The product structure record is physically deleted from the file.  The cost flag (OLFLG0) and the product structure flag (OLFLG5) are set to 1 and the net change flag is set for re-planning (PMNCFL = 2).  The parent part master record is updated.  If the parent is a planning part or if the structure is a reference structure, the cost flag and the net change flag are not updated.  The next product structure record is read for update and deleted.  This process continues until all product structure records for the specified part are deleted.

c.   Report records are written during online and off-line processing to record data base activity.  Report records are not written in Data Entry mode.

(1)  Report records are written to the Transaction Register file (DE120CP1) and the Audit Trail file (DE120BP1).  One audit trail record is output for every structure deleted.

3.   Record locks that are unique to this program are described below.

Application Function


File


Lock Type


Reason for Lock

Addition

Part Master (DE100M)

Update

To update low level codes and flags and to prevent deletion.

Change

Part Master (DE100M)

Update

To update flags.

Change

Product Structure (DE120M)

Update

To prevent other users from updating this record.

Deletion

Part Master (DE100M)

Update

To update flags.

Deletion

Product Structure (DE120M)

Update

To exclude other users from updating this record.

Mass Deletion

Part Master (DE100M)

Update

To update flags.

Mass Deletion

Product Structure (DE120M)

Update

To exclude others from updating this record.

Copy Bill of Material

Part Master (DE100M)

Update

To update low level codes and flags, and to prevent deletion.