TerminateJobCostLedgerTypesCache

Trial Balance Calculate Balances

Minor Business Rule

Object Name: B0900090

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to terminate the cache that is used in the Trial Balance Calculate Balances 
BSFN.


Setup Notes and Prerequisites

This function should be called when all processes are completed.  At the end of a BSFN, in End 

Section of a UBE or on the Cancel Button of an interactive application.  The user should pass a "Y" in the 

cTerminateLedgerTypesCacheFlag parameter.


Special Logic

Please refer to the Data Structure Attachments for detailed instructions on parameter requirements 

and functionality.


Technical Specification


Main BSFN:

If cTerminateLedgerTypesCacheFlag = "Y"
   Terminate the "Ledger Types" Cache

Data Structure

D0900090A - Terminate Job Cost Ledger Types Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
cTerminateLedgerTypesCacheFlagEV01charOPTINPUT

Special Input Expected
Pass a "Y" to allow for the "Ledger Types" cache to be terminated.  This BSFN should be called when 

the process has completed calculating all balances, i.e. End Section of a UBE, the Cancel Button of an 

Interactive Application, or at the end of a BSFN.


Special Output Returned

^

Related Functions

None

Related Tables

F0025 Ledger Type Master File
F0901 Account Master
F0902 Account Balances
F0911 Account Ledger
TrialBalanceCalculateBalances

TrialBalanceCalculateBalances

Trial Balance Calculate Balances

Major Business Rule

Object Name: B0900090

Parent DLL: CFIN

Location: Client/Server

Language: C

B0900090  Trial Balance Calculate Balances:

Functional Description


Purpose

This function is used to calculate an account's balance.


Setup Notes and Prerequisites

This function was originally designed to be used in the Trial Balance by Business Unit application, 

but has been enhanced to handle any type of account balance calculation.  This function replaces 

B0900008 - Return Account Balance.


Special Logic

This function can act either of two ways:

1. Can calculate the account balance for one specific account (Most common use).

To accomplish this pass a "9" in the cRequestedLevelOfDetail parameter.

2. Can calculate the account balance for one specific account AND all other accounts that are 

underneath this account in Level of Detail. (Used in LOD Trial Balances).

To accomplish this pass the requested roll up LOD in the cRequestedLevelOfDetail parameter, and the 

Account's actual LOD in the cAccountLevelOfDetail.


In addition, this function will calculate balances for all ledger types that have the FBL flag set to 

"1" in the F0025 table.  This field represents Revisable Budget Job Cost Ledger Types.  To accomplish 

this, pass a "Y" in the cUseAllJCBudgetLedgersFlag parameter.  You will also need to call the 

Terminate Job Costs Ledger Types Cahce afterwards to delete the cache.


Please refer to the Data Structure Attachments for detailed instructions on parameter requirements 

and functionality.


Technical Specification


Main BSFN:

Determine Rollup Method

Set F0902 Table Info

If Using Date Effectivity

   Set F0911 Table Info

If cRequestedLevelOfDetail = "9"

   / *If cPostingEditCode != "N" */

   /* Needed to disable the above ER because the account balances need to be displayed for 

non-posting accounts as                well.  Please see SAR #3152931. */

      Call Account Balance Calculate

Else

   Fetch record from F0901 based on cAccountID

   /* If cPostingEditCode != "N" */ /* This line needs to be disabled because the account balances 

need to be 

      displayed for non-posting accounts as well. Please see SAR #3152931. */

      Call Account Balance Calculate

   Fetch next record from F0901

   While Fetches from F0901 are valid AND Fetched LOD > cAccountLevelOfDetail

      If Previous PEC = BLANK AND Previous LOD != cAccountLevelOfDetail

         Stop Processing

     /* If Fetched PEC != "N"*/ /* This line needs to be disabled because the account balances need 

to be

        displayed for non-posting accounts as well.  Please see SAR #3152931. */

         Call Account Balance Calculate

      Fetch next record from F0901


Account Balance Calculate:

This logic is run for each Ledger Type individually.  All date information is relative to which 

Ledger Type is being processed. i.e. szLedgerType2 uses jdThruDate2, mnFiscalYear2, etc...


If szLedgerType != BLANK

   If cDateEffectivityFlag = "Y" AND jdThruDate != jdPeriodEndDate

      Set flag to NOT process the F0902 for Period Balances      

      Calculate "Middle Of The Month"

      Calculate "Number Of Days Difference" between jdPeriodBeginDate

                                                          and jdThruDate

      If "Number Of Days Difference" < "Middle Of The Month"

         Set flag to process first half of period

         Subtract 1 from mnPeriodNumber

         Set F0911 key to jdPeriodBeginDate

      Else

         Set flag to process last half of period

         Set F0911 key to jdThruDate

      Call F0911 Balance Calculate

      If cIncludeUnpostedFlag = "Y"

         Set F0911 key to Posted Code of BLANK

         Call F0911 Balance Calculate

   Else

      Set flag to process the F0902 for Period Balances      

      Call F0902 Balance Calculate

   Accumulate Calculated Balances to Return Data Structure

If cUseAllJCBudgetLedgersFlag = "Y"

   Read F0025 records into "Ledger Types" cache


Note: Process the following logic for ALL Ledger Types found in the F0025 table.


   If cDateEffectivityFlag = "Y" AND jdThruDate != jdPeriodEndDate

      Set flag to NOT process the F0902 for Period Balances      

      Calculate "Middle Of The Month"

      Calculate "Number Of Days Difference" between jdPeriodBeginDate

                                                          and jdThruDate

      If "Number Of Days Difference" < "Middle Of The Month"

         Set flag to process first half of period

         Subtract 1 from mnPeriodNumber

         Set F0911 key to jdPeriodBeginDate

      Else

         Set flag to process last half of period

         Set F0911 key to jdThruDate

      Call F0911 Balance Calculate

      If cIncludeUnpostedFlag = "Y"

         Set F0911 key to Posted Code of BLANK

         Call F0911 Balance Calculate

   Else

      Set flag to process the F0902 for Period Balances      

      Call F0902 Balance Calculate

   Accumulate Calculated Balances to Return Data Structure

Calculate Variances


F0902 Balance Calculate:

While F0902 Fetches are valid

   Fetch record from F0902

   If Fetch is valid

      ANxx is the requested period bucket of the F0902

      If Flag to Process the F0902 = "Y" OR

         Flag to Process First Half of Period  = "N"

         Add ANxx to Accumulated Period Balance

      Add ANxx and all other's prior within the Fiscal Year to Accumulated

                                                                 YTD Balance

      Add APYC to Accumulated Balance Forward Amount

      Add APYN to Accumulated Prior Year Net Posting Amount

      Add BORG to Accumulated Budget Original Amount

      Add BREQ to Accumulated Budget Requested Amount

      Add BAPR to Accumulated Budget Approved Amount

      If cAddBalanceForwardToYTDAmount = "Y"

         Add APYC to the Accumulated YTD Balance


F0911 Balance Calculate:

If Flag to Process First Half of Period  = "Y"

   Fetch record from F0911

   While Fetched Date <= jdThruDate

      If Fetched Date <= jdThruDate AND Fetched Date >= jdPeriodBeginDate

         Add AA to Accumulated Period Balance

         Add AA to Accumulated YTD Balance

      Fetch record from F0911

Else

   Fetch record from F0911

   While Fetched Date >= jdThruDate

      If Fetched Date >= jdThruDate AND Fetched Date <= jdPeriodEndDate

         Subtract AA to Accumulated Period Balance

         Subtract AA to Accumulated YTD Balance

      Fetch record from F0911

Data Structure

D0900090 - Trial Balance Calculate Balances

Parameter NameData ItemData TypeReq/OptI/O/Both
szBusinessUnitMCUcharREQINPUT

Special Input Expected
Pass in the Business Unit associated with the Account (AID) that is also being passed.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

szObjectAccountOBJcharREQINPUT

Special Input Expected
Pass in the Object Account associated with the Account (AID) that is also being passed.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

szSubsidiarySUBcharREQINPUT

Special Input Expected
Pass in the Subsidiary associated with the Account (AID) that is also being passed.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

cAccountLevelOfDetailLDAcharREQINPUT

Special Input Expected
Pass in the Account Level of Detail associated with the Account (AID) that is also being passed.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

szSubledgerSBLcharREQINPUT

Special Input Expected
Pass in the Subledger value to be used when calculating the account balance.  If you do not have the 

value or are unsure of what to pass, then pass an "*".


THIS IS A REQUIRED FIELD.


Special Output Returned

^

cSubledgerTypeSBLTcharREQINPUT

Special Input Expected
Pass in the Subledger Type value to be used when calculating the account balance.  If you do not have 

the value or are unsure of what to pass, then pass a blank.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

szCurrencyCodeCRCDcharREQINPUT

Special Input Expected
Pass in the Currency Code value to be used when calculating the account balance.  If you do not have 

the value or are unsure of what to pass, then pass an "*".


THIS IS A REQUIRED FIELD.


Special Output Returned

^

szLedgerType1LTcharOPTINPUT

Special Input Expected
Pass in the first Ledger Type value to be used when calculating the account balance.  If left blank 

no amounts will be calculated for this Ledger Type.


Special Output Returned

^

szLedgerType2LTcharOPTINPUT

Special Input Expected
Pass in the second Ledger Type value to be used when calculating the account balance.  If left blank 

no amounts will be calculated for this Ledger Type.


Special Output Returned

^

szLedgerType3LTcharOPTINPUT

Special Input Expected
Pass in the third Ledger Type value to be used when calculating the account balance.  If left blank 

no amounts will be calculated for this Ledger Type.


Special Output Returned

^

szLedgerType4LTcharOPTINPUT

Special Input Expected
Pass in the fourth Ledger Type value to be used when calculating the account balance.  If left blank 

no amounts will be calculated for this Ledger Type.


Special Output Returned

^

mnPeriodNumber1PNMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Period Number to be used for calculating the account balance for the first Ledger Type.  

If left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 1 IS POPULATED.


Special Output Returned

mnPeriodNumber2PNMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Period Number to be used for calculating the account balance for the second Ledger Type.  

If left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 2 IS POPULATED.


Special Output Returned

^

mnPeriodNumber3PNMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Period Number to be used for calculating the account balance for the third Ledger Type.  

If left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 3 IS POPULATED.


Special Output Returned

^

mnPeriodNumber4PNMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Period Number to be used for calculating the account balance for the fourth Ledger Type.  

If left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 4 IS POPULATED.


Special Output Returned

^

mnFiscalYear1FYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Fiscal Year to be used for calculating the account balance for the first Ledger Type.  If 

left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 1 IS POPULATED.


Special Output Returned

mnFiscalYear2FYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Fiscal Year to be used for calculating the account balance for the second Ledger Type.  

If left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 2 IS POPULATED.


Special Output Returned

^

mnFiscalYear3FYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Fiscal Year to be used for calculating the account balance for the third Ledger Type.  If 

left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 3 IS POPULATED.


Special Output Returned

^

mnFiscalYear4FYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Fiscal Year to be used for calculating the account balance for the fourth Ledger Type.  

If left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 4 IS POPULATED.


Special Output Returned

^

mnCentury1CTRYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Century to be used for calculating the account balance for the first Ledger Type.  If 

left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 1 IS POPULATED.


Special Output Returned

^

mnCentury2CTRYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Century to be used for calculating the account balance for the second Ledger Type.  If 

left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 2 IS POPULATED.


Special Output Returned

^

mnCentury3CTRYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Century to be used for calculating the account balance for the third Ledger Type.  If 

left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 3 IS POPULATED.


Special Output Returned

^

mnCentury4CTRYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Century to be used for calculating the account balance for the fourth Ledger Type.  If 

left blank no amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF LEDGER TYPE 4 IS POPULATED.


Special Output Returned

^

mnPeriodAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Period Balance for Ledger Type 1.

^

mnPeriodAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Period Balance for Ledger Type 2.

^

mnPeriodAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Period Balance for Ledger Type 3.

^

mnPeriodAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Period Balance for Ledger Type 4.

^

mnYTDAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for Ledger Type 1.

mnYTDAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for Ledger Type 2.

^

mnYTDAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for Ledger Type 3.

^

mnYTDAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for Ledger Type 4.

^

mnBalanceForwardAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 1.

^

mnBalanceForwardAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 2.

^

mnBalanceForwardAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 3.

^

mnBalanceForwardAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 4.

^

mnPriorYearNetPostingAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 1.

mnPriorYearNetPostingAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 2.

^

mnPriorYearNetPostingAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 3.

^

mnPriorYearNetPostingAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 4.

^

mnVarianceAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of Period 1 Amount and Period 2 Amount.

(Addition       = mnPeriodAmount1 + mnPeriodAmount2)

(Subtraction    = mnPeriodAmount1 - mnPeriodAmount2) 

(Multiplication = mnPeriodAmount1 x mnPeriodAmount2) 

(Division       = mnPeriodAmount1 / mnPeriodAmount2)

^

mnVarianceAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of YTD 1 Amount and YTD 2 Amount.

(Addition       = mnYTDAmount1 + mnYTDAmount2)

(Subtraction    = mnYTDAmount1 - mnYTDAmount2) 

(Multiplication = mnYTDAmount1 x mnYTDAmount2) 

(Division       = mnYTDAmount1 / mnYTDAmount2)

^

mnVarianceAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of Period 3 and Period 4 Balances.

(Addition       = mnPeriodAmount3 + mnPeriodAmount4)

(Subtraction    = mnPeriodAmount3  mnPeriodAmount4) 

(Multiplication = mnPeriodAmount3 x mnPeriodAmount4) 

(Division       = mnPeriodAmount3 / mnPeriodAmount4)

^

mnVarianceAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of YTD 3 Amount and YTD 4 Amount.

(Addition       = mnYTDAmount3 + mnYTDAmount4)

(Subtraction    = mnYTDAmount3  mnYTDAmount4) 

(Multiplication = mnYTDAmount3 x mnYTDAmount4) 

(Division       = mnYTDAmount3 / mnYTDAmount4)

^

cVarianceCalculationMethodEV01charOPTINPUT

Special Input Expected
Pass the appropriate character to initiate Variance Calculations.

("A" - Addition)

("S" - Subtraction) 

("M"  Multiplication)

("D" - Division) 


Special Output Returned

^

cAddBalanceForwardToYTDAmountEV01charOPTINPUT

Special Input Expected
Pass a "Y" to automatically add the APYC balances to the YTD balances.  The developer should have 

checked the account to see if it falls within the AAI ranges of GLG6 and GLG12 to determine whether or 

not to pass a "Y".  Usually, if the account falls before GLG6 or after GLG12, than you would pass a "Y" 

in this parameter. 


Special Output Returned

szAccountIDAIDcharREQINPUT

Special Input Expected
Pass the Short Account ID of the Account you are requesting a balance for.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

cRequestedLevelOfDetailLDAcharREQINPUT

Special Input Expected
If calculating only one account's balance, pass a "9" in this parameter.  This is if you do not wish 

to take Account Level Of Detail into account.  If you need to calculate this account's balance and all 

underneath it in detail, than pass the Account level Of Detail that you are rolling up to.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

cPostingEditCodePECcharREQINPUT

Special Input Expected
Pass in the Posting Edit Code associated with the Account (AID) that is also being passed.


THIS IS A REQUIRED FIELD.


Special Output Returned

^

mnBudgetOriginalAmount1BORGMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Original (BORG) Balance for Ledger Type 1.

^

mnBudgetOriginalAmount2BORGMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Original (BORG) Balance for Ledger Type 2.

^

mnBudgetOriginalAmount3BORGMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Original (BORG) Balance for Ledger Type 3.

^

mnBudgetOriginalAmount4BORGMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Original (BORG) Balance for Ledger Type 4.

^

mnBudgetRequestedAmount1BREQMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Requested (BREQ) Balance for Ledger Type 1.

^

mnBudgetRequestedAmount2BREQMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Requested (BREQ) Balance for Ledger Type 2.

^

mnBudgetRequestedAmount3BREQMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Requested (BREQ) Balance for Ledger Type 3.

^

mnBudgetRequestedAmount4BREQMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Requested (BREQ) Balance for Ledger Type 4.

^

mnBudgetApprovedAmount1BAPRMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Approved (BAPR) Balance for Ledger Type 1.

^

mnBudgetApprovedAmount2BAPRMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Approved (BAPR) Balance for Ledger Type 2.

^

mnBudgetApprovedAmount3BAPRMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Approved (BAPR) Balance for Ledger Type 3.

^

mnBudgetApprovedAmount4BAPRMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Approved (BAPR) Balance for Ledger Type 4.

^

jdThruDate1DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Thru Date to be used for calculating the account balance  for the first Ledger Type.  If 

left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 1 IS POPULATED.



Special Output Returned

jdThruDate2DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Thru Date to be used for calculating the account balance  for the first Ledger Type.  If 

left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 2 IS POPULATED.



Special Output Returned

^

jdThruDate3DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Thru Date to be used for calculating the account balance  for the first Ledger Type.  If 

left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 3 IS POPULATED.



Special Output Returned

^

jdThruDate4DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Thru Date to be used for calculating the account balance  for the first Ledger Type.  If 

left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 4 IS POPULATED.



Special Output Returned

^

jdPeriodEndDate1DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period End Date to be used for calculating the account balance for the first Ledger Type. 

 If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 1 IS POPULATED.



Special Output Returned

jdPeriodEndDate2DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period End Date to be used for calculating the account balance for the first Ledger Type. 

 If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 2 IS POPULATED.



Special Output Returned

^

jdPeriodEndDate3DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period End Date to be used for calculating the account balance for the first Ledger Type. 

 If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 3 IS POPULATED.



Special Output Returned

^

jdPeriodEndDate4DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period End Date to be used for calculating the account balance for the first Ledger Type. 

 If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 4 IS POPULATED.



Special Output Returned

^

cDateEffectivityFlagEV01charOPTINPUT

Special Input Expected
Pass a "Y" to allow the BSFN to calculate Date Effective or "Middle Of The Month" Balances.  If only 

End Of Period Balances are needed, you may leave the following parameters blank: cDateEffectivityFlag, 

cIncludeUnpostedFlag, jdThruDate1, jdThruDate2, jdThruDate3, jdThruDate4, jdPeriodEndDate1, 

jdPeriodEndDate2, jdPeriodEndDate3, jdPeriodEndDate4, jdPeriodBeginDate1, jdPeriodBeginDate2, 

jdPeriodBeginDate3, jdPeriodBeginDate4.  These are only used if cDateEffectivityFlag = "Y".



Special Output Returned

cIncludeUnpostedFlagEV01charOPTINPUT

Special Input Expected
Pass a "Y" to allow the BSFN to calculate Date Effective or "Middle Of The Month" Balances, that are 

unposted.  This flag requires that the cDateEffectivityFlag = "Y".

 


Special Output Returned

jdPeriodBeginDate1DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period Begin Date to be used for calculating the account balance for the first Ledger 

Type.  If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 1 IS POPULATED.



Special Output Returned

jdPeriodBeginDate2DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period Begin Date to be used for calculating the account balance for the first Ledger 

Type.  If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 2 IS POPULATED.



Special Output Returned

^

jdPeriodBeginDate3DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period Begin Date to be used for calculating the account balance for the first Ledger 

Type.  If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 3 IS POPULATED.



Special Output Returned

^

jdPeriodBeginDate4DGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period Begin Date to be used for calculating the account balance for the first Ledger 

Type.  If left blank no F0911 Journal Entry amounts will be calculated for this Ledger Type.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND LEDGER TYPE 4 IS POPULATED.



Special Output Returned

^

cUseAllJCBudgetLedgersFlagEV01charOPTINPUT

Special Input Expected
Pass a "Y" to allow the BSFN to calculate balances using all ledger types found in the F0025 table.  

If left blank, "N" will be defaulted. 


Special Output Returned

^

mnPeriodNumberAPNMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Period Number to be used for calculating the account balance for the all Revisable Budget 

Amount Job Cost Ledger Types.  If left blank no amounts will be calculated for these Ledger Types.


THIS IS A REQUIRED FIELD IF cUseAllJCBudgetLedgersFlag IS POPULATED WITH A "Y".


Special Output Returned

^

mnFiscalYearAFYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Fiscal Year to be used for calculating the account balance for the all Revisable Budget 

Amount Job Cost Ledger Types.  If left blank no amounts will be calculated for these Ledger Types.


THIS IS A REQUIRED FIELD IF cUseAllJCBudgetLedgersFlag IS POPULATED WITH A "Y".


Special Output Returned

^

mnCenturyACTRYMATH_NUMERICOPTINPUT

Special Input Expected
Pass in the Century to be used for calculating the account balance for the all Revisable Budget 

Amount Job Cost Ledger Types.  If left blank no amounts will be calculated for these Ledger Types.


THIS IS A REQUIRED FIELD IF cUseAllJCBudgetLedgersFlag IS POPULATED WITH A "Y".


Special Output Returned

^

mnPeriodAmountAAAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Period Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

mnYTDAmountAAAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

mnBalanceForwardAmountAAAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

mnPriorYearNetPostingAmountAAAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

mnBudgetOriginalAmountABORGMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Original (BORG) Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

mnBudgetRequestedAmountABREQMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Requested (BREQ) Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

mnBudgetApprovedAmountABAPRMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Budget Approved (BAPR) Balance for all Revisable Budget Amount Job Cost Ledger Types.

^

jdThruDateADGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Thru Date to be used for calculating the account balance  for all Revisable Budget Amount 

Job Cost Ledger Types.  If left blank no F0911 Journal Entry amounts will be calculated for these 

Ledger Types.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND cUseAllJCBudgetLedgersFlag IS POPULATED 

WITH A "Y".


Special Output Returned

^

jdPeriodEndDateADGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period End Date to be used for calculating the account balance for the all Revisable 

Budget Amount Job Cost Ledger Types.  If left blank no F0911 Journal Entry amounts will be calculated for 

these Ledger Types.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND cUseAllJCBudgetLedgersFlag IS POPULATED 

WITH A "Y".



Special Output Returned

^

jdPeriodBeginDateADGJJDEDATEOPTINPUT

Special Input Expected
Pass in the Period Begin Date to be used for calculating the account balance for the all Revisable 

Budget Amount Job Cost Ledger Types.  If left blank no F0911 Journal Entry amounts will be calculated 

for these Ledger Types.


THIS IS A REQUIRED FIELD IF DATE EFFECTIVITY FLAG = "Y" AND cUseAllJCBudgetLedgersFlag IS POPULATED 

WITH A "Y".



Special Output Returned

^

cCalculateJobCostBalancesEV01charOPTNONE

Special Input Expected
Pass a "Y" to allow the BSFN to calculate balances using the Job Cost method.  This means that F0901 

Account Master records will be fetched using MCU/SUB/OBJ rather than MCU/OBJ/SUB.  If left blank, "N" 

will be defaulted. 


Special Output Returned

^

Related Functions

None

Related Tables

F0025 Ledger Type Master File
F0901 Account Master
F0902 Account Balances
F0911 Account Ledger
mily:Courier New;font-size:10pt">Returned

Returned YTD Balance for Ledger Type 2.

^

mnYTDAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for Ledger Type 3.

^

mnYTDAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned YTD Balance for Ledger Type 4.

^

mnBalanceForwardAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 1.

^

mnBalanceForwardAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 2.

^

mnBalanceForwardAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 3.

^

mnBalanceForwardAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Balance Forward (APYC) Balance for Ledger Type 4.

^

mnPriorYearNetPostingAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 1.

mnPriorYearNetPostingAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 2.

^

mnPriorYearNetPostingAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 3.

^

mnPriorYearNetPostingAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Prior Year net Posting (APYN) Balance for Ledger Type 4.

^

mnVarianceAmount1AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of Period 1 Amount and Period 2 Amount.

(Addition       = mnPeriodAmount1 + mnPeriodAmount2)

(Subtraction    = mnPeriodAmount1 - mnPeriodAmount2) 

(Multiplication = mnPeriodAmount1 x mnPeriodAmount2) 

(Division       = mnPeriodAmount1 / mnPeriodAmount2)

^

mnVarianceAmount2AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of YTD 1 Amount and YTD 2 Amount.

(Addition       = mnYTDAmount1 + mnYTDAmount2)

(Subtraction    = mnYTDAmount1 - mnYTDAmount2) 

(Multiplication = mnYTDAmount1 x mnYTDAmount2) 

(Division       = mnYTDAmount1 / mnYTDAmount2)

^

mnVarianceAmount3AAMATH_NUMERICOPTOUTPUT

Special Input Expected

Special Output Returned

Returned Variance of Period 3 and Period 4 Balances.

(Addition       = mnPeriodAmount3 + mnPeriodAmount4)

(Subtraction    = mnPeriodAmount3  mnPeriodAmount4) 

(Multiplication = mnPeriodAmount3 x mnPeriodAmount4) 

(Division       = mnPeriodAmount3 / mnPeriodAmount4)

^

mnVarianceAmount4AAMATH_NUMERICOPTOUTPUT

Special Input Expected