1:1 Mapping

If the source structure of a profile is defined, but the destination structure is still empty, you can transfer the source structure to the destination structure and thereby map each destination field to the corresponding (same) source field. This can be done with button 1:1 in phase 3. The resulting mapping is called a 1:1 mapping. It will rarely fully accomplish the task at hand but is often helpful during the development phase of a profile and can serve as the backbone of the mapping to be created.

In the destination structure, by default, neither fix values nor format templates are defined, nor are functions assigned. This has to be done manually if necessary. However, fix values can be specified in attribute Description of a source structure field with the prefix FIX:. Example: If the value FIX:33 is specified, the attribute fix value of the corresponding destination structure field contains the value 33 after the 1:1 mapping (the description will be completely copied).

The structure transfer with a 1:1 mapping can also be done in the opposite direction from the destination structure to the source structure. To do this, the source structure must be empty when the 1:1 button is clicked. In the resulting source structure, no match codes will be defined and may need to be added.

Mapping Assistant

Normally you use 1:1 mapping if one of the two structures is empty. If this is not the case, a pure 1:1 mapping cannot be performed. The mapping assistant will open in such a case.

The mapping assistant attempts to map nodes and fields of the two structures by similar names. It does not change the source structure or the destination structure. It can only set the Path attribute of destination nodes and map fields.

In order to determine the similarity of nodes or field names, an extensive set of rules that calculates probabilities is used. These rules depend on the document type of the two structures. There are specific rules for types XML, Fixed-length IDoc and XML IDoc. Please ensure the correct setting of the document type before using the mapping assistant.

images/download/attachments/36581942/Mapping_Assistent_EN-version-1-modificationdate-1566290040000-api-v2.png

(1) If the checkbox is set, the destination node attribute Path is set if it was not previously defined and a suitable node was found in the source structure.

(2) If the checkbox is set, fields of the destination structure that have not yet been mapped are mapped to a source structure field if a suitable match has been found.

(3) Normally, the similarity comparison of fields is always done only in the context of the found or created Path assignment. If this checkbox is set, this context is ignored and the comparison will be done in the entire source structure. That can lead to unexpected results. This option is only available if option (2) is set.

(4) Only matches greater than or equal to the set threshold value are considered. See also section Matching below.

(5) Only source tree nodes and fields from and within the selected source tree node are considered. This may lead to unexpected results if the actual correct fields are excluded. Better use (6) instead.

(6) Only destination nodes and fields from and within the selected destination node are adjusted.

(7) Creates the mapping plan. The plan is a (long) text consisting of comments and commands, which is displayed in the text field (8). If necessary, commands can still be edited, deleted or added. A comment starts with #, an already existing mapping or an existing path starts with =Map or =Path and a command to create a mapping or path starts with +Map or +Path.

(8) Here the requested mapping plan is displayed and can be changed or extended if necessary.

(9) The mapping is carried out according to the plan (8).

Matching

It may be that although two field names are not identical, a 100% match is displayed. This is the consequence of the special rules that apply to IDocs in Fixed-length or XML format.

Matches below 100% can occur if the names have a deviation that is not ignored as a result of special rules. Such deviations may involve up to two characters at the end, which are present in one name, missing in the other, or up to one character deviation within the name. Example: The fields EXPRESS and EXPRSS are approximately 82% similar. If there is no matching field, the mapping between these fields is done as long as the threshold (4) is reached.

Setting Fiexed Values

If the destination structure corresponds to the document type XML IDoc, two further comment lines are inserted after the first three comment lines.

#+Fixvalue: BEGIN((#|-)\d+)?_attr <- 1
#+Fixvalue: SEGMENT((#|-)\d+)?_attr <- 1

By deleting the # character at the beginning of the line, these lines can be activated if necessary. In doing so, all fields of the destination structure whose name corresponds to the regular expression, e.g. SEGMENT((#|-)\d+)?_attr and do not already have a fixed value, will get a fixed value (here 1). The default regular expressions specified for XML IDocs refer to all SEGMENT attributes and the BEGIN attribute. Note: The restriction (6) does not work here.