Output-Event: Mapping Rule tab

About the Mapping Rule tab

Color-coded Mapping Rules

Overwrites

Creating or modifying mappings

What the Mapping Rule tab shows

Mapping data

Transforming data

Completing the Mapping Rule tab

About the Mapping Rule tab

Use the Mapping-Rule tab to view or modify (if necessary), the Mapping Rules inherited from the parent template object you selected on the General tab

The Mapping Rule tab displays the Mapping Rules and generation condition inherited from the parent object you specified from the list of Mapping-Templates and Output-Event templates on the General tab. If you did not select a parent object, then Composer displays the mapping 0 in the Business-Document fields you designated as Integer, that is Numeric, Packed or Signed.

Composer color-codes each mapping expression depending on its type. The following table summarizes the meaning of the character colors used on the Mapping Rule tab.

 Color-coded Mapping Rules

Mapping Rule appears in... Meaning Modifiable

Black

The mapping belongs to the current object, it is not inherited

Yes

Red

The mapping is inherited from a Mapping-Template

No

Blue  

The mapping is inherited from an Output-Event template

Yes

Green

The mapping is inherited from a Mapping-Template

Yes

Overwrites

You can modify inherited mappings or default values of Integer fields. When you modify these inherited elements, Composer overwrites the previous value and displays the overwrite in black. If you delete an overwrite, Composer reapplies the inherited mapping or default value.

Setting special overwrites

Mappings are optional. If you do not want any processing carried out on a given Output-Event field or generation condition, and consequently do not need any of the Integer fields to inherit mappings or default values, you can set the either of the following overwrite expressions:

Overwrite expression Implication

Enter a blank character (a space)

AccountingIntegrator Enabler does not export the spaces in the input form file.

This is the recommended option.

Enter the string "" (two pairs of quotes) or " " (quote, space, quote)

AccountingIntegrator Enabler exports the string in the input form file.

The advantage of this solution is that it makes the list of mappings easier to read. However, it increases the processing load on AccountingIntegrator Enabler  Rule Engine.

Creating or modifying mappings

To create or modify an Output-Event Mapping Rule or generation condition, use the  Data Manipulation Language (DML) provided with AccountingIntegrator Enabler to construct mapping expressions. The DML expressions you write can manipulate any of the following elements:

  • DML Functions
  • Pre-calculations
  • Business-Fields
  • Tables
  • Variables

Composer provides theDML Object Browserto help you write the DML expressions. From the Browser you can view descriptions and templates of all the native DML functions and then drag-and-drop them into the mapping expressions.

After AccountingIntegrator Enabler verifies the expression, you can use the Expression contextual menu to access the properties of the DML functions, Business-Fields, Tables and Variables used in it.

[FOR DETAILS About Mapping]

What the Mapping Rule tab shows

The Mapping Rule tab includes an icon bar and two main panes: output Business-Document and input Business-Document, as schematically illustrated below:

Icon bar

output Business-Document showing:

The mapping Expressions and descriptive Comments for the:

input Business-Document showing:

  • The tree structure of the input Business-Document defined in the Transformation-Rule General tab. This defines the structure of the Input-Event segment to which Composer applies the Transformation-Rule.
  • Pre-calculations appended to this Input-Event segment in the Pre-calculations tab.

[FOR DETAILS: Mapping data and Transforming data]

How to use the icon bar

The following describes how to use the icons on the icon bar:

Click To

Adapt the size of the Expression and Comment fields for the selected node in the output Business-Document pane.

Delete the expressions for the selected nodes.

Select all nodes for automatic Mapping, to apply a single mapping to all fields.

Unselect all previously selected nodes.

Display the output Business-Document fields depending on how they were positioned in the Definition tabof the Business-Document object.

Display the output Business-Document fields depending on the execution sequence. This is equivalent to ascending alphanumeric order.

Perform an automatic mapping on the selected field.

This action creates a mapping expression for an Output-Event Business-Document field that is based on a field in the Input-Event Business-Document. The Output-Event  field and the Input-Event field must both have the same name.

If there is no correspondence between a selected Output-Event field and the Input-Event segment field, AccountingIntegrator Enabler does not create any mapping.

Create a Mapping-Template based on the mappings in the selected Output-Event.

How to use the output Business-Document pane

The output Business-Document pane is divided into three panels:

  • The left panel displays the tree structure of the output Business-Document and the generation condition label.
  • The middle panel displays the:
    • Expression column where you define, modify and view the mapping expressions that correspond to the output Business-Document fields.
    • Generation condition, which (if set) must be met before AccountingIntegrator Enabler can execute the Mapping Rules that you define in the middle panel.
  • The right panel displays the Comment column where you define, modify and view a description of what the Expression field contains.

How to use the input Business-Document pane

The input Business-Document pane displays the tree structure of the input Business-Document. To use nodes in this tree structure in a mapping expression, drag-and-drop them from this pane to the Expression field in the Business-Document Out pane.

Mapping data

On the Mapping Rule tab, you can define mapping expressions that instruct AccountingIntegrator Enabler to copy data in a selected input Business-Document field to an output Business-Document field. To define this type of mapping expression, you map the name of an input Business-Document field to an output Business-Document field. When the AccountingIntegrator Enabler executes the Mapping Rule, this name instructs the software to copy the data that is contained in the input node to the output node.

How to map data

To map a field from the input tree structure to the corresponding field in the output Business-Document, place the input Business-Document field in the Expression column adjacent to the output Business-Document field you want to copy it to. Use either of the following methods:

  • Drag-and-drop an input node

In the input Business-Document pane of the Mapping Rule tab, select a Leaf Element node.

Drag-and-drop this node to the appropriate row in the Expression column. Composer displays the name of the input node in the Expression column.

  • Manually enter the name of an input node

To copy (map) an input node to the output, enter the name of the input node in the appropriate row of the Expression column.

Transforming data

On the Mapping Rule tab, you can use the DML to define mapping expressions that will instruct the AccountingIntegrator Enabler  Rule Engine to transform the data from an input Business-Document field and then map it to an Output Business-Document field.

The following table summarizes when and how to transform the data in an output node via a mapping expression.

If Then Refer to

you want to transform the data in an output node

use the DML

Transforming data

the Data Class of the data that is returned by a mapping expression is not the same as the Class that was assigned to the output node

use a DML Function

Transforming the Data Classof data

Transforming data via a Mapping Rule

Via a mapping expression, you can transform the data that a mapping expression sends to an output node and introduce new data. To define this type of expression, use the DML (Data Manipulation Language).

Creating a Mapping Rule

You create a Mapping Rule by constructing an expression in the Expression column adjacent to either the Generation condition field or an output Business-Document field, depending on if you want to create a mapping in the generation condition or a field in the generated Output-Event.

  1. Select the elements to include in the expression. You can use any of the following:
  • input Business-Document segment
    Drag-and-drop the input Business-Document to use or evaluate (for a generation condition) from the right pane.
  • Pre-Calculation
    Drag-and-drop the Pre-calculation to use or evaluate (for a generation condition) from the right pane from the right pane.
  • Result of a lookup in a Table
    Use the DML Table functions.
  • Variable
    Drag-and drop the required Variable from the Dictionary tab
  • Result of an exit call
    Use the using the DML Functions in the DML Object Browser
  1. Enter the expression either:
  2. manually by typing in a DML expression [FOR DETAILS DML: Start here]
  3. using the DML Functions in the DML Object Browser

The following table summarizes how you can use the DML to write expressions that transform the data in an output node:

To
Use For example

perform mathematical operations on data

arithmetic operators

add the values in two input nodes

use a predefined DML Function delivered with the software

DML Functions

use the $SYSDATE function to retrieve the session execution date

define instructions that are executed based on the values contained in a node

DML Functions

make the value that an output node contains depend on the value of an input node

specify a value that enriches data

constants

in a set of purchase orders, prefix the order numbers with a value that identifies where the order was placed

use the values in a Table to enrich data

Tables( Table Functions and $ACCTAB and $ACCTABD)

multiply a node that contains the amount of a money transfer by the commission rate that is contained in a Table

use the values in a Table to check data

Tables( Table Functions and $CHECKTAB and $CHECKTABD)

check that a node value matches the value in a Table for a specified date

store and pass a value

Variables

use a counter for a looping operation

Transforming the Data Class of data

On the Definition tab of the Business-Document window, you assigned a Data Class to each node in both the input and output tree structures. The Data Class specifies what type of data a node can contain, a String or an Integer, for example. Sometimes the Data Class that is returned by a Mapping expression is not compatible with the Data Class of the corresponding output node. In this case, when you check the relevant Mapping expression, an error message is displayed in the Log pane.

The following table summarizes how AccountingIntegrator Enabler manages Data Classes in Mapping Rules:

If the Data Classes for input and output nodes are: Then:

the same

no special action is required

different but compatible

AccountingIntegrator Enabler implicitly converts the Data Class of the output data. To format the data, the software uses a default format. To modify this default format, use a Formatting Function.

different and incompatible

AccountingIntegrator Enabler cannot implicitly convert the Data Class of the output data. Use one of the Conversion Functions.

Completing the Mapping Rule tab

Field Contents

Generation Condition

Use this field to define the test criteria condition that must be fulfilled before AccountingIntegrator Enabler can execute the Output-Event.

If the condition returns the value True, Composer generates the Output-Event that you define on this tab.

To specify a generation condition, select the criteria to evaluate from any of the following and place them in the Expression column adjacent to the Generation condition field:

  • Input Business-Document
  • Pre-calculation
  • Result of a Table lookup
  • Variable
  • Result of an exit call

[FOR DETAILS Creating a Mapping Rule for a generation condition]

The generation condition can have a maximum of 1200 characters.

If you do not specify a condition, the software executes the expressions without running any test beforehand.

Note

From the Financial-Case General tabit is Exclusive. In addition the ToolTip shows the Priority and Number properties of the Output-Event.  , when you position the cursor over an Output-Event, the ToolTip displays the Generation condition and whether or not

Expression

If you specify a Mapping Template on the General tab, AccountingIntegrator Enabler  automatically completes Expression fields defined in the Template. The Mapping-Template fields are displayed in green.

Any Mapping-Template values that you overwrite are displayed in black.

You can overwrite the fields in the Expression column either:

  • manually

    Click to expand the Expression column, if required.

    Drag-and-drop the Variable or Table objects from the Dictionary view directly into the Expression field and type in the relevant DML functions and operators.

[FOR DETAILS Creating a Mapping Rule]

The Mapping Rule expression can have a maximum of 1200 characters.

If you specified a Generation condition, AccountingIntegrator Enabler only executes the Mapping Rules you define here if the generation condition is fulfilled.

Comment

Optionally, enter a free-text comment. Comments make it easier for other users to understand how to manipulate the field and its Mapping Rule.

The comment can also have a maximum of 9000 characters.

To associate a Mapping Rule with a field:

  1. Click the Mapping Rule tab to display all the fields in the order in which you set them.
  2. Position the cursor in the Expression field after the name of the field whose mapping you want to define.  
  3. Enter your Mapping Rule, which is displayed in black. You can enter the Mapping Rule manually or via the DML Object Browser.

You can right-click in the Expression or Comment fields to display the contextual menu to perform the following actions:

Action Description

Cut Ctrl-X

Removes the selected elements from the  Expression or Comment field and places them on the clipboard. You then use the Paste function to copy these elements where required.

Copy Ctrl-C

Removes the selected elements from the  Expression or Comment field and places them on the clipboard. You then use the Paste function to copy these elements where required.

Paste Ctrl-V

Copies the string of characters contained on the clipboard into the Expression or Comment field where your cursor is positioned.

Select all Ctrl-A

Selects and highlights the entire Expression or Comment  field.

Undo Ctrl-Z

Cancels the preceding sequence of actions performed on the Expression or Comment field.

Redo Ctrl-Shift-Z

Restores the preceding sequence of actions performed on the Expression or Comment field.

Go to line Ctrl-G

Opens a dialog box in which you specify the number of the line where you want to move.

Enter the line number and click OK. The cursor moves to the beginning of the specified line in the Expression or Comment field.

Full screen Ctrl-F2  

Displays the contents of the Expression or Comment field in full screen mode.

To return to normal display mode, click window button in the top right corner.

 

 

Find Ctrl-F

Opens a dialog box in which you specify the character string to search for.

Use the radio buttons to set in which direction to begin the search:

  • Up
  • Down

You can select the following check boxes to refine your search:

  • Match case
  • Whole word only

Find again F3

Restarts the search you defined in the Find option above.

 

 

Analyze Ctrl-N

This option applies to the Expression field only.

Runs a syntax check on the Mapping Rule you entered in the Expression field and displays the result in the Log pane.

Properties

Enables you to directly access the Properties window of the selected object, that is the DML Function, Business-Field, Variable or Table.

Back to top

Related Links