Example Message Mappings

Use

There are some standard cases that can occur again and again if you want to map structures to each other. To make it easier for developers and consultants to realize these standard cases, SAP delivers message mappings with test data about the software component version SAP Basis. You can find the examples in namespace http://sap.com/xi/XI/System/Patterns .

General

You should make yourself familiar with processing queues and contexts to make it easier to understand example message mapping.

For more information:

Structure Mappings by Setting the Context

Processing Entry Queues

Enhanced User-Defined Functions

Message types

The following message types are used in the examples:

  • Map Example FlatStructureMessage The structure of this message type is kept simple. Message instances of this message type consist of none or multiple records of the Person element.

    Since one person can have multiple telepehone numbers, it is possible when using this structure that there are multiple records in the message for one person where the ID and name are identical but where the telephone numbers are different.

  • Map Example NestedTablesMessage The structure of this message type explicitly takes into consideration that one person can have more than one telephone number:

    The TelephoneNumber element can occur more than one within a Person record so that it is not necessary to have multiple Person records for the same person in order to be able to transfer multiple telephone numbers for this person.

  • Map Example TwoTablesMessage The structure of this message type organizes information for people and their telephone numbers in two separate structures:

    The telephone numbers can be assigned using the PersonID element of a person with the same ID .

The examples assume the following prerequisites:

  • One person is identified uniquely by one ID. Depending on the message type, the value of this ID is either in the ID or PersonID field.

  • There is exactly one name for each ID. Names never occur more than once.

  • A person can have multiple telephone numbers.

Overview

The message mapping Map Example FilderRecordsByQualifier uses the same message type Map Example FlatStructureMessage as the source and target message type. For all other message mappings, you can tell from the technical name of the message mapping what message type the outbound message types and target message types are.

Message mapping

Use

MapExampleFilterRecordsByQualifier

Simple Filtering of Individual Person Records The example explains the use of the createIf function.

MapExampleFlatStructureToNestedTables

MapExampleNestedTablesToFlatStructure

Mapping a nested structure to a flat structure using the standard function useOneAsMany .

MapExampleTwoTablesToFlatStructure

Mapping two separate records in a structure to a flat structure using an enhanced user-defined function.

MapExampleTwoTablesToNestedTables

Mapping two separate records in a strcuture to a nested structure using an enhnaced user-defined function.