F41291ReadWriteLandedCostJobs

F41291 Read/Write Landed Cost Job Numbers

Major Business Rule

Object Name: B4301050

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

To read/write the job #'s used when writing Landed Cost G/L records.

Setup Notes and Prerequisites


Special Logic


Called from named ER Landed Cost Selection.


Technical Specification


If mode = blank, clear the cache for ctid, LC jobs.

If mode  = 1, write record to the cache.

If mode  = 2, update record to the cache.

If mode  = 3, read record from the cache.


To the above processing add BaseCurrency to the cache and cache index and use it throughout to add, 

update, and read.


To the above also add F4111JobNumber to the cache and use it throughout to update or add to the cache 

(just like the G/L JobNumber)


As implied in the parm list above, change the required parameters to not be required any more


• Cache process

I.If Process Mode is "0" - END
Perform cleanup functions (Terminate cache).


I.If Process Mode is "1" - ADD:
A.Insert a new cache element with values from data structure.
B.If add fails set error "032E"(Error Processing Cache) and return failure.


I.If Process Mode is "2" - GET:
A.Open cursor, reset cursor.
B.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. 

    C. Load the values from the retrieved element into the data structure to be passed back to 
the calling program. If get fails return failure.


I.If Process Mode is "3" - UPDATE:

A.Update existing cache element with values from data structure.
If update fails set error "032E" (Error Processing Cache)  and return failure.


I.If Process Mode is "4" - 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 "4", 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 return failure.


I.If Process Mode is "5" - DELETE:

A.If the number of keys is 0, Delete all elements in the cache.
B.If the number of keys is not 0, Delete the first cache elememt matching the the key 

values passed as input. 

C.If delete fails, return failure.


I.If Process Mode is "6" - DELETE ALL:

A.Delete all elements on the cache. 
B.If delete fails, return failure;


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

A.Delete Record , if one exists,  that matches full key from Input.
B.Insert a new cache element with values from data structure.

If add fails set error "032E" (Error Processing Cache) and return failure.

^

Data Structure

D4301050 - F41291 Read/Write Landed Cost Job Numbers

Parameter NameData ItemData TypeReq/OptI/O/Both
szCurrencyCodeCRCDcharNONENONE

A code that identifies the currency of a transaction. 

mnExchangeRateCRRMATH_NUMERICNONENONE

A number (exchange rate) that a foreign currency amount is multiplied by to calculate a domestic currency amount.  The number in this field 
can have a maximum of seven decimal positions. If more are entered, the system adjusts to the nearest seven decimal positions. 

mnJobNumberJOBSMATH_NUMERICNONENONE

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

mnDocumentNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szKeyCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szComputerIDCTIDcharNONENONE

mnLCJobNumberJOBSMATH_NUMERICNONENONE

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

szBaseCurrencyCRDCcharNONENONE

A code that identifies the domestic (base) currency of the company on a transaction. 

mnF4111JobNumberJOBSMATH_NUMERICOPTNONE

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

szCacheActionCodeCACTNcharNONENONE

A code that indicates the activity you want to perform. Valid codes:     o Get - Retrieve the cache element     o Add - Add a cache element     o 
Update - Update a cache element     o Delete - Delete a cache element     o Delete All - Delete all cache elements     o Get Next - Retrieve the 
next cache element     o Add/Update - Add a cache element if it does not exist; Update a cache element if it does exist     o Terminate - 
Terminate Cache

cSuppressErrorMessageSUPPScharNONENONE

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.

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.

idhCursorGENLNGIDNONENONE

General purpose ID variable.

szOrderSuffixSFXOcharOPTNONE

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 
multiple transactions for an original order. For purchase orders, the code is always 000. For sales orders with multiple partial receipts against an 
order, the first receiver used to record receipt has a suffix of 000, the next has a suffix of 001, the next 002, and so on.

mnLastJournalEntryLineNoJELNMATH_NUMERICOPTNONE

A number that designates a line within a journal entry. The system uses this field to sequence the journal entry lines for inquiry purposes.

mnTriangulationRateFromTRR1MATH_NUMERICOPTNONE

The triangulation currency rate used to convert the From currency code to the Triangulation currency code.

mnTriangulationRateToTRR2MATH_NUMERICOPTNONE

The triangulation currency rate that used to convert from the Triangulation currency code to the To currency code.

mnTransportationJobNumberJOBSMATH_NUMERICOPTNONE

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

Related Functions

None

Related Tables

None