Transformation-Rule: Pre-calculations tab

About Pre-calculations

Defining Pre-calculations

About Pre-calculations tab

Use the Pre-calculations tab toDefine Pre-calculations for use in the Transformation-Rule

About Pre-calculations

A Pre-calculation is a temporary data zone which contains the result of a calculation performed by evaluating a DML expression based on an Input-Event segment. All Pre-calculations are composed of a mapping expression and a comment.

You can use the result of the Pre-calculation in the mapping expressions of the Transformation-Rule where you created it. Use a Pre-calculation to:

  • avoid having to repeat defining the same expression when writing the Mapping Rules for the Output-Events generated by the given Transformation-Rule.
  • optimize the transformation during the execution session.
    Each time a dynamic decimal definition is found in a Business-Document, a pre-calculation is automatically generated. Consequently, an additional character is required in the input Business-Document structure to store the pre-calculation result.

AccountingIntegrator Enabler  Rule Engine:

  • assimilates the Pre-calculation as a supplementary field at the end of the Input-Event segment (provided that in so doing it does not exceed the maximum segment length of 4000 characters).
  • AccountingIntegrator Enabler  Rule Engine reinitializes the Pre-calculations each time it applies the Transformation-Rule to the a new Input-Event segment.

You can use the defined Pre-calculation as an expression in:

You can stipulate a condition to meet before AccountingIntegrator Enabler can run any of the Pre-calculations in a Transformation-Rule. To do this, set a Pre-calculation condition.


The Pre-calculation PCC1 contains the expression: $ACCTAB (ACCOUNT;"A00001"). This expression searches the ACCOUNT Table and extracts the entry for the A0001 Table key. Now, instead of having to rewrite this expression each time you need to work with the A0001 Table entry, you simply write: @PCC1 in the Mapping Rule expression.


Use DML functions to define a Pre-calculation. [FOR DETAILS Using DML Functions]

Defining Pre-calculations

The Pre-calculations tab comprises two panes illustrated schematically as follows:

Pre-calculation definition pane containing two sub-tabs:

Business-Document tree structure of the Input-Event segment that the Transformation-Rule is processing.

Pre-calculation properties sub-tab

where you set the general properties for the Pre-calculation and define the actual expression.

Pre-calculation condition sub-tab

where you set the test condition which must be fulfilled before AccountingIntegrator Enabler can execute the set of Pre-calculations defined on this tab.


You can define several Pre-calculations for one Transformation-Rule. A Pre-calculation definition is limited to the 4000 characters available in the Input-Event segment. If, for example the basic segment:

  • uses all the 4000 characters, you cannot:
    • Define any Pre-calculations.
    • Use any dynamic decimal fields.
  • uses 3000 characters, you can use the 1000 characters available to:
    • Define and map the Pre-calculations .
    • Use for the dynamic decimal fields that require an additional character.

The overall length is checked when the Transformation-Rule is controlled.

Setting Pre-calculation properties

Complete the following fields in the Pre-calculation tab.




Enter a name using a maximum of ten characters. Respect the naming conventions. The Pre-calculation must not have the same name as an existing Input-Event segment Business-Document.


Enter a free-text description of this pre-calculation (using a maximum of 255 characters).

Data type


From the drop-down list, select a data type for this Pre-calculation. Since the Pre-calculation is appended to the Input-Event segment, it is considered as a field. Therefore you must specify the data type for this field. [FOR DETAILS: Data Types]


When you select a data type from the data type drop-down list, AccountingIntegrator Enabler automatically displays its associated length in this field.

To change the default length, click in the Length field and enter a value that complies with the usage limits of the selected Data Type.

Mapping Rule


Enter the mapping expression that this Pre-calculation must evaluate. The system evaluates this expression when it starts processing an Input-Event segment and stores the result in the processed segment.
To define an expression:

  1. Drag-and-drop an input Business-Document from the right pane into the Mapping Rule field.
  2. Drag-and-drop the Table and  Variable objects you require for the expression from the Dictionary tab in the left pane.
  3. Enter the expression either:


Enter free-text comment information for the Pre-calculation.

Use the Pre-calculations toolbar to perform the following operations:


Add a new Pre-calculation. The new Pre-calculation is added below the others you have already defined.

Delete a Pre-calculation.

Use the Object Dependencies Browser to analyze dependencies for the selected Pre-calculation.

The Browser shows the objects that use the Pre-calculation and objects used by the Pre-calculation.

Setting a Pre-calculation condition

AccountingIntegrator Enabler evaluates the set of Pre-calculations that you define in this tab in the following circumstances:

  • To apply the given Transformation-Rule to an Input-Event segment
  • If the condition you set for the pre-calculations is true. If you do not set a condition, AccountingIntegrator Enabler  Rule Engine executes the Pre-calculation without running any test criteria beforehand.

Complete the following fields in the Pre-calculations condition tab:


Mapping Rule


Enter the mapping expression that must return true for AccountingIntegrator Enabler to evaluate all the Pre-calculations you defined for this Transformation-Rule.


In the Pre-calculation named PCC1, drag-and-drop the input Business-Document field ACCTYPE containing an account type indicator into the Mapping Rule field. Write the mapping expression: ACCTYPE="DEBIT".
This states that the Pre-calculation PCC1 is only run for debit accounts.

[FOR DETAILS Defining a mapping expression]


Enter free-text comment information for the Pre-calculation condition.

Back to top

Related Links