Functional Description
Purpose
Calculate total revenue. The calculated revenue amounts can be used as the basis of percent of
revenue calculations. Total revenue is calculated for one level break above object account. If the UBE has
level breaks of Business Unit, Object Account and Subisidiary Account, revenue will be calculated for
each business unit before the business unit is processed. All accounts between the AAI's GLG6 and GLG7
are the basis of total revenue. For each ledger type the following values are returned:
Current Month Total Revenue
Year to Date Total Revenue
Last Year Total Revenue Current Month
Last Years Year to Date Total Revenue
Setup Notes and Prerequisites
This function is designed to work only with tabular sections and to be executed on the before level
break event.
The object and subsidiary accounts for GLG6 and GLG7 must be obtained prior to calling this function.
You must pass the section Id of the tabular section that you wish to calculate total revenue for. To
obtain the section Id find the UBE's application Id in Object Librarian. Open the Universal Table
Browser and open Local Tam, open the file RDASPEC.DDB, search with the application Id in the column
labeled IdReport. The record types of 2 are the sections in the UBE. Tabular sections are SectionType 46.
Locate the section that is type 46 and pass its IdSection to this function in the parameter SectionId.
This function does not allocate memory to store the revenue amounts. You must pass the amounts back
to the function each time it is called.
The parameter PreviouslyComputed is an indicator for all revenue accounts being processed or not. If
PreviouslyComputed is a 'Y' all accounts between GLG6 and GLG7 have been processed and this function
does not need to be called again. Pass this variable to the function each time it is called.
The Ledger Types can be passed or left blank. If both ledger type parameters are blank, the ledger
type entered in data selection is used. If no ledger type is in data selection, all ledger types are
added togather.
Special Logic
Technical Specification
Get the level breaks and sequence from the tablular section, determine the level break one above
object account.
Compare the previous value to the current value to determine if a level break is occuring.
Get the data selection from the tablular section.
Use this data selection to open the F0006, F0901 and F0902 tables.
Select and accumulate all amounts between GLG6 and GLG7 for the given level break.
Return total revenue.
'b7
D1000009 - Calculate Total Revenue
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szObjectAccountGLG6 | OBJ | char | NONE | NONE |
Special Input Expected
| ||||
szSubsidiaryGLG6 | SUB | char | NONE | NONE |
Special Input Expected
| ||||
szObjectAccountGLG7 | OBJ | char | NONE | NONE |
Special Input Expected
| ||||
szSubsidiaryGLG7 | SUB | char | NONE | NONE |
Special Input Expected
| ||||
mnPOPeriodNumber | PN | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
szPOFiscalYear | FYOW | char | NONE | NONE |
Special Input Expected
| ||||
mnSectionId | MATH07 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnCMTotalRevLT1 | AN01 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnYTDTotalRevLT1 | AN01 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnCMLastYrTotalRevLT1 | AN01 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
mnYTDLastYrTotalRevLT1 | AN01 | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
szCompany | CO | char | NONE | NONE |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
szLedgerType1 | LT | char | NONE | NONE |
Special Input Expected
| ||||
szLedgerType2 | LT | char | NONE | NONE |
Special Input Expected
| ||||
mnCMTotalRevLT2 | AN01 | MATH_NUMERIC | NONE | NONE |
A number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company
| ||||
mnYTDTotalRevLT2 | AN01 | MATH_NUMERIC | NONE | NONE |
A number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company
| ||||
mnCMLastYrTotalRevLT2 | AN01 | MATH_NUMERIC | NONE | NONE |
A number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company
| ||||
mnYTDLastYrTotalRevLT2 | AN01 | MATH_NUMERIC | NONE | NONE |
A number that represents the net amount posted during the accounting period. The system uses the accounting periods from the Company
| ||||
cPreviouslyComputed | EV01 | char | NONE | NONE |
Special Input Expected
|
None |
None |