Powered By

Free XML Skins for Blogger

Powered by Blogger

Thursday, July 10, 2008

Interface Mappings in SAP XI

Use

Interface mappings register your mapping program for an interface pair in the Integration Repository. If you require a mapping at runtime, it is sufficient to select the interface mapping for the interface pair at configuration time (see: Defining Interface Determinations). The Integration Server uses the interface mapping to identify associated mapping programs for request messages, response messages, fault messages, or all three.

See also: Overview.

Features

Executing Multiple Mapping Programs for One Direction

By using an interface mapping you can execute multiple mapping programs consecutively for the transformation of a request or response message. In such cases, an interface mapping comprises multiple steps for which the following applies:

The steps are executed in the sequence specified (from top to bottom). The result of the mapping program from the previous step is forwarded to the mapping program of the subsequent step.

Each step can reference a mapping program that executes a 1:1, 1:n, n:1, or an m:n transformation. In the case of multi-mappings (1:n, n:1, or m:n), the previous step must create the same number of messages that the subsequent step expects.

Multi-mappings use one envelope to put all messages in one structure. If one of the steps references a multi-mapping program, all subsequent steps must use the same envelope.

Example

The mapping for a request message comprises two message mapping programs: one 1:1 transformation and one 1:n transformation. Since the latter message mapping uses the multi-mapping envelope for both the target message and the source message, the message mapping for the 1:1 transformation must also create a transformation result with a multi-mapping envelope.

You do not strictly need to divide up one direction of the whole mapping into different steps. However, this enables all the message formats in one system landscape to be mapped to a central message format, for example. This results in less mapping programs being required because you no longer need to be able to map all the different message formats to each other.

Activities

...

1. Create your interface mapping on the design maintenance screen of the Integration Builder (see also: Creating an Object).

You can also create multiple interface mappings for the same interface pair.

2. Enter the source and target interfaces that require a mapping of the request message, the response message, the fault message, or all three, in the table of the same name. The following restrictions apply:

If you want to use the interface mapping in a Structure linktransformation step in an integration process, you must only specify abstract message interfaces. Furthermore, all objects (integration process, interface mapping, and all objects referenced by the interface mapping) must be in the same software component version. If you want to reference objects from underlying software component versions, you must access the objects from the Basis Objects branch (in the navigation tree or using an input help) (see also: Structure linkUnderlying Software Component Versions).

If you want to map multiple messages to each other by using a multi-mapping, you can only specify asynchronous interfaces (for further restrictions, see: Multi-Mappings). If any message interfaces are missing, you can also create them by using the functionCreate New Object (This graphic is explained in the accompanying text).

If the interface cannot be imported or cannot be created in the Integration Repository (in the case of an external adapter, for example), you must enter the interface names manually. However, it is not possible to check the technical name in this case.

3. To import the properties of the interfaces, choose Read Interfaces. The table in the lower area displays tab pages for the request message, response message, and if available, for the fault message, for each mode of the interfaces (either synchronous or asynchronous).

4. To develop an external mapping program, export the XSD schema of the respective request or response message as a zip file after you have imported the interfaces. The zip file can contain multiple schema files that reference each other, for example in a multi-mapping. In this case, the schema with the global message element has the name MainSchema.

5. To reference a mapping program for the respective message, you have the following options:

Select an existing mapping program from the Integration Repository by using the input help (This graphic is explained in the accompanying text). If this is a message mapping, the default setting of the input help only displays those message mappings that are found using the source and target message in the Integration Repository (in multi-mappings, the first source and target messages are used as the search criteria). However, you can also display any number of message mappings, for example, because you are constructing a mapping from several mapping programs with intermediate instances which have no message types.

You can create message mappings directly from the interface mapping. To do this, select the mapping type Message Mapping in the Type column. Position the cursor in the Name column and choose the function Create New Message Mapping (This graphic is explained in the accompanying text) in the Mapping Program frame. The Integration Builder copies the specifications of the messages and their occurrence directly from the interface mapping.

An interface mapping can only reference mapping programs that belong to the same or an underlying software component version of the interface mapping. This ensures that the mapping program can be shipped together with the interface mapping (see: Software Logistics).

6. If you are not using a mapping for a fault message, you can execute multiple mapping programs in succession for request and response messages:

To insert an additional line for a mapping program, choose This graphic is explained in the accompanying text.

To delete the registration for a mapping program, choose This graphic is explained in the accompanying text.

At runtime, the mapping programs are executed from top to bottom.

7. Save the interface mapping.

No comments:

Archives