Enrichment-Rule: Mapping Rule tab

About the Mapping Rule tab

What the Mapping Rule tab shows

Completing the Mapping Rule tab

About the Mapping Rule tab

In the Mapping Rule tab, Composer displays, for each generation condition and input Business-Document field, the Mapping Rule inherited from the parent object you selected on the General tab. If you have not selected a parent object, Composer displays the Mapping Rule 0 for those input Business-Document fields with Integer data classes.

Color-coded Mapping Rules

Composer color-codes the mapping expression, depending on the type of mapping you specify in the Mapping Rule tab. The following table summarizes the meaning of each color:

Mapping Rule appears in ... Meaning

Black

The mapping belongs to the current object, it is not inherited. The Mapping-Rule is modifiable

Red

Non-modifiable Mapping Rule

The mapping is inherited from a Mapping-Template

Green

Modifiable Mapping Rule

The mapping is inherited from a Mapping-Template

Overwriting inherited mappings

You can modify inherited Mapping Rules or the inherited default value of an Integer field. Composer considers these modifications as overwrites of the previous values and therefore displays the overwrite in black in the Mapping Rule tab.

If you delete the overwrite, Composer once again displays the original inherited Mapping Rule or default value of the input Business-Document Integer field.

Leaving inherited mappings unchanged

Mappings are optional. The following table explains what to do if you do not want to make any modifications to a given input Business-Document field:

Input Business-Document field type Action required

Integer fields where the default value 0 is still specified.

You must specify at least one blank space to replace the 0. The blank space signifies to AccountingIntegrator Enabler when you broadcast all the expression modifications not to modify the given field.

To simplify the process of replacing zeroes with blank spaces, use the automatic map option in the Expression contextual menu.

All other fields

Leave the Expression field adjacent to it empty

Creating Mapping Rules

To create or modify a Mapping Rule for a field or Input-Event generation condition, use the DML provided with AccountingIntegrator Enabler to create mapping expressions. The DML expressions you write can manipulate the following:

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

Composer provides the DML 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.

Once AccountingIntegrator Enabler has checked 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.

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

input Business-Document

input Business-Document

Tree structure of input Business-Document

Tree structure of input Business-Document

Expression

Comment

 

AccountingIntegrator Enabler displays the input Business-Document on both the left and right hand panes because in the Enrichment-Rule the source of the enrichment is the same as the object enriched. This is distinct from the Transformation-Rule where the source is an input segment and the transformed object in an output segment.

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 left hand input Business-Document pane. This icon acts a toggle, that is, it remains active until you re-click it.

Delete the expressions for the selected nodes. AccountingIntegrator Enabler automatically reinitializes the field mappings with the inherited mapping or the default value associated with the data class of each field.

Select all visible nodes, including the generation condition of the Output-Event Business-Document. AccountingIntegrator Enabler does not included sub-nodes in collapsed branches of the Business-Document structure. You can then perform either of the following actions on the selected nodes:

  • Click
  • Click

Unselect all previously selected nodes

Display the input Business-Document fields in the order based on their position and level of redefinition.

Display the input Business-Document fields in the nominal order in which AccountingIntegrator Enabler will execute them. This is in ascending alphabetic order.

However, in other operating systems such as AS/400 and OS/390 the underline character (_) has a different significance than in Windows. Therefore in non-Windows environments the alphanumeric order displayed in Composer will differ to the execution order in AccountingIntegrator Enabler.

Automatically map the selected field. AccountingIntegrator Enabler automatically performs the following actions:

  • in Integer fields:Replaces mappings containing 0 with mappings containing blank spaces.
  • in String and Date fields: Deletes all mapping expressions.

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

Create a Mapping-Template based on the selected input Business-Document mapping.

How to use the left hand input Business-Document pane

The left hand input Business-Document pane is divided into three panels:

  • The left panel displays the tree structure of the input Business-Document.
  • The middle panel displays the Expression column in which you define, modify, and view the mapping expressions that correspond to the nodes in the input tree structure that you want to modify.
  • The right panel displays the Comment column in which you define, modify, and view a description of what the Expression field contains.

How to use the right hand input Business-Document pane

The right hand 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.


Completing the Mapping Rule tab

Field

Contents

Generation Condition

Use this field to define a condition that will be used as a test to determine whether or not to execute the mapping conditions defined for the other nodes.

  1. Select the criteria to evaluate from one of the following:
  • an input Business-Document segment. Drag-and-drop the field to evaluate to the Condition field.
    If the segment contains numeric fields with a variable number of decimal digits, a pre-calculation is automatically generated for each field. Therefore the length available for the Enrichment-Rule definition decreases. The overall length is checked when the Enrichment-Rule is controlled.
  • a Pre-Calculation
  • the result of a lookup in a Table
  • a Variable
  • the result of an exit call
  • any combination of the above criteria using DML
  1. You can enter this manually or via the DML Object Browser.

If the condition returns the value True, the other expressions defined on this tab are executed.

[FOR DETAILS: DML Functions]

Expression

If you specify a Mapping Template on the General tab, the software 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 Expression fields either manually or via the DML Object Browser. To overwrite Expression fields:

  • manually, click  to display the expanded Expression field.

    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.
  • using the DML Object Browser, click to display the Composer Table, Variable and Language function elements that you can use to define your expression.

[FOR DETAILS: DML: Start hereandUsing the DML Object Browser]

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

Comment

Optionally, enter a free-text comment. Comments make it easier for 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 output Business-Document structure.
  2. Position the cursor in the Expression field behind 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 close 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