DeleteBillofMaterial

Delete Bill Of Material

Major Business Rule

Object Name: B3001220

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
The purpose of this business function is to delete records from the Bill of Material or delete the 
entire Bill of Material.  Selected records for the Bill of Material are deleted..  The Component 

Locators and Substitute Items associated to the Bill of Material records are also deleted.  The MRP net 

change flag is updated.  If the Bill of Material updates are being logged, the deletion of the bill of 

material records will be recorded in the audit log. 



1.2Setup Notes and Prerequisites

• When a component is deleted from the Bill of Material, all Substitute Items and Compoent Locators 
associcated to that item are also deleted.

• To Delete all lines of a Bill of Material pass the following fields:
• Branch 
• Parent Item 
• Type of  Bill
• Batch Quantity.
• To Delete a single line from the Bill of Material pass the following fields:
• Branch 
• Parent Item 
• Type of Bill 
• Batch Quantity
• Line No.

1.3Special Logic



2.Technical Specifications


2.4Processing 


0.0.  Initialize Work Fields.

WK cNetChangeFlag = '0'

cCOBY= ' '


1.0.  Determine value of MRP Net Change Flag using BF GetItemBranchMfgData.

GetItemBranchMfgData

DS ParentItem>ItemNumber

DS ParentBranch(MMCU)>Branch

WK NetChangeFlag<NetChangFlag

'1'>SuppressErrorMessages


2.0.  Select Bill of Material Records 

whereMMCU =DS ParentBranch

KIT=DS ParentItem

TBM=DS BillType

BQTY=DS BatchQuantity

COBY=blanks


3.0.  If DS Line Number is not equal to NULL or ZERO, select Bill of Material Records where CPNT = DS 

Line No.


4.0.  Process selected records from F3002 until fetch fails.


4.0.  Reset work fields.

WK TextLine = 'N'

WK IsLineTextLine = '0'


5.0.  Retrieve Line Type Constants using BF GetLineTypeConstants.

GetLineTypeConstants

F3002 LineType (LNTY)>LineType

WK TextLine<TextLine

'1'>SuppressErrorMessages


6.0.  If F3002 LineType is equal to 'T' or WK TextLine = 'Y', then the line WK IsLineTextLine = '1'.


7.0.  If WK Net Change Flag is not equal to '1', and

If the line is not a text line, update the MRP net change flag in F4102 using BF 
UpdateF4102NetChg.

UpdateF4102NetChg

F3002 ParentItem(KIT)>Item Number

F3002 ParentBranch(MMCU)>Branch

'1'>MRPNetChangeFlag

DS Program Id>Program ID

Assign WK Net Chang Flag = '1'


8.0. If F3002 SubstituteItemSequence (SBNT) is equal to 0, Delete Component Locators using  BF 

DeleteComponentLocators.

DeleteComponentLocators

F3002 ParentBranch (MMCU)>ParentBranch

F3002 ParentItemShort(KIT)>ParentItemShort

F3002 ItemNumber(ITM)>ComponentShort

F3002 LineNo(CPNT)>ComponentLineNo

F3002 EffectiveFrom (EFFF)>EffectiveFrom

F3002 EffectiveThru (EFFT)>EffectiveThru


9.0.  If bill of material changes are being logged (DS Log BillofMaterial = '1' or 'Y'), update the 

bill of material audit log using BF UpdateBOMAuditLog.

UpdateBOMAuditLog

'3'>Mode

F3002 ParentBranch(MMCU)>ParentBranch

F3002 ParentItem(KIT)>ParentItem

F3002 TypeofBill(TBM)>TypeofBill

F3002 BatchQuantity(BQTY)>BatchQuantityFile

F3002 LineNo(CPNT)>LineNo

F3002 SubstituteItemSequence(SBNT)>SubstituteItemSequence

'1'>SuppressErrorMessages

WK ErrorMessageID>ErrorMessageID


10.0.  Delete the record from the Bill of Material Table.


^

Data Structure

D3001220 - Delete Bill of Material Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szParentBranchMMCUcharNONENONE

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.

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

szBillTypeTBMcharNONENONE

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.

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.

cLogBillOfMaterialEV01charNONENONE

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

szProgramIdPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cSuppressErrorMessagesEV01charNONENONE

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

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.

mnLineNumberCPNBMATH_NUMERICOPTNONE

A number that specifies how the system displays the sequence of components on a single-level bill of material. This number initially 
indicates the sequence in which a component was added to the bill of material. You can modify this number to change the sequence in which the 
components appear.

Related Functions

B3000410 Delete Component Locator
B3000420 Update BOM Audit Log
B4000260 Line Type - Activity Rules
B4000920 Get Item Branch Mfg Data
B4000930 Update F4102 MRP Net Chg

Related Tables

F3002 Bill of Material Master File