CachePercentBillDates

Percent Bill Validation

Minor Business Rule

Object Name: B3002060

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1._Functional Description

1.1Purpose
This function is selecting records from F3002 that match the MMCU, KIT, TBM, COBY and BQTY being 

passed in.  The function is then retrieving the component number (CPNT) for the first record selected.  

The component number is descending order, so it will be selecting the highest number.  This is being 

done in order to determine what the next component number should be to make the record unique.


1.2Setup Notes and Prerequisites
None.


1.3Special Logic
None.


2._Technical Specifications

2.4Processing 


Select records from F3002 based on MMCU, KIT, TBM, COBY and BQTY.

Fetch from the first record selected the component number (CPNT) or the substitute line number 

(SBNT).


Data Structure

D3002060A - Cache Percent Validation Date Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
jdEffectiveFromDateEFFFJDEDATENONENONE

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.

mnQtyRequiredStandardQNTYMATH_NUMERICNONENONE

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

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.

cSuppressErrorMessageEV01charNONENONE

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.

idCursorGENLNGIDNONENONE

General purpose ID variable.

cReturnCursorEV01charNONENONE

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

mnJobNumberJOBSMATH_NUMERICNONENONE

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

Related Functions

B3002040 F3002 Bill of Material MBF Functions

Related Tables

F3002 Bill of Material Master File
F3002PercentBillValidation

F3002PercentBillValidation

Percent Bill Validation

Minor Business Rule

Object Name: B3002060

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

The purpose of this function is to test a percent bill to make sure that all bills total up to 100 

for every date that needs to be validated..


1.3 Special Logic 
None


1.4 Notation 

2.Technical Specifications


2.4 Processing 

2.4If Bill of Material Parent is not sent in then grab the first record in the Add 
ChangeCache.


2.4.1Save Key fields into temp variables

2.5LOOP  Process until all Bills have been processed if the Bill of material key fields have 
been passed in then terminate after the first time through.


2.5.1If Do not Verify Records to File ! = '1' (Verify Records to make sure that some 
records are in the file that are not in cache)


2.5.1.1LOOP Read the F3002 Using KIT MMCU TBM BQTY using the saved bill key 
fields


2.5.1.1.1Fetch Delete cache to make sure that record needs to be included 
in percent total.

2.5.1.1.1.1If found do not  Include the record or effectivity dates   
go to 2.5.1.1


2.5.1.1.2Fetch Cache for 01 or 03 record if found then 
2.5.1.1.2.1 Call Internal function Add Dates To Cache with Cache F3002 
record.

2.5.1.1.2.2  Go to 2.5.1.1


2.5.1.1.3If record has not been found in Add Change Cache or Delete Cache 
then Add record to Add Change Cache with a type of 04. And Call Internal 

function Add Dates To Cache with Cache F3002 record.


2.5.2If Do not Verify Records to File  = '1'

2.5.2.1LOOP Fetch all 01 and 03 records form the Add Change Cache and call 
Internal function Add Dates To Cache.


2.5.3Fetch all records in the Add Change Cache with a type of 02 and a key that matches 
the Save Key.  If found call Internal function Add Dates To Cache..


2.5.4Verify Percent Bill.  Loop through all ,02,01,03,04 records in cache in that order.

2.5.4.1If type record != '01'  or 
type record != '01' and Cache_MatchingAdd ToChangeKey  !=  '1' 

Call internal function Add Quantity to Date Cache. 


2.5.5LOOP If any record in the Date Cache does not = 100 except for the last record then 
error.


2.5.6Delete Dates Cache and All records in Add Change Cache with 04 type.'

2.5.7Fetch next record In cache with a different key (MMCU, KIT, TBM, BQTY) from Add 
Change Cache.




Internal function Add Quantity to Date Cache, Parameters F3002 record:

LOOP:  For any records sent to internal function add QNTY to any date in the cache that is 
included between the EFFF and the EFFT.

Fetch first record in Cache if      EFFF<=Cache Date <= EFFT add QNTY to Cache QNTY

Fetch Cache Records until Cache Date > EFFT.


Internal function Add Dates To Cache,  Parameters F3002 record:


Fetch Date Cache For EFFF if not Found Add record.
Fetch Date Cache For EFFT plus one Day if not Found Add record.


Data Structure

D3002060B - F3002 Percent Bill Validation

Parameter NameData ItemData TypeReq/OptI/O/Both
cDoNotVerifyRecordsToFileEV01charNONENONE

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

mnJobNumberJOBSMATH_NUMERICNONENONE

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

cErrorERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

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.

jdInvalidDateEFFFJDEDATENONENONE

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.

Related Functions

B3002040 F3002 Bill of Material MBF Functions

Related Tables

F3002 Bill of Material Master File