Documentation >
MAC-PAC Technical Library >
Manufacturing >
Transfer Control >
Programs >
Transfer Order Receiving Update - Purpose >
Transfer Order Receiving Update - Calculations
Transfer Order Receiving Update - Calculations
TC135E
A. Housekeeping
1. Parameter lists are set up for receiving data and creating error and warehouse balance records.
2. Key lists are defined for file retrieval.
3. Work fields are defined and program constants are initialized.
4. The following records are retrieved from the Reference file (REFERP):
a. Inventory control defaults (category 436).
b. Quantity fields sizes (category 446).
c. All company/warehouses to which the user is authorized are retrieved from the user/company/warehouse authorization record (category 409) and loaded into an array. If no records are found for the user, a flag is set to authorize the user to all company/warehouses.
d. The multiple/location priority code default is retrieved (category Y34) when new multiple location records for a part are being created.
5. Valid manufacturing and distribution balance types are retrieved from the System Control file (CT100M).
B. Mainline
Mainline processing is repeated until an error occurs or the end of file is reached.
1. The Transfer Order Receiving program (TC130E) accesses the Transfer Order Receipt Location file (TC120B3W) to ensure that records exist to process. If no records exist, the program ends.
2. The update program locks the associated Transfer Order Header and Transfer Order Line files, Multiple Location file, and Warehouse Balance file. The workstation file is then processed until the end of file is reached or an error occurs. If one of the required records cannot be locked or if an overflow occurs during an arithmetic operation, the program ends.
3. All configuration costs are retrieved for configuration costed (PMCFCO = 3 or 4) parts from the Configuration Code file (EC140M). If no record for that part exists in the sending warehouse or the receiving warehouse, one is created with zero costs. If a record exists in the sending warehouse but not the receiving warehouse, the costs are copied to the new record.
4. Balances are updated for each balance type processed.
a. Multiple location totals are accumulated and updated for the Multiple Location file (IC130M). This is done for both in-transit and receiving company/warehouse combinations if the transfer order shipment was not invoiced. Only the receiving company/warehouse multiple location record is updated if the shipment was invoiced.
b. Warehouse totals are accumulated for in-transit and receiving company/warehouses. This is done after costing transactions for the two sets of company/warehouses and new unit costs. The system then verifies if the in-transit company/warehouse defined on Reference File category D07 is a distribution warehouse. If it is not and the in-transit company/warehouse is available for planning, the system uses the balance type defined on Reference File category D07 to receive the inventory.
5. The following totals are also accumulated:
a. Total by line number
b. Total by stock location
c. Total by lot number
d. Total by balance type
Note: In the Transfer Order Shipping program (TC130E) the user may enter a number of records with the same location, lot number, and balance type. These totals are accumulated and a single record is written to the Receipt Location file (TC120B3U).
6. For a given shipment, detail location receipt quantities for each transfer order line are accumulated and this total is written to the Shipment file (TC120BP1).
7. The audit trails are written to record the changes to the shipment, order, line number, etc. The audit trails are designated by type of warehouse. If the shipment was invoiced, records are written to the Purchase Order Receipts Audit Trail file (IC140BP). Otherwise, records are written to both the 'From' and 'To' stock to transfer audit trail files (IC120BP2 and IC120BP3).
8. When the end of file is reached successfully, the program sets the error code and transfer order line number to blanks (to be passed back to TC130E). All records in the Transfer Order Receipt Location/Lot Number workstation file (TC120B3W) are deleted.