GetMaxCacheSequenceNo

GetMaxCacheSequenceNo

Minor Business Rule

Object Name: N3201430

Parent DLL: CMFG

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
This Business Function will retrieve Max Sequence Number from Cost Price Adjustment cache for given

 Configuration ID # (optional parameters: ComponentID, cPriceRollUp , szLineType).  When there is no matching record in cache, then returned 

Maximum Sequence Number is zero.


1.2Setup Notes and Prerequisites
Cost Price Adjustment (ref. B3200400) cache exists.


1.3Special Logic

There is no special logic.


2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes JOBSJob NumberIY CFGIDConfiguration ID #IY SUPPSSuppress Error 

MessageIO DTAIError Message IDOO SEQNMax Sequence #OY CFGCIDComponent ID #IO  PRUPrice RollUp FlagIO LNTYLine TypeIO

2.2Related Tables 

Table Table Description

2.3Related Business Functions

Source NameFunction Name P32942





2.4Processing 


MaxSequenceNo = zero

CacheCodeError = 0
CacheActionCode = 1
Determine number of Keys

While (Cache Error equal zero)

Call Cost Price Adjustment

to get SequenceNo

CacheActionCode = 6

If  (Cache Error equal zero AND SequenceNo > MaxSequenceNo )

MaxSequenceNo = SequenceNo

End If

End While

If  (CacheCodeError == zero)
If cSuppressErrorMessage != 1

Set Error (2838)

End If

szErrorMessageID = 2838

End If

Close Cache Cursor


Data Structure

D3201430 - GetMaxCacheSequenceNo

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberJOBSMATH_NUMERICREQNONE

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

mnConfigurationIDNumberCFGIDMATH_NUMERICREQNONE

An identifier that represents a unique configuration. It is generated by a next number value and is the key to the configuration tables.

cSuppressErrorMessageSUPPScharOPTNONE

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.

szErrorMessageIDDTAIcharOPTNONE

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.

mnMaxSequenceNumberSEQNMATH_NUMERICOPTNONE

A number used to organize the table into a logical group for online viewing and reporting.

mnComponentIDNumberCFGCIDMATH_NUMERICOPTNONE

A number that represents a component in a configuration. This number, which is generated by next numbers, always restarts at 1 and 
increments, based on the number of components in the configuration.

cPriceRollUpFlagPRUcharOPTNONE

A user defined code (32/PP) that indicates whether the price or cost of an add-on is included in the price or cost of the parent configured 
item. Valid values are: 0 Separate the price or cost of the add-on. 1 Include the price or cost of the add-on in the price or cost of the parent item. 
When you choose this value, the extended price or cost is zero.

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

Related Functions

None

Related Tables

None