CacheProcessBOMTextLines

Cache Process BOM Text Lines

Minor Business Rule

Object Name: B3003160

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function will perform Load, Delete, Update, Get, and Clear functions on the BOMTextLines cache 

used in BOM Explosion routine..  On a Create process, an identifier for the cache (hCache handle) is 

passed back to the calling program for subsequent calls to this function.  


1.2Setup Notes and Prerequisites

The calling application is responsible for loading all appropriate key values to the data structure 

and identifying the number of keys to use in retrieval/update processes.  The application must also 

store the hCache pointers passed back from the "Create" process and pass these pointers back to the 

business function on the other process modes which require them (see technical specifications below).


1.3Special Logic

There is no special logic within this function.


2.Technical Specifications


2.4Processing 

Cache Layout:


AliasData ItemNotes

Index

INT01LevelIndex

MMCUParent BranchIndex

KITParent ItemIndex

TBMType Of BillIndex

BQTYBatch QuantityIndex

CPNTLine NoIndex

Text

CPNTText Line No

AITMSecond Item Number

LITMThird Item Number



I.    Perform setup functions 

A. Initialize cache to get handle.
B.Initialize return code to success.

C.If not successful, Set error "032E,"  "Error Processing Cache" and set return code to 

failure.


II.  Processing Based on Mode.


A.If Process Mode is "1" - GET:
1.Retrieve element from cache using keys to index.

B.If Process Mode is "2" - ADD:
1.(define logic for addition)

C.If Process Mode is "3" - UPDATE:
1. If element exist, update, else add element to cache.  

D.If Process Mode is "4" - DELETE:
1.(define logic for delete)  

E.If Process Mode is "5" - DELETE ALL:

1.(define logic for delete all).

F.If Process Mode is "6" - GET NEXT:
1.(define logic for get next).

G.If Process Mode is "7" - ADD/UPDATE:

1.(define logic for add/update).

H.If Process Mode is "8" - END
1.Perform cleanup functions (Terminate cache).

Data Structure

D3003160 - Cache Process BOM Text Lines


2.1Parameters:

Data Item Data StructureI/ORequiredNotes

Description


INT01LevelI/OYKey value

MMCUParent BranchI/OYKey Value

KITParent ItemI/OYKey value

TBMType of BillI/OYKey Value

BQTYBatch QuantiyI/ONKey value

CPNTLine No.I/ONKey value

CPNTText Line No.I/ONKey value

LITMSecond Item NumberI/ON 

AITMThird Item NumberI/ON 

INT01Number of KeysIYNumber of Keys to be used in the 

cache retrieval/update process. 
EV01Process ModeIY"1" = Get cache element

"2" = Add element 
"3' = Update element

"4" = Delete cache elements

"5" = Delete All cache elements

"6" = Get Next cache element

"7'  = Add/Update cache element

"8" = End cache (terminate cache)

EV01Cache Code Error ON"0" = Successful Process

"1" = Reached End Of CACHE
"2" = Invalid Input Parameter

"3" = Failed to Create CACHE

"4" = Failed to Add CACHE

"5" = Failed to Delete CACHE

"6" = Cache is loaded

"7" = Empty CACHE

EV01Suppress Error MessagesIN

DTAIError Message IDON

JOBSJob NumberIYUnique job number for that 

particular run of the cost rollup.  
Used to make the cache unique.

EV01Return Cursor FlagIYFlag which idicates whether the 

cursor should be returned to the 
calling program.

GENLNGCursorI/ONCursor to cache



^

Parameter NameData ItemData TypeReq/OptI/O/Both
nLevelINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

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.

szTypeOfBillTBMcharNONENONE

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.

szThirdItemNumberAITMcharNONENONE

The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item 
numbers are as follows: 1.  Item Number (short) - An 8-digit, computer-assigned 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.  In addition to 
these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT). Numerous cross references to 
alternate part numbers can be user defined, such as substitute item numbers, replacements, bar codes, customer numbers, or supplier 
numbers.

szSecondItemNumberLITMcharNONENONE

A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to 
alternative item numbers. The three types of item numbers are: Item Number (short) An 8-digit, computer-assigned item number. 2nd Item Number A 
25-digit, user defined, alphanumeric item number. 3rd Item Number  Another 25-digit, user defined, alphanumeric item number. In addition to 
these three basic item numbers, the system provides an extensive cross-reference search capability. You can define numerous 
cross-references to alternative part numbers. For example, you can define substitute item numbers, replacements, bar codes, customer numbers, or 
supplier numbers.

nNumberOfKeysINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

cProcessModeEV01charNONENONE

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

cCacheCodeErrorEV01charNONENONE

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

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.

mnJobnumberJOBSMATH_NUMERICNONENONE

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

cReturnCursorFlagEV01charNONENONE

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

idCursorGENLNGIDNONENONE

General purpose ID variable.

szLineTypeLNTYcharOPTNONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

mnSequenceNoOperationsOPSQMATH_NUMERICOPTNONE

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.

mnBubbleSequenceBSEQMATH_NUMERICOPTNONE

A secondary bill of material sequence number that indicates the drawing bubble number.

jdEffectiveFromDateEFFFJDEDATEOPTNONE

A date that indicates one of the following:     o When a component part goes into effect on a bill of material     o When a routing step goes into 
effect as a sequence on the routing for an item     o When a rate schedule is in effect The default is the current system date. You can enter 
future effective dates so that the system plans for upcoming changes. Items that are no longer effective in the future can still be recorded and 
recognized in Product Costing, Shop Floor Management, and Capacity Requirements Planning. The Material Requirements Planning system 
determines valid components by effectivity dates, not by the bill of material revision level. Some forms display data based on the effectivity 
dates you enter.

jdEffectiveThruDateEFFTJDEDATEOPTNONE

A date that indicates one of the following:     o When a component part is no longer in effect on a bill of material     o When a routing step is no 
longer in effect as a sequence on the routing for an item     o When a rate schedule is no longer active The default is December 31 of the 
default year defined in the Data Dictionary for Century Change Year. You can enter future effective dates so that the system plans for upcoming 
changes. Items that are no longer effective in the future can still be recorded and recognized in Product Costing, Shop Floor Management, 
and Capacity Requirements Planning. The Material Requirements Planning system determines valid components by effectivity dates, not by 
the bill of material revision level. Some forms display data based on the effectivity dates you enter.

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

mnTextLineNoCPNBMATH_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

None

Related Tables

None