In this post, we will explore “SAP Cloud Platform Integration (CPI) Part 9 – Palette functions 3“ and learn about the standard range capabilities provided for calling external systems and invoking the local integration process.
Outline of this blog series: SAP Cloud Platform Integration (CPI) Part 9 – Palette functions 3
- SAP CPI Introduction
- SAP BTP tools and features overview (BTP, Global Account, Sub-Account, Entitlements, Connectivity, Security)
- SAP CPI Web IDE overview
- Registering a trial account and enrolling to SAP CPI service
- Deep dive into Cloud Integration features with real world scenario example
- Use cases of palette functions
- Adapter configurations
- Using Cloud connector for connecting to backend SAP systems
- Overview on API Management & Open Connectors
- Integration using Open Connectors with real world example
In short, below is the content we will elaborate in this tutorial:
- External Call:
a. Content Enricher
b. Request Reply
c. Send - Local Call:
a. Idempotent Process Call
b. Looping Process Call
c. Process Call
Today, we will explore standard SAP offered SAP Cloud Platform Integration (CPI) Part 9 – Palette functions 3. In the previous posts, we covered message transformers. Before moving to the Planning section, we will see how to call external/backend systems from the main/local integration process and also how to invoke the local integration process from the primary integration process.
1. External Call
Range capabilities in Outer Call is utilized for speaking with outside/backend frameworks through any connector like ODATA,HTTP and so on… There are various kinds of outside calls given by CPI:– Content Enricher
– Poll Enrich
– Request Reply
– Send
Here, we will be generally zeroing in on the 3 range capabilities: Content Enricher, Solicitation Answer and Send.
a. Content Enricher:
Content enricher permits us to link the approaching payload with the reaction payload of the beneficiary framework, as OData programming interface reaction. This component empowers you to settle on outside decisions over the span of a combination cycle to acquire extra information.
Content enricher alone won’t work. It should be associated with the collector framework, as displayed underneath. Ordinarily, the bolt must be associated from demand answer range to the collector framework, yet in satisfied enricher the bolt association will be from recipient framework to content enricher.
There are two aggregation algorithms in the properties section:
COMBINE:
Join calculation has no extraordinary way of behaving. It simply connects the approaching payload with the reaction of the recipient framework.
Source Payload:
<module>
<module_shortname>CPI</module_shortname>
<module_fullname>Cloud Platform Integration</module_fullname>
</module>
OData API Response:
<Customers>
<Customer>
<CompanyName>Alfreds Futterkiste</CompanyName>
<Address>Obere Str. 57</Address>
<Region/>
<PostalCode>12209</PostalCode>
<CustomerID>ALFKI</CustomerID>
<City>Berlin</City>
<ContactName>Maria Anders</ContactName>
<ContactTitle>Sales Representative</ContactTitle>
</Customer>
<Customers>
Content Enricher Output:
<?xml version='1.0' encoding='UTF-8'?>
<multimap:Messages xmlns:multimap="http://sap.com/xi/XI/SplitAndMerge">
<multimap:Message1>
<module>
<module_shortname>CPI</module_shortname>
<module_fullname>Cloud Platform Integration</module_fullname>
</module>
</multimap:Message1>
<multimap:Message2>
<Customers>
<Customer>
<CompanyName>Alfreds Futterkiste</CompanyName>
<Address>Obere Str. 57</Address>
<Region/>
<PostalCode>12209</PostalCode>
<CustomerID>ALFKI</CustomerID>
<City>Berlin</City>
<ContactName>Maria Anders</ContactName>
<ContactTitle>Sales Representative</ContactTitle>
</Customer>
</Customer>
</multimap:Message2>
</multimap:Messages>
ENRICH:
Improve Calculation permits us to join the two payloads in light of the critical components in the XML changing the two separate messages over completely to a solitary upgraded payload. You need to give 4 boundaries to advance calculation – unique (approaching payload to content enricher) and query message (collector reaction associated with content enricher).
Source Payload:
<Orders>
<Order>
<ShipName>Chevalier</ShipName>
<ShippedDate>1996-07-16</ShippedDate>
<ShipCity>Reims</ShipCity>
<CustomerID>VINET</CustomerID>
<ProductID>11</ProductID>
<Freight>32.3800</Freight>
</Order>
<Order>
<ShipName>Spezialit</ShipName>
<ShippedDate>1996-07-10</ShippedDate>
<ShipCity>Münster</ShipCity>
<CustomerID>TOMSP</CustomerID>
<ProductID>42</ProductID>
<Freight>11.6100</Freight>
</Order>
</Orders>
Lookup Message Payload:
<Order_Details>
<Order_Detail>
<UnitPrice>14.0000</UnitPrice>
<Discount>0.0</Discount>
<Quantity>12</Quantity>
<ProductID>11</ProductID>
<OrderID>10248</OrderID>
</Order_Detail>
<Order_Detail>
<UnitPrice>9.8000</UnitPrice>
<Discount>0.0</Discount>
<Quantity>10</Quantity>
<ProductID>42</ProductID>
<OrderID>10248</OrderID>
</Order_Detail>
</Order_Details>
Note:
The key component’s worth ought to be same in both unique and the query message, with the goal that the connection would occur true to form.
Content Enricher Result:
Select Improve in the properties segment and notice the XPath of both the first and the query message. The root hub of the key component ought to be referenced in the first message and query message.
<Orders>
<Order>
<ShipName>Chevalier</ShipName>
<ShippedDate>1996-07-16</ShippedDate>
<ShipCity>Reims</ShipCity>
<CustomerID>VINET</CustomerID>
<ProductID>11</ProductID>
<Order_Detail>
<UnitPrice>14.0000</UnitPrice>
<Discount>0.0</Discount>
<Quantity>12</Quantity>
<ProductID>11</ProductID>
<OrderID>10248</OrderID>
</Order_Detail>
<Freight>32.3800</Freight>
</Order>
<Order>
<ShipName>Spezialit</ShipName>
<ShippedDate>1996-07-10</ShippedDate>
<ShipCity>Münster</ShipCity>
<CustomerID>TOMSP</CustomerID>
<ProductID>42</ProductID>
<Order_Detail>
<UnitPrice>9.8000</UnitPrice>
<Discount>0.0</Discount>
<Quantity>10</Quantity>
<ProductID>42</ProductID>
<OrderID>10248</OrderID>
</Order_Detail>
<Freight>11.6100</Freight>
</Order>
</Orders>
IFlow Developed:
Content Enricher has been talked about previously. OData beneficiary config:
Content modifier added close to satisfied enricher to set the substance type to xml.
Postman Testing:
b. Request Reply:
Dissimilar to content enricher, demand answer doesn’t link the approaching payload with the query message, rather the reaction is simply sent to the following range capability. The first/source message will at this point not be substantial after the solicitation answer step. Demand answer is simultaneous naturally.
Regardless, the approaching payload will get supplanted by the reaction created after the odata query step.
There will be a few cases (really many) where you need to utilize the source/approaching/payload which is before the solicitation answer step, all things considered, save the payload against a property in satisfied modifier and call it after the solicitation answer step.
Call it in another Content Modifier:
Save. Deploy. Test.
c. Send:
Send range capability can be utilized to design a help call to a recipient framework for situations and connectors where no answer is normal. Send range isn’t upheld by Odata connector, as odata connector is simultaneous in nature.
Viable connectors for Send range:
- AS2 adapter
- FTP adapter
- JMS adapter
- Mail adapter
- SOAP SAP RM adapter
- SFTP adapter
- XI adapter (Quality of Service „Exactly Once“)
Generally you will utilize Solicitation answer in the undertaking IFlows and at times happy enricher. Send isn’t utilized frequently yet it relies upon the business necessity.
2. Local Call
Neighborhood call ranges are utilized to impart inside the combination cycle window. It isn’t utilized for outside framework correspondence.
a. Process Call:
Process Call is used when there is a local integration process is in the IFlow. Assume, you have included local integration process and you have to call it in the main integration process. In this case, we can use the process call palette.
In the process call palette properties, select the local integration process (system will list out all the local integration processes available in that IFlow). This process call will run only once.
b. Looping Process Call:
To execute the nearby mix process on different occasions or in light of a condition, then, at that point, circling process call can be utilized.
To make sense of how a circling interaction call functions,
Consider, in the nearby combination process, you have a webservice which is utilized for getting the exchange information, yet you need to quit executing it on the off chance that you get the field<hasMoreTransactions>false</hasMoreTransactions>.
c. Idempotent Process Call:
Execute a cycle call move toward check in the event that an approaching message was at that point handled and skirt the handling of this message.
For e.g.: If you need to execute a request just a single time and it shouldn’t get handled after retrying. All things considered, utilizing Idempotent interaction call would work. The Idempotent Cycle Call distinguishes if a request or any which you give in the message ID field, has previously been effectively handled and stores the situation with the fruitful interaction in the idempotent vault. In the event that a copy is found, the message is set apart as copy. In the event that you have a collector framework (suppose an outsider framework) that can’t deal with copy messages appropriately, you can call the beneficiary framework from inside an Idempotent Cycle Call.
The request number can be put away in the past satisfied modifier – property tab.
That’s all there is to it on the Outer and Local call range functions. For more details, refer to “SAP Cloud Platform Integration (CPI) Part 9 – Palette functions 3“. Happy learning!
YOU MAY LIKE THIS
How to check your custom ABAP code for SAP BTP ABAP Environment
Is SAP ABAP a High Paying Job?