CacheProcessPriceCost

Cache Process Price Cost

Major Business Rule

Object Name: B3200400

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function will perform Get, Add, Update, Delete, Delete All, Get Next, Add/Update, and Terminate 

functions on the Price/Cost Adjustments cache used in Configurator Order Processing (P3294, X3294, 

P32943).


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. 

• Cache Action Code
• 

'1' Get - retrieve the cache element.  
• '2' Add - add a cache element.
• '3' Update - update a cache element.
• '4' Delete - delete a cache element.
• '5' Delete All - delete all cache elements
• '6' Get Next - retrieve the next cache element
• '7' Add/Update - will add if element does not exist, will change if it does exist.
• '8' Terminate - terminate cache
• '9' Close cursor
'b7'b7'b7'b7'b7'b7
• Number of Keys 
• 
If the number of keys is passed as a parameter, the business function uses this value to setup 
key values for a Get, Update, Delete, Get Next, and Add/Update.  

• A zero may be passed to retrieve or update the first record.
'b7'b7'b7'b7'b7'b7

1.3Special Logic

There is no special logic within this function.


2.Technical Specifications

2.4Processing

I.    Perform setup functions 

A. Initialize cache to get handle.
B.Retrieve cursor (either from data pointer or new CACHE cursor)

C.Return CACHE cursor upon requested

D. Set  DS Cache Error Code = '0';   

E. If not successful Set error "032E,"  "Error Processing Cache".


II.  Processing Based on Mode.

A. If Process Mode is "1" - GET:
1.Open cursor, reset cursor.
2.Retrieve the first element on the cache matching the key values passed as input; the 

number of keys to be used is passed in the input parameters,  If  "0" fetch first element in the 

list. 

3.Load the values from the retrieved element into the data structure to be passed back to 

the calling program. 

4.If get fails DS Cache Error Code = '6'.


B. If Process Mode is "2" - ADD:

1.Add new record to CACHE.
2.If add fails set error "032E" and set DS Cache Error Code = '4'.


C. If Process Mode is "3" - UPDATE (same logic as mode "7").
1.Fetch record with full key
2.If record in CACHE is found, update record with new value.

Otherwise add new record to CACHE.
3.If add fails set error "032E" and set DS Cache Error Code = '4'.

D. If Process Mode is "4" - DELETE:
1.Delete all elements on the cache matching the key values passed as input.  
2.If delete fails DS Cache Error Code  = '5'.


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

1.Delete all elements in the cache.
2.If delete fails DS Cache Error Code  = '5'.


F. If Process Mode is "6" - GET NEXT:
1.Retrieve the next element on the cache matching the key values passed as input (the 
cursor should have been set through a previous "Get" action, i.e. process mode "1", if number of 

keys is "0" then fetch next record with out using any key). 

2.Load the values from the retrieved element into the data structure to be passed back to 

the calling program.

3.If there are no more elements close cursor and set  DS Cache Error Code = '1'.


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

1.Fetch record with full key
2.If record in CACHE is found, update record with new value.

Otherwise add new record to CACHE.
3.If add fails set error "032E" and set DS Cache Error Code = '4'.

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

I. If  Process Mode is "9" - CLOSE CURSOR:
          1. Perform close cursor.

This function will be used to manipulate CACHE Process Price Cost

Data Structure

D3200400 - Cache Process Price Cost

Parameter NameData ItemData TypeReq/OptI/O/Both
cCacheActionCodeEV01charOPTNONE

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

nIndexNumberINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

nNumberOfKeysINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

cReturnCursorEV01charOPTNONE

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

idCursorGENLNGIDOPTNONE

General purpose ID variable.

cCacheCodeErrorEV01charOPTNONE

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

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.

mnJobNumberJOBSMATH_NUMERICOPTNONE

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

mnConfigurationIDNumberCFGIDMATH_NUMERICOPTNONE

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

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.

mnSequenceNumberSEQNMATH_NUMERICOPTNONE

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

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

cPriceRollupPRUcharOPTNONE

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.

mnAmountExtendedCostECSTMATH_NUMERICOPTNONE

For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the 
number of units.

mnAmountExtendedPriceAEXPMATH_NUMERICOPTNONE

The number of units multiplied by the unit price.

mnAmountForeignExtCostFECMATH_NUMERICOPTNONE

The product of the cost of an item, expressed in foreign currency according to the orders exchange rate, times the number of units.

mnAmountForeignExtPriceFEAMATH_NUMERICOPTNONE

The product of the foreign price times the number of units.

szDescriptionLine1DSC1charOPTNONE

Brief information about an item; a remark or an explanation.

cUserAddedPriceCostSOCFcharOPTNONE

A code that indicates whether the item, price adjustment, or cost adjustment was added to the configuration by a cross-segment editing rule 
or manually by a user.

mnMBFLineIndex1LNIXMATH_NUMERICOPTNONE

mnMBFLineIndex2LNIXMATH_NUMERICOPTNONE

mnMBFLineIndex3LNIXMATH_NUMERICOPTNONE

mnMBFLineIndex4LNIXMATH_NUMERICOPTNONE

mnMBFLineIndex5LNIXMATH_NUMERICOPTNONE

mnLineNumberLNIDMATH_NUMERICOPTNONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

mnRelatedLineNumberRLINMATH_NUMERICOPTNONE

This field is not updated by the receipt applications; it is always populated with the value zero. 

cFixedOrVariableQuantityFOVQcharOPTNONE

Reserved by J.D. Edwards A code that specifies whether the quantity of a configured item varies according to the quantity of the parent item 
produced or is fixed regardless of the parent quantity. Valid values are: F Fixed quantity V Variable quantity

mnAtoRuleNumberATO#MATH_NUMERICOPTNONE

The number associated with a set of cross-segment editing rules or assembly inclusion rules.

mnAtoSeqNumberATOSMATH_NUMERICOPTNONE

The Sequence number is the rule number within an edit group of cross-segment editing rules or assembly inclusion rules. You can insert a 
line within a rule to assign a new sequence number.

mnUniqueKeyIDInternalUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

cAtoLineTypeATOTcharOPTNONE

A value that identifies whether the resulting value of the assembly inclusion rule is a part number, price, routing operation, or calculated 
value. The valid values are:    P Part List    Q Work Order Component    C Calculation    H Hot Spot    X Price/Cost Adjustment    R Route Sheet

mnPriceHistoryAltKeyAKIDMATH_NUMERICOPTNONE

A value that specifies an alternate key in the Price Adjustment Ledger File table (F4074). 

mnParentPrimaryQtyRSQE1MATH_NUMERICOPTNONE

A number that specifies how many related items are associated with a particular item on an Engineering Change Order (ECO) parts list. A 
related item can be a component or parent item.

szParentPrimaryUOMUOM1charOPTNONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

mnQtyOrderMultiplesATMUMATH_NUMERICOPTNONE

Reserved by J.D. Edwards The result of a derived calculation that will be used to extend the quantity of an item.

mnAmountUnitCostUNCSMATH_NUMERICOPTNONE

The amount per unit, derived by dividing the total cost by the unit quantity.

mnAmountForeignUnitCostFUCMATH_NUMERICOPTNONE

Amount - Foreign Unit Cost

mnAmountPOUnitCostUNCSMATH_NUMERICOPTNONE

The amount per unit, derived by dividing the total cost by the unit quantity.

mnAmountPOForeignUnitCostFUCMATH_NUMERICOPTNONE

Amount - Foreign Unit Cost

mnAmountPOExtendedCostECSTMATH_NUMERICOPTNONE

For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the 
number of units.

mnAmountPOForeignExtCostFECMATH_NUMERICOPTNONE

The product of the cost of an item, expressed in foreign currency according to the orders exchange rate, times the number of units.

mnAmountTransferExtCostECSTMATH_NUMERICOPTNONE

For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the 
number of units.

mnAmountTransferForgnExtCostFECMATH_NUMERICOPTNONE

The product of the cost of an item, expressed in foreign currency according to the orders exchange rate, times the number of units.

mnAmountTransferUnitCostUNCSMATH_NUMERICOPTNONE

The amount per unit, derived by dividing the total cost by the unit quantity.

mnAmountTransferForgnUnitCostFUCMATH_NUMERICOPTNONE

Amount - Foreign Unit Cost

mnAmountUnitPriceUPRCMATH_NUMERICOPTNONE

The list or base price to be charged for one unit of this item. In sales order entry, all prices must be set up in the Item Base Price File table 
(F4106).

mnAmountForeignUnitPriceFUPMATH_NUMERICOPTNONE

The foreign price per unit.

Related Functions

None

Related Tables

None