Start of Content Area

This graphic is explained in the accompanying text Example Message Mappings  Locate the document in its SAP Library structure

When you map structures to each other, there are generally particular standard cases that reoccur. To help developers and consultants implement these standard cases, SAP ships message mappings with test data in the software component version SAP Basis. You can find these examples in the namespace http://sap.com/xi/XI/System/Patterns.

General

To understand the example message mappings, you need to be familiar with how queues and contexts are processed. See also: Structure Mapping by Setting the Context, Processing an Input Queue and Advanced User-Defined Functions.

Message Types

The following message types are used in the examples:

·        MapExampleFlatStructureMessage
The structure of the message type is kept simple. Message instances of this message type consist of zero or more records of the element
Person:

This graphic is explained in the accompanying text

Since one person can have several telephone numbers, it is possible to use this structure in such a way that there are multiple records for the same person in the message and that they each contain the same ID and name, but different telephone numbers.

·        MapExampleNestedTablesMessage
The structure of this message type explicitly defines that one person can have several telephone numbers:

This graphic is explained in the accompanying text

The element TelephoneNumber can occur more than once within a person’s record, which means that a person does not have to have multiple records to allow for multiple telephone numbers.

·        MapExampleTwoTablesMessage
The structure of this message type uses two separate structures to organize information for people and telephone numbers:

This graphic is explained in the accompanying text

Telephone numbers can be assigned to a person with the same ID by using the PersonId element.

In the examples, we assume the following requirements are fulfilled:

·        A person has an ID that is a unique identifier. Depending on the message type, the value of this ID is stored either in the Id field or the PersonId field.

·        Every ID has one corresponding name. Names do not occur more than once.

·        A person can have several telephone numbers.

Overview

The message mapping MapExampleFilderRecordsByQualifier uses the same message type MapExampleFlatStructureMessage as both the source and target message type. For all other message mappings, you can determine which message type the source message type is and which message type the target message type is, from the technical name.

Example

The message mapping MapExampleFlatStructureToNestedTables references the following message types:
Source message type:
MapExampleFlatStructureMessage
Target message type: MapExampleNestedTablesMessage

Message Mapping

Use

MapExampleFilterRecordsByQualifier

To filter individual records for persons simply. The example illustrates the use of the createIf function.

MapExampleFlatStructureToNestedTables

 

MapExampleNestedTablesToFlatStructure

To map a nested structure to a flat structure by means of the standard function useOneAsMany.

MapExampleTwoTablesToFlatStructure

To map two separate records within a structure to a flat structure by means of an advanced user-defined function.

MapExampleTwoTablesToNestedTables

To map two separate records within a structure to a nested structure by means of an advanced user-defined function.

 

 

 

 

 

End of Content Area