GetMaxCacheComponentIDNo

GetMaxCacheComponentIDNo

Minor Business Rule

Object Name: N3201420

Parent DLL: CMFG

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
This Business Function will retrieve Maximum Component ID Number from All Components Cache for given Configuration ID and Parent ID.  When 

there is no matching record in cache, then returned Maximum ID Number is zero. Note: When Parent ID is not supplied the whole configuration is 

searched.


1.2Setup Notes and Prerequisites
All Component Cache (ref. B3200370) exists.


1.3Special Logic
The Business Function involves 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 CFGCIDMax Component ID #OY CFGPIDParent ID #IO If this is not supplied, whole Config. is searched

2.2Related Tables 

Table Table Description

2.3Related Business Functions

Source NameFunction Name N3201260





2.4Processing 


MaxComponentID = zero

CacheCodeError = 0
CacheActionCode = 1
If ParentID > Zero

   NumberOfKeys = 2

Else

   NumberOfKeys = 1

End If


While (Cache Error equal zero)

Call Cache Process All Components

to get Component ID#

Action Code = 6

If  (Cache Error equal zero AND Component ID#> MaxComponentID)

MaxComponentID = Component ID#

End If

End While

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

Set Error (2838)

End If

szErrorMessageID = 2838

End If


Data Structure

D3201420 - GetMaxCacheComponentIDNo

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.

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

mnParentIDNumberCFGPIDMATH_NUMERICOPTNONE

A number that represents the parent component of a component in a configuration.

Related Functions

None

Related Tables

None