Developing Longview CalculatedJESpecs
This chapter contains information on these main topics:
Creating CalculatedJESpec documents
Journal entries are used to record adjustments to the consolidation process in the Longview system. A calculated journal entry is a journal entry that is created by a calculation, instead of manually through the Journal Entries client. Calculated journal entries are used to record recurring adjustments; for example, a sales bonus adjustment that occurs every month.
Note: To view created calculated journal entries, query all journal entries in the Journal Entries client. For more information, see the Longview Journal Entries Guide.
A CalculatedJESpec document in Longview Application Framework is an ASCII file that is used to specify information about a calculated journal entry such as the journal entry type and description, as well as a line of detail for each adjustment that the calculated journal entry contains. The recommended extension for CalculatedJESpecs is .lvcje.
You must create a CalculatedJESpec document before you can create, delete, post, or unpost the specified calculated journal entry with Longview Application Framework functions. You can create and edit CalculatedJESpecs in your preferred text editor.
A CalculatedJESpec document has the following general syntax:
ApplicationID "AppID"
[Type JEType]
PostPeriod JEPostPeriod
[Subcategory "JESubcategory"]
Description "JEDescription"
[Notes "JENotes"]
[Financial FinancialJE]
[Shared SharedJE]
Detail DetailType, DetailValue, DetailAreaSpec
where:
- AppID is the unique ID to assign to the calculated journal entry, enclosed in double quotation marks. Specify an alphanumeric character string up to 31 characters in length.
- JEType is an optional parameter for the type of calculated journal entry to create, and can be one of the following:
Value
Description
CURRENTPERIOD
To create a calculated journal entry that adjusts balances in the current period. This is the default value.
RESTATEMENT
To create a calculated journal entry that restates balances in the current period or a prior period. Restatement journal entries are used for changes in accounting rules.
PPA
To create a calculated journal entry that adjusts balances in a prior period.
FUTUREPERIOD
To create a calculated journal entry that adjusts balances in a future period.
- JEPostPeriod is the time period symbol for the posting period of the calculated journal entry. The valid values for this parameter depend on the value you specified for JEType:
Value
Description
If JEType is CURRENTPERIOD...
This parameter is optional. Specify the current period.
If you do not specify a value for this parameter, the time period symbol is set by the SGPCurrentPeriod system attribute. For more information, see the Longview Application Administrator Guide.
If JEType is RESTATEMENT...
This parameter is optional. Specify the current period or a time period symbol prior to the current period.
If you do not specify a value for this parameter, the time period symbol is set by the SGPCurrentPeriod system attribute. For more information, see the Longview Application Administrator Guide.
If JEType is PPA...
This parameter is mandatory. Specify a time period symbol prior to the current period.
If JEType is FUTUREPERIOD...
This parameter is mandatory. Specify a time period symbol after the current period.
- JESubcategory is an optional parameter for the subcategory to assign the calculated journal entry to, enclosed in double quotation marks. If you do not specify a value for this parameter, the calculated journal entry subcategory is set to Adjustment. For more information on subcategories, see the Longview Application Administrator Guide.
- JEDescription is a brief description of the calculated journal entry, enclosed in double quotation marks. Specify a description up to 100 characters in length.
- JENotes is an optional parameter that specifies any detailed notes for the calculated journal entry, enclosed in double quotation marks. Specify notes up to 1280 characters in length.
- FinancialJE is an optional parameter that specifies whether the calculated journal entry is financial or non-financial. Specify one of the following values:
Value
Description
TRUE
To create a financial calculated journal entry. Financial journal entries must be balanced (credit values must balance debit values). This is the default value.
FALSE
To create a non-financial calculated journal entry. Non-financial journal entries do not have to be balanced (credit values do not have to balance debit values).
- SharedJE is an optional parameter that specifies whether the calculated journal entry is shared or non-shared. Specify one of the following values:
Value
Description
TRUE
To create a shared calculated journal entry. Shared journal entries can be viewed, posted, unposted, and deleted by other users, depending on their authorization.
FALSE
To create a non-shared calculated journal entry. Non-shared journal entries can be viewed, posted, unposted, and deleted by only the user that created the journal entry.
If you do not specify a value for SharedJE, the value set for the SJEDefaultShared system attribute determines whether the calculated journal entry is shared. For more information, see the Longview Application Administrator Guide.
- DetailType is the type of detail line to create in the calculated journal entry. Specify one of the following values:
Value
Description
DEBIT
To create a detail line where the specified value is debited.
CREDIT
To create a detail line where the specified value is credited.
Note: One DetailType, DetailAreaSpec, and DetailValue must be specified for each detail line. If FinancialJE is set to TRUE, the calculated journal entry must have at least two lines of detail that balance.
- DetailValue is the adjustment amount for the detail line. Specify a numeric value. You can also define a numeric value for DetailValue using a numeric variable. For more information, see Create Variable and Set Variable.
- DetailAreaSpec is the data area specification for the detail line. Specify one symbol name for each dimension in your system (except for the time periods dimension, usually the dimension named TIMEPER), delimited by commas. The time period symbol for DetailAreaSpec is automatically set to the symbol as specified for JEPostPeriod. The data area specification for DetailAreaSpec is also dependent on the subcategory set for JESubcategory:
Value
Description
If JESubcategory is set to a subcategory that is associated with a schedule and allows reclassification...
The data area can contain either of the following:
- Base dimensions only or
- Base dimensions and the schedule dimensions from the schedule used by the specified subcategory.
If JESubcategory is set to a subcategory that is associated with a schedule and does not allow reclassification...
The data area must contain base dimensions and the schedule dimensions from the schedule used by the specified subcategory.
If JESubcategory is not set to a value, is set to Adjustment, or is set to a subcategory that is not associated with a schedule...
The data area can contain base dimensions only.
If your data area contains schedule dimensions, you can specify one symbol name for each extra dimension as set in the schedule definition. Symbol names for extra dimensions must be included after the symbol names for the base dimensions in your system. For more information on subcategories and schedules, see the Longview Application Administrator Guide.
ApplicationID CalcJE3
Type CURRENTPERIOD
PostPeriod P03YTD
Description "Calculated Journal Entry 3"
Notes "The third calculated journal entry"
Subcategory "Adjustment"
Financial TRUE
Shared FALSE
Detail CREDIT, 100, Cash, TORONTO, DIM3SET, DIM4SET, DIM5SET, DIM6SET, DIM7SET
Detail DEBIT, 100, AccountsReceivable, TORONTO, DIM3SET, DIM4SET, DIM5SET, DIM6SET, DIM7SET
Using calculated journal entry functions
In order to use any of the calculated journal entry functions, you must also create a CalculatedJESpec document. For more information, see Creating CalculatedJESpec documents.
In addition, the following functions are used in conjunction with calculated journal entry functions.
- Create Variable. For more information, see Create Variable.
- Set Variable. For more information, Set Variable.
JournalEntryCreate
Use this function to create a calculated journal entry.
Users can utilize the journal entry system to record adjustments to the consolidation process. Some journal entries are required once only; others are required every month. A calculated journal entry (JE) is a recurring journal entry that you can prepare to run every month.
Creating a calculated journal entry with the JournalEntryCreate function includes the following steps:
- Create a CalculatedJESpec document. For more information, see Creating CalculatedJESpec documents.
- Enter the JournalEntryCreate function. For more information, see Syntax.
Note: To create a calculated journal entry, you must have the applicable authorization. For more information on journal entries authorization, see the Longview Application Administrator Guide.
After you have created the CalculatedJESpec document, you can use the JournalEntryCreate function to create the calculated journal entry.
The JournalEntryCreate function returns the following values:
Value | Description |
---|---|
-1 | An error occurred, and the calculated journal entry was not created successfully. Note: For more details about an error, you can view the LVS_ERRORCODE and LVS_ERRORMESSAGE system variables. For more information, see Working with system variables. |
0 | The calculated journal entry was created successfully. |
where:
- VariableName is a variable of type NUM as created by the Create Variable command. For more information, see Create Variable.
- CalculatedJESpec is the name of the text file that contains the CalculatedJESpec document, enclosed in double quotation marks. For more information, see Creating CalculatedJESpec documents.
JournalEntryDelete
Use this function to delete a calculated journal entry.
Users can utilize the journal entry system to record adjustments to the consolidation process. Some journal entries are required once only; others are required every month. A calculated journal entry (JE) is a recurring journal entry that you can prepare to run every month.
Note: A calculated journal entry that is temporarily posted must be unposted before it can be deleted. For more information see JournalEntryUnPost. Permanently posted journal entries cannot be deleted.
where:
- VariableName is a variable of type NUM as created by the Create Variable command. For more information, see Create Variable.
- CalculatedJESpec is the name of the text file that contains the CalculatedJESpec document, enclosed in double quotation marks. For more information, see Creating CalculatedJESpec documents.
Note: If SharedJE is set to FALSE in the CalculatedJESpec file, the calculated journal entry can be deleted by the user that created it only.
Syntax example
CREATE VARIABLE SuccessVar AS NUM
SET VARIABLE SuccessVar = JournalEntryDelete("CalcJESpec.lvcje")
See also
Syntax example
CREATE VARIABLE SuccessVar AS NUM
SET VARIABLE SuccessVar = JournalEntryCreate("CalcJESpec.lvcje")
See also
JournalEntryPost
Use this function to post a calculated journal entry.
Users can utilize the journal entry system to record adjustments to the consolidation process. Some journal entries are required once only; others are required every month. A calculated journal entry (JE) is a recurring journal entry that you can prepare to run every month.
In order to post a calculated journal entry, the following requirements must be met:
- The calculated journal entry (as specified in the CalculatedJESpec document) must be valid. For more information, see Creating CalculatedJESpec documents.
- You must have authorization to post journal entries. For more information on journal entries authorization, see the Longview Application Administrator Guide.
where:
- VariableName is a variable of type NUM as created by the Create Variable command. For more information, see Create Variable.
- CalculatedJESpec is the name of the text file that contains the CalculatedJESpec document, enclosed in double quotation marks. For more information, see Creating CalculatedJESpec documents.
Note: If SharedJE is set to FALSE in the CalculatedJESpec file, the calculated journal entry can be posted by the user that created it only.
- PostingMethod can be one of the following:
Value Description TEMPORARY
To temporarily post the calculated journal entry. Temporarily posted journal entries can be unposted.
PERMANENT
To permanently post the calculated journal entry.
Caution: Permanently posted journal entries cannot be unposted.
Syntax example
CREATE VARIABLE SuccessVar AS NUM
SET VARIABLE SuccessVar = JournalEntryPost("CalcJESpec.lvcje", TEMPORARY)
See also
JournalEntryUnPost
Use this function to unpost a calculated journal entry. You can unpost a temporarily posted calculated journal entry if you want to delete it or modify it.
Users can utilize the journal entry system to record adjustments to the consolidation process. Some journal entries are required once only; others are required every month. A calculated journal entry (JE) is a recurring journal entry that you can prepare to run every month.
Note: Permanently posted calculated journal entries cannot be unposted.
where:
- VariableName is a variable of type NUM as created by the Create Variable command. For more information, see Create Variable.
- CalculatedJESpec is the name of the text file that contains the CalculatedJESpec document, enclosed in double quotation marks. For more information, see Creating CalculatedJESpec documents.
Note: If SharedJE is set to FALSE in the CalculatedJESpec file, the calculated journal entry can be unposted by the user that created it only.
Syntax example
CREATE VARIABLE SuccessVar AS NUM
SET VARIABLE SuccessVar = JournalEntryUnPost("CalcJESpec.lvcje")
See also