SelectRoutingInstruction

Select Routing Instruction

Major Business Rule

Object Name: B3001000

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
The purpose of the Select Routing Instruction BsFn is to select the Routing Instruction that will be 
used by the application or to indicate that the Routing selection window should be displayed if 

multiple Routing Instructions exist.  If the requested routing instructions exists or only one alternative 

routing instruction exists, the Routing Instruction Information will be returned and indicators will 

show only one routing selected.  If more than one alternative Instruction exists, indicators will show 

that the Routing Instruction Selection Window should be called.


1.2Setup Notes and Prerequisites

• This BsFn should be called when the find button is pressed.
• The Requested Quantity must be converted to the item primary UOM prior to calling this BsFn.  Use 
the BsFn ConvertBatchQuantity to convert the requested quantity from display to file/primary UOM. 

• Pass in one of the four following combinations of key fields  (Pass in DS Branch, DS Item Number, DS 
Requested Quantity, and/or DS Type of Routing).

• MMCU, KIT, TRT, BQTY
• MMCU, KIT, TRT
• MMCU, KIT, BQTY
• MMCU, KIT
• If only one record is found, the Branch, Parent Item #, Type, and Batch Quantity of that Bill will 
be returned.

• The Batch Quantity of the record located is in the item primary UOM.  After calling this BsFn, 
convert the batch quantity to display UOM using the BsFn ConvertBatchQuantity.

• If Instructions Found is equal to '2', call the Routing Instruction Selection Window (P3003W).
• Suppress the FIND in the ER if either cancel is pressed in the Routing Instruction Selection Window 
or Instructions Found='0' is returned from the Select Routing Instruction BsFn.


1.3Special Logic


2.Technical Specifications


2.4Processing 


0.  initialize DS RequestedInstructionFound = '0'

1.  If DS Requested Quantity is NOT equal to zero and DS Type of Routing is NOT equal to blank
1.1.  Search for Routing Instruction using MMCU, KIT, TRT, and BQTY.
1.1.1  If the Routing Instruction is located, return the following information:
DS Type of Routing=  F3003 Type of Routing (TRT)
DS Batch Qty=  F3003 Batch Qty (BQTY)

DS Unit of Measure=  F3003 Unit of Measure (UOM)

DS Requested Instruction Found=  '1'

DS Instruction Found=  '1'

(return)

1.1.2. If the Routing Instruction is not located, search for Routing Instruction using MMCU, 
KIT, and TRT.  Determine if either one, multiple, or no Routing Instructions exist.

(If more than one routing instruction exists where MMCU = DS Branch, KIT = DS ParentItem, 
TRT = DS TypeOfRouting, and BQTY is not = the BQTY of the previously read record, then 

multiple routing instructions exits.)

1.1.2.1.  If one Routing Instruction is found, return the following information:

DS Type of Instruction=  F3003 Type of Routing (TRT)

DS Batch Qty=  F3003 Batch Qty (BQTY)

DS Unit of Measure=  F3003 Unit of Measure (UOM)

DS Instructions Found=  '1'

1.2.2.2.  If more than one Routing Instruction is found, return the following information:
DS Instructions Found=  '2'

1.2.2.3.  If no Routing Instruction records are found, assign DS Requested Instruction 
Found='0',  DS Instructions Found = '0' and return.


2.  If the requested quantity is equal to zero and the Type of Routing is NOT equal to blank.

2.1.  Search for Routing Instruction using MMCU, KIT, and TRT.  Determine if either one, multiple, 
or no routing instructions exist.

(If more than one routing instruction exists where MMCU = DS Branch, KIT = DS ParentItem, TRT = 
DS TypeOfRouting, and BQTY is not = the BQTY of the previously read record, then multiple 

routing instructions exits.)

2.1.1.  If one Routing Instruction is located, return the following information:

DS Type of Instruction =  F3003 Type of Routing (TRT)
DS Batch Qty=  F3003 Batch Qty (BQTY)

DS Unit of Measure=  F3003 Unit of Measure (UOM)

DS Instructions Found=  '1'

2.1.1.1.  If F3003 Batch Quantity is equal to zero, assign DS Requested Instruction Found = 
'1'.

2.1.2.  If more than one Routing Instruction is located, return the following information:
DS Instructions Found=  '2'

2.1.3.  If no Routing Instruction's are found, assign DS Requested Instruction Found='0', DS 
Instructions Found = '0' and return.


3.  If the requested quantity is NOT equal to zero and the Type of Routing is equal to blank,

3.1.  Search for Routing Instruction using MMCU, KIT, and BQTY.  Determine if either one, multiple, 
or no routing instructions exist. 

(If more than one routing instruction exists where MMCU = DS Branch, KIT = DS ParentItem, and 
either TRT or BQTY is not equal to the value of a previously read record, then multiple routing 

instructions exits.)

3.1.1.  If one Routing Instruction is located, return the following information:

DS Batch Qty=  F3003 Batch Qty (BQTY)
DS Unit of Measure=  F3003 Unit of Measure (UOM)

DS Type of Routing =  F3003 Type of Routing (TRT)

DS Requested Instruction Found=  '1'

DS Instructions Found=  '1'

3.1.2.  If more than one Routing Instruction is located, return the following information:
DS Instructions Found=  '2'

                           DS Type of Routing                         = ' '

3.1.3.  If the Routing Instruction is not located, search for Routing Instruction using MMCU 
and KIT.

3.1.3.1.  If one Routing Instruction is found, return the following information:
DS Batch Qty=  F3003 Batch Qty (BQTY)

DS Unit of Measure=  F3003 Unit of Measure (UOM)

DS Type of Routing =  F3003 Type of Routing (TRT)

DS Requested Instruction Found=  '1'

DS Instructions Found=  '1'

3.1.3.2.  If more than one Routing Instruction is found, return the following information:
DS Requested Instruction Found=  '0'

DS Instructions Found=  '2'

3.1.3.3.  If not Routing Instruction's are found, assign DS Requested Instruction 
Found='0', DS Instructions Found = '0' and return.


4.  If the requested quantity is equal to zero and the Type of Routing is equal to blank, 

4.1.  Search for Routing Instruction using MMCU and KIT.  Determine if either one, multiple, or no 
routing instructions exist.

(If more than one routing instruction exists where MMCU = DS Branch, KIT = DS ParentItem, and 
either TRT or BQTY is not equal to the value of a previously read record, then multiple routing 

instructions exits.)

4.1.1.  If one Routing Instruction is located, return the following information:

DS Type of Routing =  F3003 Type of Routing (TRT)
DS Batch Qty=  F3003 Batch Qty (BQTY)

DS Unit of Measure=  F3003 Unit of Measure (UOM)

DS Requested Instruction Found=  '1'

DS Instructions Found=  '1'

4.1.2.  If more than one Routing Instruction is located, return the following information:
DS Instructions Found=  '2'

4.1.3.  If the Routing Instruction is not located, assign DS Requested Instruction Found ='0', 
DS Instructions Found = '0' and return.


Data Structure

D3001000 - Select Routing Instruction

Parameter NameData ItemData TypeReq/OptI/O/Both
szBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

mnItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

mnRequestedQuantityRQTE1MATH_NUMERICNONENONE

The number of parent items that you want to process. The system calculates lower level values in quantity per the number of parent items 
requested. For instance, if it takes 3 components per a parent item, then with a requested quantity of 10, the system would plan and cost for 30 
components.

szTypeOfRoutingTRTcharNONENONE

A user defined code (40/TR) that indicates the type of routing. You can define different types of routing instructions for different uses. For 
example:    M    Standard Manufacturing Routing    RWK  Rework Routing    RSH  Rush Routing You define the routing type on the work order 
header. The system then uses the specific type of routing that you define in the work order routing. Product Costing and Capacity Planning systems 
use only M type routings.

cRequestedInstructionFoundEV01charNONENONE

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

cInstructionFoundEV01charNONENONE

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

mnBatchQuantityBQTYMATH_NUMERICNONENONE

The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
based on the amount of finished goods produced. For example, 1 ounce of solvent is required per unit up to 100 units of finished product. 
However, if 200 units of finished product is produced, 2 ounces of solvent are required per finished unit. In this example, you would set up batch 
quantities for 100 and 200 units of finished product, specifying the proper amount of solvent per unit.

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

Related Functions

None

Related Tables

F3003 Routing Master File