CacheProcessRepostAccountLedger

Cache Process Repost Account Ledger

Minor Business Rule

Object Name: B0900158

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used in the program R099102 - Repost Account Ledger.  Its primary use is to 

accumulate F0902 account balances (from posted F0911 transactions) in a cache table for amount ledgers and 

corresponding unit ledgers, and either clear or load account information, or terminate cache records.   

Associated information includes [Account ID, Century, Fiscal Year, Fiscal Quarter, Ledger Type, 

Subledger Type, Subledger, CRCD, CRCX, and Period Amounts 1-14].  After the cache has been loaded with the 

account information, use the internal function (within this same business function) 

"I0900158_RetrieveRecordFromCache" to retrieve the account records sequentially. 


Technical Specification


2.1Parameters:


Data Item Data Structure DescriptionI/ORequiredNotes

AIDszAccountIDI Pass in the 

desired account 

ID of record to 

load, OR a

blank for the

"clear cache" 

mode or termi-

nate cache" mode.

CTRYmnCenturyI/O

FYmnFiscalYearI/O

FQszFiscalQtrI/O

LTszLedgerTypeI/O

ULTszUnitsLedgerTypeI/O

SBLszSubledgerI/O

SBLTcSubledgerTypeI/O

CRCDszCurrencyCodeFromI/O

CRCXszCurrencyCodeDenomI/O

PNmnPeriodNumberI/O

AAmnAmountI/O

UmnUnitsAmountI/O

DL010szCacheNameI/OReqA 50-character 

string variable 

should be null 

when passed in 

the first time.

The actual cache 

name will be returned on the

initial call.

This same cache 

name should then

be reused upon

subsequent calls

until termination 

before exiting  

the program.

EV01cProcessingModeIReq




2.2Related Tables 

Table Table Description



2.3Related Business Functions

Source NameFunction Name

  


2.4Processing 


If cProcessingModeFlag is equal to 'C':

• 

Clear the cache of current account information and amounts.
• 

If cProcessingModeFlag is equal to 'L':
• 
Load the account information for the specified amount ledger and corresponding units ledger.  
Copy amounts from the BSFN data structure to the specified cache table, accumulating amounts for each 

ledger type/subledger/crcd.

• 

If cProcessingModeFlag is equal to 'T':

• 
Terminate the cache.
• 


Clearing the cache:

• 
Delete all cache records (will consist of records for one account for both the specified 
amount ledger and corresponding units ledger'85 called from F0911 AID/CTRY/FQ/LT level break footer).

• 

Loading the cache.

• 
Check to see if the specified record exists.
• Retrieve the period number passed in and copy or add the amount passed in to the corresponding 
bucket amount.

• 
• 
Add or update the record information and accumulated amounts for the amount ledger passed in 
to the corresponding cache elements.

• If the unit amount passed in is non-zero, repeat the above steps for the units ledger.
• 

Terminating the cache:

• 
Destroy the cache.  Should be called once before exiting the program.
• 




Data Structure

D0900158 - Cache Process Repost Account Ledger

Parameter NameData ItemData TypeReq/OptI/O/Both
szAccountIDAIDcharOPTNONE

A number that the system assigns to each general ledger account in the Account Master table (F0901) to uniquely identify it. 

mnCenturyCTRYMATH_NUMERICOPTNONE

The calendar century associated with the year. Enter is the first two digits of the year. For example, 19 indicates any year beginning with 19 
(1998, 1999), 20 indicates any year beginning with 20 (2000, 2001), and so on.

mnFiscalYearFYMATH_NUMERICOPTNONE

A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. 
For example, a fiscal year begins October 1, 1998 and ends September 30, 1999. The end of the first period is October 31, 1998. Specify the 
year 98 rather than 99.

szFiscalQtrFQcharOPTNONE

A data field reserved for future use.

szLedgerTypeLTcharOPTNONE

A user defined code (09/LT) that specifies the type of ledger, such as AA (Actual Amounts), BA (Budget Amount), or AU (Actual Units). You 
can set up multiple, concurrent accounting ledgers within the general ledger to establish an audit trail for all transactions.

szUnitsLedgerTypeULTcharOPTNONE

The units ledger is relational to the amount ledger.  The first character in both ledgers is the same.  The second character in the units ledger 
is a U. The one exception to this rule is the AZ (Cash Basis) amount ledger.  If you do not fill in a units ledger for the AZ amount ledger, a 
default units ledger of ZU will be used by the G/L Post.  The units ledger must be a valid ledger type.

szSubledgerSBLcharOPTNONE

A code that identifies a detailed, auxiliary account within a general ledger account. A subledger can be an equipment item number or an 
address book number. If you enter a subledger, you must also specify the subledger type.

cSubledgerTypeSBLTcharOPTNONE

A user defined code (00/ST) that is used with the Subledger field to identify the subledger type and how the system performs subledger 
editing. On the User Defined Codes form, the second line of the description controls how the system performs editing. This is either hard-coded 
or user defined. Valid values include: A Alphanumeric field, do not edit   N Numeric field, right justify and zero fill   C Alphanumeric field, right 
justify and blank fill  

szCurrencyCodeFromCRCDcharOPTNONE

A code that identifies the currency of a transaction. 

szCurrencyCodeDenomCRCXcharOPTNONE

A code that indicates the currency in which an amount is denominated.

mnPeriodNumberPNMATH_NUMERICOPTNONE

A number indicating the current accounting period.  This number, used in conjunction with the Company Constants table (F0010) and the 
General Constants table (F0009), allows the user to define up to 14 accounting periods. See General Ledger Date.  The current period number 
is used to determine posted before and posted after cut off warning messages.  It is also used as the default accounting period in the 
preparation of financial reports.

mnAmountAAMATH_NUMERICOPTNONE

A number that identifies the amount that the system will add to the account balance of the associated account number.  Enter credits with a 
minus sign (-) either before or after the amount. 

mnUnitsAmountUMATH_NUMERICOPTNONE

The quantity of something that is identified by a unit of measure. For example, it can be the number of barrels, boxes, cubic yards, gallons, 
hours, and so on.

szCacheNameDL010charREQBOTH

A general description.

cProcessingModeEV01charREQINPUT

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

Related Functions

None

Related Tables

None