This function is used to define automatic journal variables that can be used in the automatic journal line formulas.
The use of a variable in a formula can be useful whenever initializing a field in an entry line is complex and cannot be reduced to a simple expression. In that case, calling a variable will translate into a call to a sub-program that will evaluate the variable and allow the generator to initialize the content of the accounting line field.
Setup of the automatic journal variables
Each automatic journal variable is associated with a code that can be used in any automatic journal line.
Calling a variable in a formula will translate into a call to a sub-program defined in a processing where the names are to be set up in the dedicated fields.
Each variable :
For instance:
In certain automatic journal lines, it is necessary to know the VAT rate to be applied based on the tax code, the accounting date and the company. The 'VAT' variable has been added in standard to allow the evaluation of the tax rate and contains the following parameters:
Refer to documentation Implementation
Presentation
Setup principle in the formulas
Each variable can be used in the grid of the formulas associated with the entry line fields via the V_XXXXX syntax (XXXXX being the variable code). Entering a variable triggers a window where the user must indicate the value of each parameter required for the variable evaluation (parameter of 'Value' type). The value specified for each parameter must be of the correct type.
Note that the parameters transmitted during the call to the sub-program can be constants, variables or complex expressions that include in line variables.
The reference to a variable on an automatic journal line generates the call to the sub-program in question in the WMGAUYYYYY processing (YYYYY being the automatic journal code) using :
In addition, note that in the processings generated upon posting of the automatic journals, the main table is open under the [F:TB0]abbreviation instead of its own abbreviation. As for the line table, it is open under the [F:TB1] abbreviation. This does not impact the formulas entered or the parameter expressions passed to the automatic journal setup. The usual abbreviations of the main tables can still be used because the validation of the automatic journal automatically replaces the abbreviations in the expressions. However, if the processing called by the variable must call on fields of the main table or of the line table for the current record (if for example, the processing tests fields in these records that have not been passed as argument), the [TB0] and [TB1] abbreviations must be used in the processing.
Close
Fields
The following fields are present on this tab :
Header
| No help linked to this field. |
|   |
| No help linked to this field. |
Block number 2
Subprograms
|   |
|   |
Grid Parameters
|   |
| No help linked to this field. |
|   |
|   |
| No help linked to this field. |
Description
|   |
Close