UseabilityDestroyLinkList

Useability - Get BOM Child/Sibling

Major Business Rule

Object Name: B3001700

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This BF destroys the linklist created during BOM explosion. 



1.2Setup Notes and Prerequisites

Pass the pointer to the linklist.


1.3Special Logic

None

Data Structure

D300170C - Useability - Destroy Link List

Parameter NameData ItemData TypeReq/OptI/O/Both
idBOMStructureLinkListGENLNGIDNONENONE

General purpose ID variable.

Related Functions

B3001680 Cache - Process Part Useability

Related Tables

None
UseabilityGetBOMChild

UseabilityGetBOMChild

Useability - Get BOM Child/Sibling

Major Business Rule

Object Name: B3001700

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This BF retrieves the next vertically related item in the BOM structure required in the Bill of 

Material explosion process, stores it in a link list, and returns it to the calling application. 



1.2Setup Notes and Prerequisites

• This BF is part of the On-Line BOM Explosion process.  The On-Line BOM Explosion process includes 
standard ER for BOM explosion and additional Business Functions that have been created for On-line Bill 

of Material Explosion.

• Each time the BF is called, the next vertical level will be stored in the link list and returned to 
the calling application.

• The calling program should write the first level of the bill of material to the grid. 
• After level 1 is written to the grid, call this BF passing the values from the first level.
• If the next level is found, write a custom grid line with the values returned  and call the BF again 
passing the values from the level that was just written.  continue this step until End of Vertical 

Branch.

• At End of Vertical Branch, one vertical branch of the bill of material structure will be written to 
the grid.

• After the BOM has been completely exploded, call BF DestroyLinkList after BOM has been exploded.
• The calling application/function must pass a Job Number (JOBS) which uniquely identifies a cache 
being used for this inquiry session;  this Job Number is retrieved by the Component Usability application 

(P30212) from the Next Numbers table (F0010 - System 30, index 1).


1.3Special Logic


2.Technical Specifications


2.4Processing 


0.0. Initialize.
DS RecordFound = '0'.

DS EndofVertical = '1'.

WK SaveLevelInteger = DS LevelInteger


1.0.  If the pointer to the link list is equal to NULL, add first node to link list.

1.1.  Create Link List.
1.1. Retrieve first record from PartUseability Cache where Cache ParentLowLevelCode = '1', 
Cache ParentItem = DS ParentItem, Cache ParentBranch = DS ParentBranch, Cache ParentBatchQty = DS 

Parent Batch Qty, Cache ParentType = DS Parent Type.

BF B3001680 - Cache, ProcessPartUseability
1.2. If Fetch successful, DS LevelInteger = DS LevelInteger +1.
1.3. If Fetch successful, WK ProduceableQty = DS ProduceableQty.  WK ProduceableUOM = DS 

ProduceableUOM

1.4. If Fetch successful, Call Internal Function - CalculateExtendedQty

Pass DS ProduceableQty, DS ParentItem, DS ParentBranch, DS ParentBatchQty, DS ParentType, Cache 
ComponentBranch, CacheComponentItem, DS AsOfDate, WK ProduceableQty, WK ProduceableUOM

Return WK ExtendedQty, WK ExtendedQtyUOM

1.5. assign DS ExtendedQty = WK ExtendedQty, DS ExtendedQtyUOM = WK ExtendedQtyUOM
1.6. If Fetch successful, Call Internal Function - MoveFromCachetoLinkedList

1.7. If successful, Assign DS RecordFound = '1' and  DS EndofVertical = '0'.

 

2.0.  If the pointer to the link list is not equal to null, retrieve the values of the last link list 

node.

2.1. Retrieve from PartUseability Cache 
where Cache ParentLowLevelCode = LL ComponentLowLevelCode
Cache ParentItem= LL Component

Cache ParentBranch= LL ComponentBranch

Cache ParentBatchQty= LL ComponentBatchQty

Cache ParentType= LL ComponentType


2.2. If fetch successful, DS LevelInteger = DS LevelInteger +1.
2.3. WK ProduceableQty = LL ProduceableQty, WK ProduceableUOM = LL ProduceableUOM

2.4. If Fetch successful, Call Internal Function - CalculateExtendedQty

Pass DS ProduceableQty, LL Component, LL ComponentBranch, LL ComponentBatchQty, LL 
ComponentType, Cache ComponentBranch, CacheComponentItem, DS AsOfDate, WK ProduceableQty, WK ProduceableUOM

Return WK ExtendedQty, WK ExtendedQtyUOM

2.5. Assign DS ExtendedQty = WK ExtendedQty, DS ExtendedQtyUOM = WK ExtendedQtyUOM
2.6. Assign WK ProduceableQty = DS ExtendedQty, WK ProduceableUOM = ExtendedQTyUOM

2.7. If Fetch successful, Call Internal Function - MoveFromCachetoLinkedList.

2.8. If successful, assign DS RecordFound = '1' and DS EndofVertical = '0'.




Internal Function - MoveFromCachetoLinkedList.


1.0.  Move Values to businessfunction datastructure.

DS ParentItem = Cache Component

DS ParentBranch = Cache ComponentBranch

DS ParentType = Cache Component Type

DS ParentBatchQty = Cache Component BatchQty

DS ParentUOM = Cache Component UOM

2.0. Move values to LinkedList

LL LevelInteger= DS LevelInterger

LL ParentLowLevelCode= Cache ParentLowLevelCode
LL ParentItem= Cache ParentItem

LL ParentBranch= Cache ParentBranch

LL ParentBatchQty= Cache ParentBatchQty

LL ParentType= Cache ParentType

LL Component= Cache Component

LL ComponentBranch= Cache ComponentBranch

LL ComponentType= Cache ComponentType

LL ComponentBatchQty = Cache ComponentBatchQty

LL ComponentLineNo= Cache ComponentLineNo.

LL ProduceableQty  = WK ProduceableQty

LL ProduceableUOM= WK ProduceableUOM


Internal Function - Calculate extended quantity


0.0. Initialize Variables

1.0. Retrieve records from F3002 using MMCU, KIT, TBM, BQTY, CMCU, ITM until fetch fails.
1.1. If DS AsofDate is not equal to 0, Validate Date Effectivity
1.2. Convert F3002 QNTY to primary UOM.  Return  WK ExtendedQtyUOM.

1.3. If F3002 FORQ is equal to %, WK QuantityPer = F3002 QNTY(primary) / 100  else WK 

QuantityPer = F3002 QNTY(primary).

1.4. Accumulate Fixed/Variable quantity required for the component.

If (FORQ = 'F') or (FORQ = '%' and BQTY !=0), 
add WK QuantityPer to WK FixedQuantityPer
else
add WK QuantityPer to WK VariableQuantityPer

2.0.  Calculate Extended Quantity of Lower Levels

2.1.  WK ExtendedQuantity = (WK ProduceableQty * WK VariableQuantity Per) + WK FixedQuantityPer
2.2.  If F3002 BatchQty != 0, WK ExtendedQuantity = F3002 BatchQty.


Data Structure

D300170B - Useability - Get BOM Child

Data Item Data Structure Description       I/ORequiredNotes

GENLNGPointer to Link List             I/O   Y


KIT      ParentItem                          O   Y


MMCU      ParentBranch                    O   Y


BQTY      BatchQty                          O   Y


UOM      BatchQtyUOM                          O   Y


TBM      ParentType                          O   Y


EV01      End of Vertical Branch             I/O   Y   0=not End of BOM Structure,


                                                                  1=End of BOM Structure


EV01      Record Found                   I/O   Y      0=Record not found 


                                                                  1=Record Found.


MATH01Level                               I/O   Y


RQTE1      Produceable Quantity              I      N


UOM      Produceable UOM                    I   N


QNTY      Extended Quantity                   I/O   N


UM      Extended Qty UOM                   I/O   N


ASDE1      As Of Date                         I/O   N

  

JOBS      Job Number                         I/O   Y      Passed from calling application


^

Parameter NameData ItemData TypeReq/OptI/O/Both
idPointerToLinkListGENLNGIDNONENONE

General purpose ID variable.

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.

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.

szParentTypeTBMcharNONENONE

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.

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

szParentUOMUOMcharNONENONE

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

cEndOfVerticalBranchEV01charNONENONE

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

cRecordFoundEV01charNONENONE

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

mnLevelMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

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

szProduceableUOMUOMcharNONENONE

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

mnExtendedQuantityQNTYMATH_NUMERICNONENONE

The number of units that the system applies to the transaction.

szExtendedQtyUOMUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

jdAsOfDateASDE1JDEDATENONENONE

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.

mnJobnumberJOBSMATH_NUMERICNONENONE

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

Related Functions

B3001680 Cache - Process Part Useability

Related Tables

None
UseabilityGetBOMSibling

UseabilityGetBOMSibling

Useability - Get BOM Child/Sibling

Major Business Rule

Object Name: B3001700

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

Retrieve the next horizontally related item in the BOM structure required in the Bill of Material 

explosion process.. 


1.2Setup Notes and Prerequisites

• This BF is part of the On-Line BOM Explosion process.  The On-Line BOM Explosion process includes 
standard ER for BOM explosion and additional Business Functions that have been created for On-line Bill 

of Material Explosion.

• Each time the BF is called, the vertical branch built by GetBOMStructureVertical will be processed 
from highest level to lowest level until a horizontal relationship is found.

• After a horizonal relationship is found, the ER should call GetBOMStructureVertical to vertically 
explode the item that was selected from this business function..


1.3Special Logic


2.Technical Specifications


2.4Processing 



0.0. Initialize
DS RecordFound = '0'.

DS EndofBOMStructure = '0'.


1.0.  If DS Pointer to Link List is equal to NULL, return.


2.0.  Process link list records until end of link list or horizontal BOM relationship is found 
(DS RecordFound = '1').  (LOOP)


2.1. Retreive last node in Link List.  If no nodes exist in the link list, assign DS End of BOM 
Structure = '1' and return.


2.2. Position in cache = record stored in the linked list. BF B3001680 Cache, 
ProcessPartUseability

Fetch Cache where 

Cache ParentLowLevelCode =  

LL ParentLowLevelCode

Cache  ParentItem= LL ParentItem

Cache ParentBranch= LL ParentBranch

Cache ParentBatchQty= LL ParentBatchQty

Cache ParentType      = LL ParentType

Cache ComponentLowLevelCode= LL ComponentLowLevelCode

Cache Component= LL Component

Cache ComponentBranch= LL componentBranch

Cache ComponentBatchQty= LL CompnentBatchQty

Cache ComponentType= LL ComponentType

Cache ComponentLineNo= LL ComponentLineNo.


2.3. Read next record in cache where 
Cache ParentLowLevelCode 

LL ParentLowLevelCode

Cache ParentItem= LL ParentItem

Cache ParentBranch= LL ParentBranch

Cache ParentBatchQty= LL ParentBatchQty

Cache ParentType= LL ParentType

BF B3001680 Cache, ProcessPartUseability
2.4. If successful, assign DS LevelInteger  = LL LevelInteger
2.5. If DS LevelInteger = 1, Assign WK ProduceableQTy = DS ProduceableQTy.  WK ProduceableUOM 

= DS ProduceableUOM.

2.6. If DS LevelInteger > 1, retrieve the ProduceableQty & Produceable UOM  from the LinkList 

where LL Level = DS LevelInteger - 1.  Move values to WK ProduceableQty & WK ProduceableUOM.

2.7. If Fetch successful, Call Internal Function - CalculateExtendedQty

Pass DS ProduceableQty, LL ParentItem, LL ParentBranch, LL ParentBatchQty, LL ParentType, Cache 
ComponentBranch, CacheComponentItem, DS AsOfDate, WK ProduceableQty, WK ProduceableUOM

Return WK ExtendedQty, WK ExtendedQtyUOM

2.8. Assign DS Extended Qty = WK ExtendedQTy, Assign DS ExtendedQTyUOM = WK ExtendedQTyUOM.
2.9. Assign WK ProduceableQty = WK ExtendedQty.  Assign WK ProduceableUOM = WK ExtendedQTyUOM

2.10. If successful, Call Internal Function - MoveCachetoLinkList.

2.11. If successful, assign DS RecordFound = '1'.

 
Standard ER for BOM Explosion


EndofBOMStructure = 0

LevelInteger = 1


Do While EndofBOMStructure is equal to '0'

       EndofChildren = '0'

       SiblingRecordFound = '0'

       Do While EndofChildren is equal to '0'

BF Useability, GetBOMChild
           If ChildRecordFound = '1'

 Write Custom Grid Line 

           END

       END

       Do While EndofBOMStructure is equal to '0' and SiblingRecordFound ='0'

           BF Useability, GetBOMSibling

           If SiblingRecordFound = '1'

Write Custom Grid Line
           END

       END  

   END



BF DestroyLinkList (Function Destroy Index Link List)


Data Structure

D300170A - Useability - Get BOM Sibling

Data Item Data Structure Description      I/ORequiredNotes

GENLNGBOM Structure Link List            I/O   Y


KIT      ParentItem                         O   Y


MMCU      ParentBranch                   O   Y


BQTY      ParentBatchQty                   O   Y


UOM      ParentUOM                          O   Y


TBM      ParentType                         O   Y


EV01      End of Vertical Branch            I/O   Y      0=Not end of Vertical Branch 

                                                                  1=End of Vertical Branch


EV01      Record Found                  I/O   Y      0=Record not found 

                                                                  1=Record Found.


MATH01Level                              I/O   Y


RQTE1      Produceable Quantity             I   N


UOM      Produceable UOM                   I      N


QNTY      Extended Quantity                  I/O   N


UM      Extended Qty UOM                  I/O   N


ASDE1      As Of Date                        I/O   N

      

JOBS      Job Number                        I/O   YPassed from calling application



^

Parameter NameData ItemData TypeReq/OptI/O/Both
idBOMStructureLinkListGENLNGIDNONENONE

General purpose ID variable.

cEndOfVerticalBranchEV01charNONENONE

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

cRecordFoundEV01charNONENONE

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

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.

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.

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

szParentUOMUOMcharNONENONE

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

szParentTypeTBMcharNONENONE

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.

mnLevelMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

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

szProduceableUOMUOMcharNONENONE

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

mnExtendedQuantityQNTYMATH_NUMERICNONENONE

The number of units that the system applies to the transaction.

szExtendedQtyUOMUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

jdAsOfDateASDE1JDEDATENONENONE

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.

mnJobnumberJOBSMATH_NUMERICNONENONE

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

Related Functions

B3001680 Cache - Process Part Useability

Related Tables

None