F0902BUpdateAccountBalances

F0902B Update Account Balances

Major Business Rule

Object Name: B0900091

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose
The purpose of this function is to update the Account Balances table for 52 Period Accounting 
(F0902B).



Technical Specifications


Processing 

1.Call Fiftytwo Period Accounting, Get Currency Code (N0900093), passing in the Company (ds-CO), 
Object (ds-OBJ), Subsidiary (ds-SUB), Ledger Type (ds-LT), and Account and Transaction Currency Codes.

2.Assign the Account Balance keys:  Account ID (ds-AID), Century (ds-CTRY), Fiscal Year (ds-FY), 

Fiscal Quarter (ds-FQ), Ledger Type (ds-LT), Subledger (ds-SBL), Subledger Type (ds-SBLT), and 

Currency Code (wf-CRCD).

3.If the Amount (ds-AA) is not equal to zero,

a.Fetch the Account Balance table (F0902B) with the given keys.
b.If the fetch is successful,

i.Add the Amount (ds-AA) to the appropriate period.
ii.Assign the Amount (ds-AA) to the Week-to-Date Amount (GBAWTD).

iii.Update the Account Balance record.

c.Else,
i.Add the Amount (ds-AA) to the appropriate period.
ii.Assign the Amount (ds-AA) to the Week-to-Date Amount (GBAWTD).

iii.Assign the Company, Business Unit, Object, and Subsidiary from the input data structure 

(ds-CO, ds-MCU, ds-OBJ, ds-SUB), and the Denominated in Currency Code (CRCX) from its work field.

iv.Write a new Account Balance record.

d.Concatenate the G/L Century (ds-CTRY) and the Fiscal Year (ds-FY) to obtain a G/L Date work 
field.  Concatenate the Fiscal Date Patterns Century (X0903B-CTRY) and the Fiscal Year (X0903B-FY) to 

obtain a returned date work field.

e.If the G/L Date is less than the returned date,

i.If the Account Balance Fiscal Year is 99, add one to the Account Balance Century and the 
Fiscal Year keys; else, add one only to the Fiscal Year key.

ii.Perform a fetch on the Account Balance table with the adjusted keys.

iii.If the fetch is successful,

a)Add the Amount (ds-AA) to the Beginning Balance/PYE Forward Amount.
b)Add the Amount (ds-AA) to the Prior Year Net Postings Amount.

c)Update the Account Balance record.

iv.Else,
a)Assign the Prior Year Net Postings Amount and the Beginning Balance/PYE Forward Amount 
from the Amount (ds-AA).

b)Assign the Company, Business Unit, Object, and Subsidiary from the input data structure 

(ds-CO, ds-MCU, ds-OBJ, ds-SUB) , and the Denominated in Currency Code (CRCX) from its work 

field.

c)Write a new Account Balance record.

v.If the Fiscal Year key is equal to zero, subtract one from both the Fiscal Year and 
Century keys; else, subtract one only from the Fiscal Year key.


4.If the Units (ds-U) is not equal to zero,

a.Assign 'U' to the Ledger Type key field.
b.Fetch the Account Balance record for the adjusted key.

c.If the fetch is successful,

i.Add the Units (ds-U) to the appropriate period.
ii.Assign the Units (ds-U) to the Week-to-Date Amount.

iii.Update the Account Balance record.

d.Else,
i.Add the Units (ds-U) to the appropriate period.
ii.Assign the Units (ds-U) to the Week-to-Date Amount.

iii.Assign the Company, Business Unit, Object, and Subsidiary from the input data structure 

(ds-CO, ds-MCU, ds-OBJ, ds-SUB), and the Denominated in Currency Code (CRCX) from its work field.

iv.Write a new Account Balance record.

e.Clear the two date work fields.
f.Concatenate the G/L Century (ds-CTRY) and the Fiscal Year (ds-FY) to obtain a G/L Date work 

field.  Concatenate the Fiscal Date Patterns Century (X0903B-CTRY) and the Fiscal Year (X0903B-FY) to 

obtain a returned date work field.

g.If the G/L Date is less than the returned date,

i.If the Account Balance Fiscal Year is 99, add one to the Account Balance Century and the 
Fiscal Year keys; else, add one only to the Fiscal Year key.

ii.Perform a fetch on the Account Balance table with the adjusted keys.

iii.If the fetch is successful,

a)Add the Units (ds-U) to the Beginning Balance/PYE Forward Amount and to the Prior Year 
Net Postings Amount.

b)Update the Account Balance record.

iv.Else,
a)Assign the Prior Year Net Postings Amount and the Beginning Balance/PYE Forward Amount 
from the Units (ds-U).

b)Assign the Company, Business Unit, Object, and Subsidiary from the input data structure 

(ds-CO, ds-MCU, ds-OBJ, ds-SUB), and the Denominated in Currency Code (CRCX) from its work 

field.

c)Write a new Account Balance record.



^

Data Structure

D0900091 - F0902B Update Account Balances

Parameter NameData ItemData TypeReq/OptI/O/Both
szCompanyCOcharOPTNONE

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

jdDateForGLandVoucherJULIADGJJDEDATEOPTNONE

A date that identifies the financial period to which the transaction will be posted. You define financial periods for a date pattern code that you 
assign to the company record. The system compares the date that you enter on the transaction to the fiscal date pattern assigned to the 
company to retrieve the appropriate fiscal period number, as well as to perform date validations.

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.

mnFiscalYear1FYMATH_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.

szFiscalQtrFutureUseFQcharOPTNONE

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.

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.

mnAmountFieldAAMATH_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. 

szCostCenterMCUcharOPTNONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szObjectAccountOBJcharOPTNONE

The portion of a general ledger account that refers to the division of the Cost Code (for example, labor, materials, and equipment) into 
subcategories. For example, you can divide the Cost Code for labor into regular time, premium time, and burden. Note: If you use a flexible chart of 
accounts and the object account is set to 6 digits, J.D. Edwards recommends that you use all 6 digits. For example, entering 000456 is not 
the same as entering 456 because if you enter 456 the system enters three blank spaces to fill a 6-digit object.

szSubsidiarySUBcharOPTNONE

A subset of an object account. Subsidiary accounts include detailed records of the accounting activity for an object account.

mnUnitsUMATH_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.

cGLPostCodeAlt002ALT2charOPTNONE

The alternate G/L posting codes are used for transactional posting other than the normal G/L posting.  Examples include service date 
ledger posting, tax ledger posting, alternate currency ledger posting, and so forth. This post code is used in conjunction with 52 period accounting. 
If this post code is blank for any particular transaction record, then it will be considered for posting to the 52 period Account Balance File 
(F0902B) during the G/L Post procedure. This post code will then be updated to a "P". If a repost to the F0902B file is ever required, only those 
records whose alternate 2 post code status is a "P" will be reposted.

cErrorCodeERRCcharOPTNONE

Returns 1 for error, 0 for success.
^

szUserIdUSERcharOPTNONE

The code that identifies a user profile.

szWorkStationIdJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

jdDateUpdatedUPMJJDEDATEOPTNONE

The date that specifies the last update to the file record.

mnTimeLastUpdatedUPMTMATH_NUMERICOPTNONE

The time that specifies when the program executed the last update to this record.

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

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  

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.

mnF0008FiscalYearFYMATH_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.

mnF0008CenturyCTRYMATH_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.

szTransactionCurrencyCodeCRCDcharOPTNONE

A code that identifies the currency of a transaction. 

szCurrencyCodeDenomCRCXcharOPTNONE

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

Related Functions

B9800100 Get Audit Information
X0903B F0008B Get Fiscal Year Period Number

Related Tables

F0902B Account Balances - 52 Period Accounting