Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 

What is Message Mapping

SAP Cloud Platform Integration provides message mapping, where you can map fields between two messages  . Message mapping is one of the widely used message transformation steps in an integration flow.  Here’s how the message mapping step looks like in the WebUI:

Message mapping gives you an output payload corresponding to the mapping that is done and the input payload that is provided. If the developer needs to get the output payload from the mapping, then he has to deploy the existing integration flow and check the output. To perform an end-to-end validation of an iFlow, the only way is to deploy the iFlow and get the result. For that, the iFlow must be completely modeled.  Since mapping takes a long time, an instant test feature will make it easier for you to test the mapping.

Why Simulate in Message Mapping

As mentioned earlier, modeling an entire integration flow & deploying it to test mapping is a time consuming task. Mostly modelling the mapping consumes more time and message mapping cannot be tested alone. Therefore, there is a need to have a test environment which will give the instant result of the mapping.

Since mapping is a complicated step, it is good if the mapping is tested before the iFlow is deployed. If a mistake occurs in the mapping step of a big integration flow, the deployment will fail. The developer will be unsure of the reason for this failure & he has to check all the steps in the integration flow, which is very time consuming. Verification of the mapping step before iFlow deployment will completely negate the factor of the iFlow failing due to mapping step. By providing a Simulate option, we have reduced the possibility of an integration flow deployment failure due to mapping errors. The Simulate action will simulate the execution the mapping and gives developer the output payload instantly.

How to Use Simulate

Here's how the simulate page looks like in the WebUI:

If you are in edit mode in message mapping page, you will get to see the Simulate button on top of the mapping page. Simulation of mapping will create a virtual bundle, execute your mapping, and give back your output. On clicking the Upload Input button, you will be provided with the option to upload your input payload.

As shown in the above figure, the input table is at the left and the output table is at the right side. You can only upload XML payloads as input. Once the payload is uploaded, then it is populated in the input table. Now you can test the input payload against your mapping. Once you select the “Test” button, your mapping is simulated and you will get an output.

Once the execution is completed, the output table is populated with the test result. You have the option to download the output as well. You can repeat the same steps with different payloads also.

If you want to edit the input payload values, you need not upload the edited input file again. You can directly edit the input payload in the mapping simulator. You just need to click on the input values in the simulate dialog and enter your values there.

What are the Common Mistakes while Simulating Message Mapping

Here’s one of the commonly seen errors:

This error is thrown because the input payload has some missing entities while the target message expects a value.

By using the Simulate option, you can save a lot of time in by avoiding mapping errors. This would go a long way in helping you become more productive, especially if you are an extensive user of the mapping feature.