Creating a Message Mapping 
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
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.
You are familiar with the basics of mapping.
For more information, see Mapping Messages to Each Other Using Mapping Objects.
You have opened the Enterprise Services Browser view in SAP NetWeaver Developer Studio.
In the context menu of software component version, namespace, or folder, choose .
In the Create Message Mapping window, enter a name for the mapping object.
Choose Browse to select the required namespace or folder.
Choose Finish.
Select an existing change list or choose New to create a new change list.
Choose OK.
If you want to add internal documentation, in the Documentation section, choose Edit Documentation link.
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.
In the Internal Documentation window, choose the Edit Documentation tab page.
Enter the content.
Choose OK.
Note
In case internal documentation is assigned to the object, you can view it in Web browser, by selecting View Documentation.
To add source messages to this message mapping, in the Signature section, choose Browse to select the source software component version.
In the Source Messages section, choose Add.
In the Select Type window, select the required source message type, external definition, RFC or IDOC, or browse for XSD
Choose OK.
Select the required value in the table from the Occurrence dropdown list box.
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.
To add the target messages to this message mapping, repeat the steps 1 through 6 in the Target Message section.
If you want to add parameters, in the Parameters section, choose Add.
Enter the required parameter details in the new row.
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
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.
If you want to assign an expression for a target field, proceed as follows:
Double-click the required target field.
In the expression editor, enter the expression you want to assign to the target field.
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.
Select the required function using CRTL and space.
Note
You can also drag and drop the required function.
Enter the required input values using the following steps:
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>)
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>)).
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”.
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).
If you want to assign a parameter that is defined in the Overview page, proceed as follows:
Drag and drop the param (string name) function under .
Enter the name of the predefined parameter as described in the example below.
For example, const(param(“<name of predefined parameter>”)).
Note
You can also use CTRL and space within double quotes to view and select the available parameters of same type.
Note
The above steps of assigning an expression and functions to a target node are at basic level, for more information, see Expression Editor.
Choose OK.
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.
(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.
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 .
To know more about mappings, see Mapping Messages to Each Other Using Mapping Objects.