Functional Description
Purpose
This function will perform Get, Add, Update, Delete, Delete All, Get Next, Add/Update, and Terminate
functions on the Pref Commit Location Qty cache used in Sale Order Preference Commitments.
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.
'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- closes cache cursor
Number of Keys
key values for a Get, Update, Delete, Get Next, and Add/Update.
A zero may be passed to retrieve or update the first record.
Setup Notes and Prerequisites
None.
Special Logic
None.
Technical Specification
Related Tables
None.
Related Business Functions
None.
Processing
Cache Layout:
AliasData ItemNotes
LNIDParent Sales Order Line NumberIndex value
ITMParent Item Number(short)Index value
MCUBranch/PlantIndex value
PELSegment NumberIndex value
ATSQConfigurator Sequence Number
ATIVSegment Value
CNUMNumeric Segment Indicator
RRNError counter/flag
RNDCRound Derived Calculation
SEQConfigured Item Level Seq. No.
LVLConfigured Item Level
I. Perform setup functions
B. Set DS Cache Error Code = '0';
C. If not successful Set error "032E," "Error Processing Cache".
II. Processing Based on Mode.
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 (same logic as mode "7").
2.Insert a new cache element with values from data structure.
3.If add fails set error "032E" and set DS Cache Error Code = '4'.
2.Insert a new cache element with values from data structure.
3.If add fails set error "032E" and set DS Cache Error Code = '4'.
2.If delete fails DS Cache Error Code = '5'.
E.If Process Mode is "5" - DELETE ALL:
2.If delete fails DS Cache Error Code = '5'.
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:
2.Insert a new cache element with values from data structure.
3.If add fails set error "032E" and set DS Cache Error Code = '4'.
^
D4201200 - Cache Preference Commitments By Location
Special Input Expected
Parameters:
Data Item Data Structure DescriptionI/ORequired Notes
JOBS Job Number I Y Used in Cache Name
MCU Branch I/O N Key value
LOCN Location I/O N
QTY Avail Quantity I/O N
INT01 Number of Keys I Y Number of Keys to be
used in the cache
retrieval/delete
process
EV01 Suppress Error Messages I N 1 = Suppress runtime
error message handling
0 = Allow runtime error
message handling
EV01 Process Mode I Y "1" = Get cache element
"2" = Add element
"3" = Update element
"4" = Delete cache
elements (keyed)
"5" = Delete All cache
elements
"6" = Get Next cache
element
"7" = Add/Update cache
element
"8" = End cache
(terminate cache)
EV01 Return Cursor I/O Y 1 = Return Cursor
0 = Do not Return
Cursor
GENLNGCursor I/O N Returns cursor
Special Output Returned
Parameters:
Data Item Data Structure DescriptionI/ORequired Notes
MCU Branch I/O N Key value
LOCN Location I/O N
QTY Avail Quantity I/O N
DTAI Error Message ID O N
EV01 Cache Code Error O N "0" = Successful Process
"1" = Reached End Of
CACHE
"2" = Invalid Input
Parameter
"3" = Failed to Create
CACHE
"4" = Failed to
Add/Update CACHE
"5" = Failed to Delete
CACHE
"6" = Fetch Failed
EV01 Return Cursor I/O Y 1 = Return Cursor
0 = Do not Return
Cursor
GENLNGCursor I/O N Returns cursor
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
cSuppressErrorMessage | SUPPS | char | NONE | NONE |
A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.
0 = allow
| ||||
szErrorMessageID | DTAI | char | NONE | NONE |
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
| ||||
cCacheCodeError | EV01 | char | NONE | NONE |
| ||||
cCacheActionCode | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cReturnCursor | EV01 | char | NONE | NONE |
| ||||
idCursor | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
nNumberOfKeys | INT01 | integer | NONE | NONE |
| ||||
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
szBranch | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szLocation | LOCN | char | NONE | NONE |
The storage location from which goods will be moved. | ||||
mnQuantity | QTY | MATH_NUMERIC | NONE | NONE |
The number of units associated with an asset. | ||||
szLot | LOTN | char | OPT | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. |
None |
None |