Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Calculated journal entries

You can use Longview Designer to create, duplicate, modify, and delete calculated journal entry (CJE) events.

Calculated journal entry event template overview

You can use Calculated Journal Entry event templates to build event-based calculated journal entries. When creating a Calculated Journal Entry event through a Calculated Journal Entry event template, all procedures, models, data areas and data table definitions will be saved within a kar file on the Longview application server.

  • The name of the kar file created will have the same name as the name provided for the event itself. See Specifying properties.
  • The kar file will be placed in the Longview application server’s ‘Events’ folder. For example: Longview\DataServers\<LID>\applications\Events.
  • The kar file will contain the calling procedure named <EventName>\Event.lvpro; where <EventName> is the name provided for the event itself. See Specifying properties.
  • An event rule would need to be created to run the event. The event rule syntax would need to be set to run <EventName>\Event.lvpro.

Example:

KLX(EVNT_6000100,Actual_Open###,ENTITIES_ALL###,DATAVIEWS_Default,SCENARIOS_Actual###,CURRENCIES_Default)=RUNPROC("applications\Events\SampleEvent\Event.lvpro")

Calculated journal entry event template - process flow

When creating a calculated journal entry event, there are a few different areas to configure. The following describes the process flow of how the pieces work together and the order of operations of their execution. These areas will be discussed in more detail in Creating calculated journal entry events

Event entry point

The entry point for the calculated journal entry event is the Event procedure (<EventName>\Event.lvpro). This procedure is included in every calculated journal entry event and is not directly editable in Designer. The event procedure performs the following functions:

  1. Initializes Calculated Journal entry variables. See CJE global variables
  2. Determines if the calculated journal entry event is manually triggered or data trigger. If it is manually triggered, it will run the Manual Trigger Override commands. For more information, see "Specifying the manual trigger override".
  3. Proceeds to run the Main Procedure

Manual Trigger Override

Commands specified to run if the event is triggered manually.

For more information, see "Specifying the manual trigger override".

Main Procedure

The main procedure is executed once the manual trigger override commands are run. Default code is provided and described in detail in Specifying the main procedure.

The main procedure controls the flow of the calculated journal entry event. Within the main procedure, and at the point where you want to process the calculated journal entry, procedure “CJE\ProcessCJE.lvpro” should be called.

ProcessCJE Procedure

The CJE\ProcessCJE.lvpro performs two steps:

  1. Runs the Set Values procedure. This is procedure where the actual values for the calculated journal entry are set. For more information, see "Specifying the set values procedure"
  2. Determines whether the calculated journal entry requires posting and unposts, creates and posts the calculated journal entry as required.

Set Values Procedure

The Set Values Procedure is the procedure where the values for the calculated journal entry detail variables are set. Within the Set Values procedure, variable CJE_IsPostRequired should be set to 1 when posting is required and set to 0 when posting is not required.

For more information, see"Specifying the set values procedure".

Calculated JE Detail and Header

The settings (Specifying calculated journal entry settings) and Calculated JE Detail (Specifying calculated journal entry detail) are used to build the file used for posting. The Calculated JE Detail should contain the variables used for the values in the Set Values procedure.

Published:

Calculated journal entries

You can use Longview Designer to create, duplicate, modify, and delete calculated journal entry (CJE) events.

Calculated journal entry event template overview

You can use Calculated Journal Entry event templates to build event-based calculated journal entries. When creating a Calculated Journal Entry event through a Calculated Journal Entry event template, all procedures, models, data areas and data table definitions will be saved within a kar file on the Longview application server.

  • The name of the kar file created will have the same name as the name provided for the event itself. See Specifying properties.
  • The kar file will be placed in the Longview application server’s ‘Events’ folder. For example: Longview\DataServers\<LID>\applications\Events.
  • The kar file will contain the calling procedure named <EventName>\Event.lvpro; where <EventName> is the name provided for the event itself. See Specifying properties.
  • An event rule would need to be created to run the event. The event rule syntax would need to be set to run <EventName>\Event.lvpro.

Example:

KLX(EVNT_6000100,Actual_Open###,ENTITIES_ALL###,DATAVIEWS_Default,SCENARIOS_Actual###,CURRENCIES_Default)=RUNPROC("applications\Events\SampleEvent\Event.lvpro")

Calculated journal entry event template - process flow

When creating a calculated journal entry event, there are a few different areas to configure. The following describes the process flow of how the pieces work together and the order of operations of their execution. These areas will be discussed in more detail in Creating calculated journal entry events

Event entry point

The entry point for the calculated journal entry event is the Event procedure (<EventName>\Event.lvpro). This procedure is included in every calculated journal entry event and is not directly editable in Designer. The event procedure performs the following functions:

  1. Initializes Calculated Journal entry variables. See CJE global variables
  2. Determines if the calculated journal entry event is manually triggered or data trigger. If it is manually triggered, it will run the Manual Trigger Override commands. For more information, see "Specifying the manual trigger override".
  3. Proceeds to run the Main Procedure

Manual Trigger Override

Commands specified to run if the event is triggered manually.

For more information, see "Specifying the manual trigger override".

Main Procedure

The main procedure is executed once the manual trigger override commands are run. Default code is provided and described in detail in Specifying the main procedure.

The main procedure controls the flow of the calculated journal entry event. Within the main procedure, and at the point where you want to process the calculated journal entry, procedure “CJE\ProcessCJE.lvpro” should be called.

ProcessCJE Procedure

The CJE\ProcessCJE.lvpro performs two steps:

  1. Runs the Set Values procedure. This is procedure where the actual values for the calculated journal entry are set. For more information, see "Specifying the set values procedure"
  2. Determines whether the calculated journal entry requires posting and unposts, creates and posts the calculated journal entry as required.

Set Values Procedure

The Set Values Procedure is the procedure where the values for the calculated journal entry detail variables are set. Within the Set Values procedure, variable CJE_IsPostRequired should be set to 1 when posting is required and set to 0 when posting is not required.

For more information, see"Specifying the set values procedure".

Calculated JE Detail and Header

The settings (Specifying calculated journal entry settings) and Calculated JE Detail (Specifying calculated journal entry detail) are used to build the file used for posting. The Calculated JE Detail should contain the variables used for the values in the Set Values procedure.

For an optimal Community experience, Please view on Desktop