F30UI008LoadBOMtoPLCompData

F30UI008 Load BOM to PL Comparison Data

Minor Business Rule

Object Name: N3003070

Parent DLL: CMFGBASE

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
This function will load the F30UI008 work file with Parts from the Parts List table and BOM Master.


1.2Setup Notes and Prerequisites


1.3Special Logic


2.Technical Specifications


2.4Internal Function Load()

1.0Insert Parts List Items

1.1SelectKeyed on F3111 with Input Order Number 1 

While Fetch Is Successful

1.2FetchNext F3111 where
VA OperationSequence 'dfTK Sequence Number

VA PLItem 'dfTK Component Item Number

VA 2ndItemNumber 'dfTK Component 2ndItemNumber

VA 3rdItemNumber 'dfTK Component 3rdItemNumber

VA PLComponentBranch 'dfTK Description

VA PLItemQuantity 'dfTK.Description

VA PLItemUOM 'dfTK Unit of Measure

If FileI/O is Success

1.3SelectKeyed on F3112 with OrderNumber to retrieve the workcenter

1.4FetchNext F3112 whereVA WorkCenter'dfTK Business Unit

1.5Insert Records to F30UI008

BF JobNumber 'e0TK Job Number

BF ComputerID 'e0TK ComputerID

VA WorkCenter 'e0TK Business Unit

VA UnitOfMeasure 'e0TK Unit of Measure

VA ComponentBranch'e0TK Branch

VA ItemQuantiy 'e0TK Units Batch Quantity

VA ItemUOM 'e0TK Unit of Measure as Input

VA 2ndItemNumber 'e0TK 2nd Item Number

VA 3rdItemNumber 'e0TK 3rd Item Number

End While


2.0Insert BOM Items

Note

If Order Qty I (in primary UOM Already) = Batch Bill for the Item
Use that Batch Bill

Else

Use the zero Batch Bill

Endif

VA ConversionFactor = 1

If BOM Unit of Measure in not equal to UOM Display then convert it UOM display

F41002Get Item UOM Conversion

BF BOMBranch 'e0BranchPlant

BF BOMUnitofMeasure'e0FromUnitofMeasure

BF UOMDisplay 'e0ToUnitofMeasure

VA ConversionFactor'dfConversionFactor From to To

VA BOMErrorMsgId 'dfErrorMessageID

'1' 'dfSupressErrorMsg

BF StdUOMConversion'e0StandardUOMConversion


If VA BOMErrorMsgId Not equal to Blank

VA ConversionFactor = 1

Endif

Endif



2.1Whlie Endof BOMStructure = Zero
VA Horizontal Record Found = 0

VA Endof VerticalBranch = 0

VA RecordFlag =0

While Record Flag is not equal to 1 and End of vertical branch not equal to 1


Call BsFn B3000840 (BFGetBOMStructureVertical) to retrieve first record.

BF BOMBranch 'e0ParentBranch
BF BOMParentItemNumber'e0ParentItem

BF BOMTypeBill 'e0TypeofBill

BF BOMBatchQuantity 'e0BatchQuantity

BF BOMUnitofMeasure 'e0BatchQuantityUOM

VA BOMComponentBranch'dfComponentBranch

VA BOMComponentItem 'dfComponentItem

VA BOMQntyRequired 'dfQuantityRequired

VA BOMComponentUM 'dfUnitofMeasure

VA OperationSequence 'dfOperationSequence

VA BOMGenleng 'dfBOMStructureLinkList

'0' 'e0ReturnPointer

'1' 'e0Bill Retrieved

VA BOMErrorMsgID 'dfErrorMsgID

VA 2nd ItemNumber 'dfSecondItemNumber

VA 3rdItemNumber 'dfThirdItemNumber

VA FixedVariableQuantity'dfFixedorVariableQuantity

BF jdAsOfDate 'e0jdAsOfDate


If Successful then

2.2If BOMBatchQuantity is zero and FixedVariable Qty is Variable 

and Level as Integer is equal to zero

VA BatchQuantityRequired  = Multiply VA BatchQuantityRequired by 

Order Qty1 

endif



2.3If BF BOMBatchQuantity in not equal to zero and VA FixedVariableQnty is equal to 
Variable and level as Integer is equal to zero.

VA BOMQuantityRequired = Multiply VA BatchQuantityRequired by BF BOMBatchQuantiy and VA 
ConversionFactor

End If

Calculate extended quantity
F3002 Calculate Extended Quantity

VA BOMQuantityRequired'e0DS Quantity

VA BOMQuantityRequired'e0DS Extended Quantity

Zero'e0DS Delete All nodes

Zero'e0DS Batch Quantity

VAFixedorVariableQuantity'e0DS Fixed Variable

Quantity      

VA Level AsInteger'e0DS Level

VA GenlngExtendedQuantity'df'e0DS Pointer to LinkedList

VA NodeCount'df'e0DS NodeCount

VA RequestedQuantity 'e0DS Requested Quantity


2.4If Phantom Flag is not equal to one
Get Operation WorkCenter from file F3003

BF BOMBranch 'e0Branch

BF BOMParentItemNumber'e0ParentItemNumber

BF BOMTypeBill 'e0TypeRouting

BF BOMBatchQuantity 'e0BatchQuantity

VA OperationSequence 'e0OperationSequence

VA WorkCenter 'dfWorkCenter


2.5Check to see if there is matching record in F30UI008
KeysBF JobNumber, BF ComputerID, VA WorkCenter, VA BOMComponentItem, VA BOMComponentUM
VA RecordFlag = 1

.

2.7If matching record exists update the columns

VA BOMComponentBranch 'e0TK Component Branch

VA BOMComponentUM 'e0TK Unit Of Mesure Display

VA BOMQntyRequrired 'e0TK Quanity

Else 

Insert new record

BF JobNumber 'e0TK Job Number

BF ComputerID 'e0TK ComputerID

VA WorkCenter 'e0TK Business Unit

VA BOMUnitOfMeasure 'e0TK Unit of Measure

VA BOMComponentBranch 'e0TK Component Branch

VA BOMQntyRequired 'e0TK Quantity

VA BOMComponetUM 'e0TK Unit of Measure as Display

VA 2ndItemNumber 'e0TK 2nd Item Number

VA 3rdItemNumber 'e0TK 3rd Item Number

Endif

Endif

EndWhile


2.8VA Horizontal Flag = 1
While VA Endof BOMStructure is Zero and VA Horizontal Flag = 1
Call BsFn B3000840 (BFGetBOMStructureHorizontal) to retrieve subsequent horizontal BOM 
While VA End of BOMStructure is equal to zero
BF BOMBranch 'e0ParentBranch

BF BOMParentItemNumber'e0ParentItem

BF BOMTypeBill 'e0TypeofBill

BF BOMBatchQuantity 'e0BatchQuantity

BF BOMUnitofMeasure 'e0BatchQuantityUOM

VA BOMComponentBranch'dfComponentBranch

VA BOMComponentItem 'dfComponentItem

VA BOMQntyRequired 'dfQuantityRequired

VA BOMComponentUM 'dfUnitofMeasure

VA OperationSequence 'dfOperationSequence

VA BOMGenleng 'dfBOMStructureLinkList

'0' 'e0

Data Structure

D3003070 - F30UI008 Load BOM to PL Comparison Data

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberAJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

szComputerIDCTIDcharNONENONE

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.

mnOrderQtyUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

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

szBOMBranchMMCUcharNONENONE

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.

szBOMTypeBillTBMcharNONENONE

A user defined code (40/TB) that designates the type of bill of material. You can define different types of bills of material for different uses. 
For example:    M     Standard manufacturing bill    RWK   Rework bill    SPR   Spare parts bill  The system enters bill type M in the work order 
header when you create a work order, unless you specify another bill type. The system reads the bill type code on the work order header to 
know which bill of material to use to create the work order parts list. MRP uses the bill type code to identify the bill of material to use when it 
attaches MRP messages. Batch bills of material must be type M for shop floor management, product costing, and MRP processing.

jdAsOfDateBOMASDE1JDEDATENONENONE

The date used for effectivity checking. Enter a specific date to display documents (orders, bills of material, routings, as applicable) that are 
effective on or after that date. The current system date is the default, but you can enter any future or past date.

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

szBOMUnitOfMeasureUOMcharNONENONE

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

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIDDTAIcharNONENONE

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.

cSuppressErrorMessageSUPPScharNONENONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

mnParentitemPLITMMATH_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

szUOMDisplayUOMcharNONENONE

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

szStdUOMConversionTFLAcharNONENONE

Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:    blank Use the item-specific 
unit of measure    1       Bypass the item-specific unit of measure and use the standard unit of measure

cIncludePhantomPHANTcharOPTNONE

Use this option to specify whether to include phantom items. Valid values are:    0   Default    1   Include phantom items 

cIncludeSubassembliesEV01charOPTNONE

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

Related Functions

None

Related Tables

None