1.Functional Description
1.1Purpose
This function will perform Get, Add, Update, Delete, Delete All, Get Next, Add/Update, and Terminate
functions on the MRP Purchase Order Cache used in the MRP/MPS planning programs (P3482 and P3483).
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.
1.2 Setup Notes and Prerequisites
Cache Action Code
'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 - close the open cursor
'N' Get Nearest - Retrieve the cache element matching the input Item, Branch and Date. If the
element does not exist, retrieve the element with the date immediately before or after based on the
input Comparison Flag.
'D' Debug Mode - Dumps the contents of the entire cache into a text file
Number of Keys
key values for a Get, Update, Delete, Get Next, and Add/Update.
A zero may be passed to retrieve, update, or delete the first record.
When action code GET is used, the function saves the cache cursor pointer if the fetch is successful
and SequentialFetch = '1'. This allows the calling application to use GET NEXT to fetch elements
from the cache sequentially. If GET NEXT is called until the end of the keyed cache dataset is found,
the function automatically closes the open cursor.
1.3Special Logic
This function creates a unique cache for each MRP/MPS planning process. The function appends the
input Job Number string to the two character ID 'PO' to build the cache name used for the calling
application.
2.Technical Specifications
Cache Layout:Cache includes all of the following fields; key fields are noted.
Data Item Data Structure DescriptionKey Field
ITMShort Item NumberY
MCUBranchY
PDDJPromised Delivery DateY
DOCOOrder Number
DCTOOrder Type
KCOOCompany
SFXOOrder Suffix
LNIDLine Number
AN8Address Number
TRDJOrder Date
UOPNOpen Quantity
RORNRelated Order Number
RCTORelated Order Type
RKCORelated Order Company
RLLNRelated Order Line No
EV01Expedite Flag
I.Perform setup functions
B.If not successful, set error "032E", set Cache Error Code = '3', and return failure.
C.Set Cache Error Code = '0'
D.Set return code to success.
II.Processing Based on Mode.
2.Retrieve the first element on the cache matching the key values passed as input. If the
input Number of Keys is zero, fetch the first element in the cache.
3.Load the values from the retrieved element into the data structure to be passed back to
the calling program.
4.If SequentialFetch is '1', return the cursor pointer to the calling application.
Otherwise, close the cursor.
5.If get fails set Cache Error Code = '6'.
2.If add fails set error "032E", set Cache Error Code = '4', and return failure.
2.If update fails set error "032E", set Cache Error Code = '4', and return failure.
passed as input.
2.If the number of keys is 0, delete the first cache element.
3.If delete fails, set Cache Error Code = '5'.
E.If Cache Action Code is '5' - DELETE ALL:
2.If delete fails, set Cache Error Code = '5'.
cursor should have been set through a previous "Get" action, i.e. Cache Action Code '1'. If the
Number of Keys is zero then fetch the next record without 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 the cursor and set Cache Error Code = '1'.
G.If Cache Action Code is '7' - ADD/UPDATE:
2.Insert a new cache element with values from data structure.
3.If add fails set error "032E", set Cache Error Code = '4', and return failure.
2.Retrieve the first element in the cache matching the key values passed as input. The
input Number of Keys must be 3. (ITM, MCU, PDDJ)
3.If successful, load the values from the retrieved element into the data structure to be
passed back to the calling program and return success.
4.If not successful, Reset cursor.
5.Using just the input Item and Branch as the key, search for the cache element with the
desired date based on the input Direction Flag:
'A' = retrieve the cache element occurring just after the input Date
the calling program. Close the cursor.
7.If get fails set Cache Error Code = '6'.
2.Close Cursor
3.Free Ptr
4.Set Cache Cursor Ptr = 0
^
D3401320 - Cache, Process MRP Purchase Orders
Data Item Data Structure DescriptionI/ORequiredNotes
JOB Job Number IY Job Number as string for
cache name
ITM Short Item Number I/OY Key value
MCU Branch I/OY Key value
PDDJ Promised Delivery Date I/OY Key value
DOCO Order Number I/OY
DCTO Order Type I/OY
KCOO Company I/OY
SFXO Order Suffix I/OY
LNID Line Number I/OY
AN8 Address Number I/OY
TRDJ Order Date I/OY
UOPN Open Quantity I/OY converted to primary UOM
RORN Related Order Number I/OY
RCTO Related Order Type I/OY
RKCO Related Order Company I/OY
RLLN Related Order Line No I/OY
EV01 Expedite Flag I/OY
EV02 Cache Action Code IY '1' = Get cache element
'2' = Add element
'3' = Update element
'4' = Delete cache elements
'5' = Delete All cache
elements
'6' = Get Next cache element
'7' = Add/Update cache
element
'8' = End cache (terminate
cache)
'9' = Close Cursor and Free
Ptr
'N' = Get Nearest
'D' = Dump cache into text
file
EV01 Cache Error Code ON '0' = Success Process
'1' = Reached End of
Cache(mode 6)
'2' = Invalid Input Parameter
'3' = Failed to Create Cache
'4' = Failed to Add/Update
Cache
'5' = Failed to Delete Cache
'6' = Fetch Failed(mode 1 or
9)
EV01 Comparison Flag I Only used for action code
'9':
'B' = get cache element
w/Date <=
input date
'A' = get cache element
w/Date >=
input date
INT01 Number of Keys IY Number of Keys to be used in
the
cache process.
SUPPS Suppress Error Message IN '0'= allow runtime error
message
handling.
'1'= Suppress runtime error
message
handling.
DTAI Error Message Id ON " " = Success
"032E" = Error Processing
Cache
GENLNG Cache Cursor Ptr I/ON
EV03 Sequential Fetch I/ON If action is GET and this
parm is
'1', function will pass back
cursor
pointer for GET NEXT
operation.
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szJobNumber | JOB | char | NONE | NONE |
Job Number | ||||
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
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
| ||||
jdPromisedDeliveryDate | PDDJ | JDEDATE | NONE | NONE |
The promised shipment date for either a sales order or purchase order. The Supply and Demand Programs use this date to calculate
| ||||
mnOrderNumber | DOCO | MATH_NUMERIC | NONE | NONE |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
szOrderType | DCTO | char | NONE | NONE |
A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has
| ||||
szCompany | KCOO | char | NONE | NONE |
A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a
| ||||
mnLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
szOrderSuffix | SFXO | char | NONE | NONE |
In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies
| ||||
mnAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
jdOrderDate | TRDJ | JDEDATE | NONE | NONE |
The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing. | ||||
mnOpenQuantity | UOPN | MATH_NUMERIC | NONE | NONE |
The original quantity for the order detail line, plus or minus any changes to that quantity, minus all quantities shipped, received, and
| ||||
szRelatedOrderNumber | RORN | char | NONE | NONE |
A number that identifies a secondary purchase order, sales order, or work order that is associated with the original order. This number is for
| ||||
szRelatedOrderType | RCTO | char | NONE | NONE |
A user defined code (system 00, type DT) that indicates the document type of the secondary or related order. For example, a purchase
| ||||
szRelatedCompany | RKCO | char | NONE | NONE |
The key company that is associated with the document number of the related order. | ||||
mnRelatedOrderLineNo | RLLN | MATH_NUMERIC | NONE | NONE |
A number of the detail line on the related order for which the current order was created. For example, on a purchase order created to fill
| ||||
cExpediteFlag | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cCacheActionCode | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cCacheErrorCode | EV03 | char | NONE | NONE |
A radio button that specifies the level at which trace/track result is to be displayed. Select the Detail to display all transactions except IB, IX,
| ||||
nNumberOfKeys | INT01 | integer | NONE | NONE |
Number of Days in Future to Query for Responses Due. | ||||
cSequentialFetch | EV04 | char | NONE | NONE |
PeopleSoft event point processing flag 04. | ||||
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
| ||||
idCacheCursorPtr | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
cComparisonFlag | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnOrderQuantity | UORG | MATH_NUMERIC | OPT | BOTH |
The quantity of units affected by this transaction. | ||||
jdDateSave | PDDJ | JDEDATE | OPT | NONE |
The promised shipment date for either a sales order or purchase order. The Supply and Demand Programs use this date to calculate
| ||||
cDeferFlag | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
nIndexNumber | INT02 | integer | OPT | NONE |
Number of Days in the Past to Query for Quote Requests Received. | ||||
jdDateRecommendedStart | RSTJ | JDEDATE | OPT | NONE |
The recommended start date for an order. | ||||
szSupplyBranch | MMCU | char | OPT | NONE |
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
| ||||
jdRecommendedDeliveryDate | REDJ | JDEDATE | OPT | NONE |
The date that the system produces when you respond to an MRP message that contains a recommended date. | ||||
jdDateRequestedSave | DRQJ | JDEDATE | OPT | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
jdOriginalEffectiveDateSaved | OEDJ | JDEDATE | OPT | NONE |
A purchase item's original effective date for a lot controlled item. MRP messages use this field to alert users to review the MRP time series
|
None |
None |