UpdateRoutingForPOReceipts

Update Routing For PO Reciepts

Minor Business Rule

Object Name: B3100730

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will retrieve the Routing Instructions (F3112) record for the parameters passed in and 
update the Quantity Completed (SOQS), the Quantity Scrapped (SOCN), the Unit of Measure (UOM), and the 

Operation Status (OPST) values. Additionally, it will relieve the Purchase Order inventory from the 

Item Location (F41021) the first time it is called.


1.2Setup Notes and Prerequisites

• This function is intended to be used in conjunction with the Routing Quantities and Status Window 
(P3103).

• It will be called by the PO Receipts edit object. PO Receipts (P4312) will call the Routing Status & 
Quantities Window for each record in it's subfile. The window retrieves the Routing Instructions 

(F3112) record for the parameters passed in. This window will give the user the opportunity to enter a new 

Quantity Completed (SOQS), Quantity Scrapped (SOCN), Unit of Measure (UOM), and Operation Status 

(OPST) for the Routing Instructions record. These values will be passed back to the calling application. 

• The PO Receipts will call the Update Routing For PO Receipts (B3100730.C) business function with the 
parameters returned from the window. It will attempt to find and update the Routing Instructions 

record with the data passed in if there was no errors returned by the window. Additionally, the first time 

this function is called it attempts the relieve inventory for the Purchase Order for the primary Item 

Location (F41021) record. 


1.3Special Logic

None.


2.Technical Specifications

2.4Processing 

'b7 Retrieve the Routing Instructions (F3112) record for the Order Number (DOCO), Operation Sequence 
(OPSQ), Type Operation Code (OPSC), and Work Center (MCU) values passed in. If the record was not 

found then set on error '0002' (Record Invalid) and exit the business function.

'b7 Call Get Audit Info (B9800100.C) to retrieve the system information.

'b7 Relieve the Purchase Order Inventory. 

If the First Pass parameter is on then  
Retrieve the Item Branch (F4102) record using Get Item Branch Mfg Data (B4000920.C) with the Short 
Item Number (ITM) parameter and the Branch (MMCU) retrieved from the Routing Instructions (F3112) 

file. 

If the record was found then 

Retrieve the primary Item Location (F41021) record using Verify and Get Item Location (XF41021.C) 
with the same values (set XF41021 parameters Index = '1' and Keys = '3') and save the file 

pointer. 

If the record was found then  
Retrieve the Item Master using Get Item Master Description UOM (B4001040.C) with the Routing 
Instruction's Kit Short Item Number (KIT) and Branch. Return the Item Master's Primary Unit of Measure 

(UOM1), the Second Item Number (LITM), the Third Item Number (AITM)

If the Unit of Measure parameter does not equal the Item Master's Primary Unit of Measure (UOM1) 

then find the Unit of Measure parameter to Item Master's Primary Unit of Measure conversion factor 

using Get Item UOM Conversion (B4000520.C). Else, set the conversion factor to '1'. 

Multiple the Quantity Completed parameter by the conversion factor. 

Subtract the result from the Item Location's Primary Qty on Hand (PQOH) and update the Item 

Location record using Update Primary Location (XF41021.C). 

Load Item Ledger (F4111) fields and write the Item Ledger record using Write Cardex Record 

(B4100040.C). 

'b7 Update the Routing Instructions (F3112) record.

If it was not already done above, retrieve the Item Master (F4101) record using the Routing 
Instructions' Kit Short Item Number (KIT) and Branch (MMCU). 

If the Unit of Measure (UOM) parameter does not equal the Routing Instruction's Unit of Measure 

(UOM) then call Get Item UOM Conversion Factor (B4000520.C) to get the Unit of Measure parameter to 

Routing Instruction's Unit of Measure conversion factor. Else, set the conversion factor to '1'.

If the conversion factor was not found then don't update the Routing Instruction record.

Otherwise, 

Load the system information retrieved from B9800100 (and Program ID (PID) set to 'EP3103') to the 
Routing Instructions record.

Load the Unit of Measure and Operation Status parameters to the Routing Instructions record.

Multiply the Quantity Completed and Quantity Scrapped parameters by the conversion factor and add 

the results to the appropriate Routing Instructions fields (SOQS and SOCN).

Update the Routing Instructions record. 

'b7 Free memory allocated and exit the business function.


Data Structure

D3100730 - Update Routing For PO Reciepts

Parameter NameData ItemData TypeReq/OptI/O/Both
mnOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

mnOperationSequenceOPSQMATH_NUMERICNONENONE

A number used to indicate an order of succession. In routing instructions, a number that sequences the fabrication or assembly steps in the 
manufacture of an item. You can track costs and charge time by operation. In bills of material, a number that designates the routing step in the 
fabrication or assembly process that requires a specified component part. You define the operation sequence after you create the routing 
instructions for the item. The Shop Floor Management system uses this number in the backflush/preflush by operation process. In engineering 
change orders, a number that sequences the assembly steps for the engineering change. For repetitive manufacturing, a number that 
identifies the sequence in which an item is scheduled to be produced. Skip To fields allow you to enter an operation sequence that you want to begin 
the display of information. You can use decimals to add steps between existing steps. For example, use 12.5 to add a step between steps 
12 and 13.

szWorkCenterMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szTypeOperationCodeOPSCcharNONENONE

A user defined code (30/OT) that indicates the type of operation. Valid values include: A Alternate routing   TT Travel time   IT Idle time   T Text

mnQuantityCompletedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnQuantityScrappedSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

szUnitOfMeasureUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szOperationStatusOPSTcharNONENONE

User defined code system 31, type OS. The operation status code that identifies the current status of a work order or engineering change 
order as the operation steps in the routing are completed.

cFirstPassEV01charNONENONE

An option that specifies the type of processing for an event.

cSuppressErrorMessageEV02charNONENONE

An option that specifies the type of processing for an event.

szErrorMessageDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

mnPurchasingUnitPricePRRCMATH_NUMERICNONENONE

The unit cost of one item, as purchased from the supplier, excluding freight,taxes, discounts, and other factors that might modify the actual 
unit cost you record when you receive the item.

mnAmountExtendedPriceAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

szLotLOTNcharOPTNONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

Related Functions

B4000460 Free Ptr To Data Structure
B4000520 Get Item UoM Conversion Factor
B4000920 Get Item Branch Mfg Data
B4001040 Get Item Master Description UOM
B4100040 Write Cardex Record
B9800100 Get Audit Information
XF41021 Update F41021 Locations

Related Tables

F3112 Work Order Routing
F3112T Shop Floor Control Routing Instructions Tag Table - Needed f
F41021 Item Location File