LoadWIPRevaluationCache

Load WIP Revaluation Input Data Cache

Minor Business Rule

Object Name: B3104150

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

Load WIP Revaluation Input Data Cache

Purpose


This function was created for the WIP Revaluation enhancement.  It is called by the WIP Revaluation UBE 

(R30837).  It's purpose is to complete both the initial and expanded load of the WIP Revaluation Cache.  The 

method used to fill the cache depends on the cMode parameter.  The cache is filled with all items whose costs 

may have changed.  Once the cache is filled, the WIP Revaluation UBE will revalue all of the items in the 

cache.


Parameter Details


Required Parameter:

1.  cMode (if this parameter is not passed, it will be set to 3)

1 = Called from WO Completions (P31114) for Actual Costing items only

2 = Called from the Frozen Cost Update UBE (R30835) for Standard Costing items 

3 = Called from Variance Journal Entries UBE (R31804) for Actual Costing items only


2.  szCacheJobNumber - this parameter is required to be passed to the WIP Revaluation Cache 
function in order to create a unique cache instance.


Functionality Overview


Initial Load

cMode = 1

When WIP Revaluation is called from the Work Order Completions application, the initial load reads 
through all of the lot/locations that the work order item completed to.  For each lot/location combination, a 

record is written to the WIP Revaluation Cache with a blank cExploded value.  This ensures that it will be 

addressed by the expanded load.


cMode = 2

When WIP Revaluation is called from the Frozen Cost Update.  The initial load reads through the Cost 
Item Information Cache created by the Frozen Cost Update.  If the cost of the item in the Cost Item 

Information Cache has changed, a search is performed to find all of the work order items that the changed item has 

been issued to as a component.  If issues are found, the item is added to the WIP Revaluation Cache as a 

component with a cExploded value of '1' and all of the items that it was issued to are added to the cache 

as parents with a blank cExploded value.


cMode = 3

When WIP Revaluation is called from Variance Journal Entries, the initial load reads through all of the 
lot/locations that the work order item completed to.  For each lot/location combination, a record is written to 

the WIP Revaluation Cache with a blank cExploded value.  In addition, the inital load reads through the 

Item Cost file (F4105) and processes all records with a Cost Changed Flag (CCFL) = '1'.  A search is 

performed to find all of the items that the changed item has been issued to as a component.  If issues are found, the 

item is added to the WIP Revaluation Cache as a component with a cExploded value of '1' and all of the 

items that it was issued to are added tot the cache as parents with a blank cExploded value. 


Expanded Load

The initial load adds records to the cache, based on the cMode value passed in.  In the expanded load, the 

goal is to process any records with a blank cExploded value.  If records with a blank cExploded value exist in 

the cache, the expanded load searches for the cache item issued as a component.  If it finds an issue, it adds 

one record to the cache for the cache item as a component, with the cExploded flag set to '1', and one record 

for the parent item that was issued to, with a blank cExploded value, indicating that it still needs to be 

addressed by the expanded load.  After an item has been processed in the expanded load its cExploded flag is set 

to '1'.  The expanded load continues until all cache records have a cExploded value of '1'.  This ensures that 

any cost changes will be carried all the way up from the lowest level component to the top level item.




Data Structure

D3104150 - Load WIP Revaluation Input Data Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
cModeEV01charOPTNONE

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

cSuppressErrorMessageEV01charOPTNONE

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

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.

mnWorkOrderNumberDOCOMATH_NUMERICOPTNONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

mnShortItemNumberITMMATH_NUMERICOPTNONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szBranchMMCUcharOPTNONE

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.

szCacheJobNumberJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

Related Functions

B3003770 Cache Process Cost Item Information
B3100150 Verify Remarks Exist
B3100310 Get Work Order Data I
B3104100 WIP Revaluation Cache Business Function
B4000970 Get Item Master Fields
B4100010 Calculate Qty Available
X4801T F4801T Get Work Order Master Tag Record

Related Tables

F3111 Work Order Parts List
F4102 Item Branch File
F41021 Item Location File
F4105 Item Cost File