Show TOC

Procedure documentationCreating a Message Mapping Locate this document in the navigation structure

 

You use this procedure to map messages to each other if the receiver system accepts a different message format than that of the sender system.

For a given message mapping object, you define mappings between the source and target operations in the ES Repository.

Note Note

You can also define the corresponding mappings when the source or target operation is an IDoc, an RFC, or another interface connected by an adapter.

End of the note.

Prerequisites

Procedure

1. Define Basic Data
  1. In the context menu of software component version, namespace, or folder, choose   New   Message Mapping  .

  2. In the Create Message Mapping window, enter a name for the mapping object.

  3. Choose Browse to select the required namespace or folder.

  4. Choose Finish.

  5. Select an existing change list or choose New to create a new change list.

  6. Choose OK.

2. (Optional) Assign Documentation to Message Mapping
  1. If you want to add internal documentation, in the Documentation section, choose Edit Documentation link.

    Note Note

    • This field is not available if you have selected the Use External Documentation check box while defining the software component version.

    • In case, you have selected the Use External Documentation check box, you can view the external document by selecting View. This option is useful if documentation about the object exists in SAP Solution Composer.

    End of the note.
  2. In the Internal Documentation window, choose the Edit Documentation tab page.

  3. Enter the content.

  4. Choose OK.

    Note Note

    In case internal documentation is assigned to the object, you can view it in Web browser, by selecting View Documentation.

    End of the note.
3. Define Signatures
  1. To add source messages to this message mapping, in the Signature section, choose Browse to select the source software component version.

  2. In the Source Messages section, choose Add.

  3. In the Select Type window, select the required source message type, external definition, RFC or IDOC, or browse for XSD

  4. Choose OK.

  5. Select the required value in the table from the Occurrence dropdown list box.

  6. If you want to use the multi-mapping functionality, add more source messages, by repeating steps 3 through 5.

    For more information, see Multi-Mappings.

  7. To add the target messages to this message mapping, repeat the steps 1 through 6 in the Target Message section.

  8. If you want to add parameters, in the Parameters section, choose Add.

  9. Enter the required parameter details in the new row.

4. Define Mappings
  1. To map a source field to a target field, drag and drop a source field onto the target field, in the Definition tab page.

    Note Note

    Definition tab page displays the source and target structure. You assign, delete expressions for a target field using this tab.

    You can drag and drop multiple source fields into a target field, as a concatenation.

    End of the note.
  2. If you want to assign an expression for a target field, proceed as follows:

    1. Double-click the required target field.

    2. In the expression editor, enter the expression you want to assign to the target field.

      Note Note

      • The list of functions supported is available in the Functions tree. The functions available are called Standard Function. You can create your own user defined functions known as Local Functions.

      • An expression can be a string literal, a function with arguments, or an XPath expression. You can also define the Xpath by drag and drop of source node from the expression tree.

      End of the note.
    3. Select the required function using CRTL and space.

      Note Note

      You can also drag and drop the required function.

      End of the note.
    4. Enter the required input values using the following steps:

      1. If you want to enter a source field as an argument, drag and drop the source field from the Context tree.

        For example, add(<source field XPath 1>,<source field XPath 2>)

      2. If you want to enter a function as an argument, drag and drop the source field from the Functions tree.

        For example, add(abs(<source field XPath 1>), (<source field XPath 2>)).

      3. If you want to provide a string literal as a parameter, enter the required text within double quotes as described in the example below.

        For example, const("freeText”) or "freeText”.

      4. If you want to provide an integer or float value as a parameter, enter the required text as described in the example below.

        For example, const(1.234).

      5. If you want to assign a parameter that is defined in the Overview page, proceed as follows:

        1. Drag and drop the param (string name) function under   Functions   Adapter  .

        2. Enter the name of the predefined parameter as described in the example below.

          For example, const(param(“<name of predefined parameter>”)).

          Note Note

          You can also use CTRL and space within double quotes to view and select the available parameters of same type.

          End of the note.

      Note Note

      The above steps of assigning an expression and functions to a target node are at basic level, for more information, see Expression Editor.

      End of the note.
    5. Choose OK.

      Note Note

      • Mapping is not complete if any element or attribute of target node is not connected to respective elements or attributes of source node.

      • You can also duplicate the nodes in the target structure and assign expression to them. For more details see Duplicates subtree.

      End of the note.
  3. (Optional) If you want to add an existing mapping template to this message mapping, select the source and target node and then select the icon for Show suitable templates.

Result

The mapping is complete and ready for Testing when all the element or attributes of target node are connected to at least one element or attribute of source node .

More Information

To know more about mappings, see Mapping Messages to Each Other Using Mapping Objects.