Structure Mapping
Usually, the outbound interface of the sender software component and the inbound interface of the receiver software component are not identical.
This means that you must define mapping procedures to assign fields that are semantically identical (structure mapping) and conversion rules to convert to the target format (value mapping).

A structure mapping defines how the fields of the inbound message have to be mapped to the fields of the outbound message that will be sent to the receiver system. The figure Structure Mapping shows the mapping between the structure of the Sender Outbound Interface and the Receiver Inbound Interface.
Value Mapping
Apart from assigning fields in the structure mapping, you often need to carry out conversions or calculations.
Examples of When to Carry Out Conversions
- If the source document has a date field in the format yyyymmdd but the target document expects the format dd.mm.yyyy, a conversion is required.
- If the material IDs in the source and target systems are not identical, the ID is converted using a conversion table.
Message Mapping
In Message Mapping, you realize the actual message mapping between two XML files. You build the mapping with the Graphical Mapping Editor. In the Mapping Editor, you select the source and the target structure to be mapped.
You can create a mapping program using the Enterprise Repository perspective in NWDS. Mapping programs that you create using this perspective are known as message mappings. You can reference message types, imported interfaces, or imported SAP interfaces, that is, Intermediate Document (IDoc) types or Remote Function Call (RFC) signatures as the source and target structures.
Graphical Mapping Editor
The Graphical Mapping Editor offers different standard tools and out-of-the-box functions to realize simple and complex mappings. You also have the choice to build your own Java based user-defined functions (UDFs).

Structure View of a Source or Target Structure

The source or target structure is shown as a tree. The icons indicate which fields are obligatory fields. The structure also shows the cardinality. The cardinality defines how often an element or node is permitted to occur.
Icons in the Mapping Editor

The figure shows the most important icons of the mapping editor and what they mean. Beneath the source and target structures, there is a window containing the expression editor. In the expression editor, you can display and edit the target field mapping for any target field.
If the elements of a particular node in the source structure have the same name as elements in the target structure, you can use the mass assignment option. To do so, drag the source node with the right mouse button and drop it to the target source node. Select Execute Default Matcher from the context menu. All lower-level fields with the same name are then assigned to each other.
Operation Mapping
Interface Options in Operation Mapping
OperationMapping_Image.png)
The operation mapping creates a connection between the outbound and inbound interfaces. In the operation mapping, you define which mapping program defines the mapping procedures from a particular outbound interface to a particular inbound interface.
In the operation mapping, you can usually reference a service interface of type Outbound, an Intermediate Document (IDoc) type, or a Remote Function Call (RFC) interface as the outbound interface. You can reference a service interface of type Inbound, an IDoc type, or an RFC interface as the inbound interface. You can save the mapping procedure by using a message mapping, an eXtensible Stylesheet Language (XSL) mapping, a Java class, an ABAP class, or an ABAP XSL transformation. You can reference the appropriate mapping program in the operation mapping.
Mapping Technologies Supported by SAP Process Integration (PI)
Message Mapping
This is a graphical tool in the ESR that enables you to define the structure and value mappings. A Java program is generated from the logical definition in this case.
Java Class
A Java program converts the mapping that you create manually.
XSL
You use XSL to convert the mapping.
Note
ABAP mappings and ABAP XSL are used to double-stack systems and cannot be used on a Java-only process integration installation such as Advanced Adapter Engine Extended (AEX).