Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

SAP CPI: Calculator IFLOW Demo

We will try to create Integration flow for Calculator function

Pallet Functions:

Message Mapping

Adapter:

HTTPS

Tools:

POSTMAN

Input:

<?xml version='1.0' encoding='UTF-8'?>
<root>

<row>

<num1>110</num1>

<num2>20</num2>

</row>

</root>

XSD:

Iflow:

HTTPS Adapter:
SAP CPI: Calculator IFLOW Demo

Message Mapping:

Select Message mapping from Pallet functions

Create new mapping

Provide name

MM_Calculator
SAP CPI: Calculator IFLOW Demo

New Mapping window will open

Add Source Message & Add Target Message : then select xsd from your computer
SAP CPI: Calculator IFLOW Demo

Once you selected XSD for both your structure will look like

Now let us do mapping

Select Source ‘root’ and target ‘root’ and click below to map all fields

It will map all sub fields as both structures are identical


SAP CPI: Calculator IFLOW Demo

Click on addition on target side

Select mapping on left side Arithmetic-add


SAP CPI: Calculator IFLOW Demo

Select add, it will show on mapping editor and select num1 & num2 from source side and try to map to
add function and connector to target field addition

Similar way add mapping for multiplication, subtraction, divide


SAP CPI: Calculator IFLOW Demo
SAP CPI: Calculator IFLOW Demo

Click OK and deploy the IFLOW

Test from POSTMAN with input above and see the results
SAP CPI: Calculator IFLOW Demo

Output Payload:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <row>
        <num1>110</num1>
        <num2>20</num2>
        <addition>130</addition>
        <subtraction>90</subtraction>
        <multiplication>2200</multiplication>
        <division>5.5</division>
    </row>
</root>

------------------------------------------------------Happy Learning---------------------------------------------------------------

You might also like