Mapping Objects in the ESR


After completing this lesson, you will be able to:

  • Map objects in the ESR

Creating Mapping Objects

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, 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).

Use either the Add button or search the structure in the tree of the ESR to select the source and target message type. Select the types by using the mouse and move them to the editor. Then you can define the structure mapping by selecting a field in the source structure and moving it to the corresponding field in the target structure. If you require conversions for fields in the target structure or need to assign constants, use the functions available in the expression editor in the lower part of the Enterprise Service Repository perspective.

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

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.


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).

Create a Message Mapping and an Operation Mapping

Business Scenario

You want to define a message mapping between two message types. The sender and receiver message types are already available and your task is to complete the message mapping between these two outbound and inbound message types.

In an integration scenario, the sender outbound interface, and the receiver inbound interface do not have the same structure. A mapping program is used to map the source document to the target document. You want to understand how the objects concerned are configured.

Additionally, you will create an operation mapping OM_BIT100_## in namespace Use your message mapping to connect the sender interface SI_Material_outb in software component SC_BIT100_##_A to the receiver interface SI_Materials_inb in software component SC_BIT100_##_B.

Exercise Information


In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

The exercises in this course were tested with Microsoft Internet Explorer. If you use any other browser, the behavior in some exercises might be different.

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.
We recommend running the simulations first.

Create a Message Mapping and an Operation Mapping - Part 1

Create a Message Mapping and an Operation Mapping - Part 2

Log in to track your progress & complete quizzes