SaveOrGetBOMKey

Save Or Get BOM Key

Major Business Rule

Object Name: B3000540

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function will save the current level of the Bill Of Material Key fields in a link list 
or return the previously saved  level of the Bill of Material Key fields from the link list.   


1.2Setup Notes and Prerequisites

When this BF is used it should be connected to the Application Form in 4 separate locations.

• When preceeding to the next level of the Bill of Material, this BF should be called with Mode equal 
to '0'.  This will create the link list if it does not exist and save the current level of the Bill of 

Material in the link list.

• When returning to the previous level of the Bill of Material, this BF should be called with Mode 
equal to '1'.  This will return the previous level that was saved.

• When the FIND button is pressed and the key has been changed (user is searching on a new BOM), this 
BF should be called with Mode equal to '2'.  This will Destroy the existing link list and free the 

allocated memory.

• When the CANCEL button is pressed, this BF should be called with Mode equal to '2'.  This will 
Destroy the existing link list and free the allocated memory.



1.3Special Logic
• Required work fields
GENLNGHuser BOM
EV01Previous Pressed

EV01First Level

EV01NextPressed

VC12RJSaveBranch

VC03ASaveTypeofBill

MN15D0SaveBatchQty

MN09ASaveItemNumber

• Standard Event Rules
• Dialog is Initialized
FC First Level = '1'
FC NextPressed = '0'


• Button Clicked - Close Button
BF SaveOrGetBOMKey
2<>Mode
0<>SuppressErrorMessages
HuserBOM<>HuserPointer
HrequestBOM<>HrequestPointer


• Button Clicked - Find Button
If FC NextPressed = '1'
If FC Saved Parent Item 'b9  FC Parent Item
or FC Saved Branch 'b9 FC Branch
or FC Saved Type of Bill 'b9 FC Type of Bill
or FC Saved Batch Qty 'b9 FC Batch Qty

BF SaveOrGetBOMKey

2<> Mode

0<>SuppressErrorMessages

HuserBOM<>HuserPointer

HrequestBOM<>HrequestPointer

FC First Level = '1'

FC NextPressed = '0'

endif

endif

/*  If you are executing logic only on a Find and not a 

                Previous then add the following  *  logic   */ 

                                                                                                      

    if (Previous Pressed  != '1')


                         /*execute logic*/


                   end if

            Previous Pressed  = '0'


• Button Clicked - Next Level (Hypercontrol)
BF SaveOrGetBOMKey
0<>Mode

FC Bill Type<>TypeBill

FC Batch Qty (prim)<>BatchQuantity

FC FirstLevel<>FirstLevel

FC Parent Item No<>ParentItemNumber

FC Branch<>Branch

0<>SuppressErrorMessages

FC HuserBOM<>HuserPointer

FC HrequestBOM<>HrequestPointer

FC Item Number = GC Component Item

FC Branch = GC Component Branch

FC Batch Quantity = GC Quantity Required

FC FirstLevel = '0'

FC NextPressed = '1'

FC SaveParentItem = FC ParentItem

FC SaveBatchQty = FC BatchQty

FC SaveTypeofBill = FC Type of Bill

FC SaveBranch= FC Branch

Press Button (FC F&ind)


• Button Clicked - Previous Level (Hyspercontrol)
If FC NextPressed = '1'

BF SaveOrGetBOMKey

1<>Mode

FC Type of Bill<>BillType

FC Batch Qty (prim)<>BatchQuantity

FC FirstLevel<>FirstLevel

FC Parent Item No<>ParentItemNumber

FC Branch<>Branch

0<>SuppressErrorMessages

FC HuserBOM<>HuserPointer

FC HrequestBOM<>HrequestPointer

FC SaveParentItem = FC ParentItem

FC SaveBatchQty    = FC BatchQty

FC SaveTypeofBill  = FC Type of Bill

                  FC SaveBranch  = FC Branch
 Previous Pressed    = '1'
If FC FirstLevel       = '1'

    NextPressed = '0'

End

Press Button (FC F&ind)

End



2.Technical Specifications


2.4Processing 

1)   If the Mode is '0' 

A)  If the Pointer to the link list is NULL Create the Link list and add a node

      with the information sent in. FirstLevel = '0'


B)  Else add a node to the end of the link list with the information sent in FirstLevel = '0'.


2)  If the Mode is '1' send back the fields saved in the last linked list node, and delete that node.

     If the linked list is empty FirstLevel = '1' else FirstLevel = '0'.


3)  If the Mode is '2' destroy the entire linked list and set the Pointer to the Link list to NULL.



Data Structure

D3000540 - Save Or Get BOM Key

Parameter NameData ItemData TypeReq/OptI/O/Both
cModeMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

szTypeBillTBMcharNONENONE

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.

szItemNoUnknownFormatUITMcharNONENONE

A number that the system assigns to an item. It can be in short, long, or third item number format.

szUnitOfMeasureUMcharNONENONE

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.

cFirstLevelEV01charNONENONE

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.

cSuppressErrorMessageEV01charNONENONE

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

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

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.

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.

mnConversionFactorMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

idHuserPointerGENLNGIDNONENONE

General purpose ID variable.

idHrequestPointerGENLNGIDNONENONE

General purpose ID variable.

idReturnGENLNGIDNONENONE

General purpose ID variable.

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

idListPointerGENLNGIDOPTNONE

General purpose ID variable.

nNodeCountINTEGERintegerOPTNONE

Related Functions

None

Related Tables

None