SAP Cloud Platform Integration (CPI) Part 10 – Palette functions 4 – Message Routing

In this post, SAP Cloud Platform Integration (CPI) Part 10 – Palette Functions 4,” we will explore the standard range functions provided for routing and splitting incoming/source messages.

Overview of this blog series:

1. SAP CPI Introduction
2. SAP BTP tools and features overview (BTP, Global Account, Sub-Account, Entitlements, Connectivity, Security)
3. SAP CPI Web IDE overview
4. Registering a trial account and enrolling to SAP CPI service
5. Deep dive into Cloud Integration features with real world scenario example
6. Use cases of palette functions
7. Adapter configurations
8. Using Cloud connector for connecting to backend SAP systems
9. Overview on API Management & Open Connectors
10. Integration using Open Connectors with real world example

In short, below is the content we will elaborate in this tutorial:

– Message Routing
– Aggregator
– Gather
– Join
– Multicast – Parallel and Sequential
– Router
– Splitter – EDI / General / IDOC / Iterating / ZIP

Today we will see about standard SAP offered range capabilities in CPI. In the past posts, we covered the Outer and nearby call range capabilities. Prior to moving to the Planning part, we will perceive how to call message steering capabilities.

1. Message Routing

Message steering comprise of numerous range capabilities where the essential job is to join the approaching message or split in view of a condition xpath or an articulation.

There are many routing palette functions:

a. Aggregator:

Aggregator capability is utilized to consolidate approaching lumps of messages in view of a condition articulation into a solitary message. Until the further message is gotten, prior messages will get put away in a datastore. It just backings XML.

For eg: We can consolidate item subtleties with comparative request number into a solitary message in view of a condition.

There are two sorts of Total Calculation accessible.

Combine : This will combine the incoming messages without any guarantee on the order of the messages.

Combine In Sequence : This will combine the incoming messages in exact order.

Properties:

Connection Articulation (XPath): XPath articulation that distinguishes the component in light of which the approaching message is related/joined.

Incoming Format: XML

Collection Calculation: Endlessly consolidate in arrangement.

Message succession articulation: Field in light of which the grouping of the not set in stone. The field ought to contain numbers, so that succession still up in the air.

Last Message Condition: Condition till when incoming messages must get aggregated/combined.

Data Store name: By default – Aggregator-1

1st trigger:
<Order_Details> 
         <orderNumber>16051</orderNumber> 
         <prodID>MAT-345</prodID>
         <custNo>326</custNo> 
         <custAddress>7th park street</custAddress> 
         <endOfList>No</endOfList>
</Order_Details>

2nd trigger:
<Order_Details> 
         <orderNumber>16052</orderNumber> 
         <prodID>MAT-345</prodID>
         <custNo>327</custNo> 
         <custAddress>8th park street</custAddress> 
         <endOfList>No</endOfList>
</Order_Details>

3rd trigger:
<Order_Details> 
         <orderNumber>16052</orderNumber> 
         <prodID>MAT-345</prodID>
         <custNo>327</custNo> 
         <custAddress>9th park street</custAddress> 
         <endOfList>Yes</endOfList>
</Order_Details>

Aggregator configuration in CPI:

1st trigger in postman:

2nd trigger in postman:

3rd trigger in postman:

Presently the endOfList is set to Indeed, and assuming you trigger with another payload, you will get an inner server blunder.

In the message information store, you will actually want to see the information store name and against it, there will be the rundown of messages set off against that information store name and the items will be converged into one and shipped off the recipient.

b. Gather and Join:

Here we will cover two range capabilities – Accumulate and Join.

Join – Used to combine different course into one course. It doesn’t have any config/properties.

Assemble – Used to link the messages of the multitude of courses.

For eg: In the event that we have set a switch/multicast step and have 2-3 courses like underneath, then, at that point, we need to initially JOIN to blend every one of the courses and to connect every one of the payloads into one single payload, we need to utilize Assemble.

It can consolidate XML of same arrangement/different configuration, plain instant messages or any arrangement.

As you can find in the above iflow, Join is utilized to consolidate numerous courses to one single course and the accumulate step is utilized to join every one of the payloads. Consolidate brings the messages from various courses, yet it doesn’t influence the substance of the messages.

Approaching arrangement and conglomeration calculation. I have given plain text in each of the 3 substance modifiers in the course step, so I have picked plain text and the conglomeration calculation as Link.

In the event that we are utilizing Splitter, we need to utilize just Accumulate capability and not join as there are no different courses.

c. Multicast:

Multicast permits us to course the approaching message to various courses like switch, yet NOT in light of condition. It contains two distinct multicast – Equal multicast and Successive multicast.
Parallel Multicast – Routes the incoming message to different branches but while the execution of the messages will be random. The parallel multicast will pass the incoming messages to all 3 branches simultaneously and whichever branch gets executed first will get passed to output.

Sequential Multicast – Branch order is important in this multicast. So, if the first branch gets failed then the other branches won’t get executed.

In the event that we need the branch request to be focused on, select the branch and snap on Drop UP or Drop DOWN button.

d. Router:

Switch is utilized to course the approaching message by means of various course founded on the condition (XPath or articulation). As displayed in the model underneath, there is compelling reason need to join the messages after course, it tends to be dealt with exclusively moreover.

In Switch there must be ONE default course, which will be executed when different courses condition isn’t fulfilled.

e. Splitter:

As the name signifies, splitter is utilized to divide the messages into little pieces of messages in view of the XPath gave. We have 7 sorts of splitters:

1. EDI Splitter
2. General Splitter
3. Iterating Splitter
4. IDOC Splitter
5. PKCS#7/CMS Splitter
6. Tar Splitter
7. Zip Splitter

We will see just the significant splitters – General and Repeating splitter.

General Splitter:

General splitter parts the approaching message into N number of individual messages, each message wrapped by parent component.

For eg:

Iterating Splitter:

Emphasizing splitter parts the approaching message into N number of individual messages, not at all like general splitter, there won’t be any envelope encircled.

That covers the routing range functions for now. In SAP Cloud Platform Integration (CPI) Part 10 – Palette functions 4, we will delve into the mapping functions. Stay tuned for the next post where we will explore these capabilities in detail.

Cheerful learning !!!!!

 

YOU MAY BE INTERESTED IN

Your Definitive Guide to Becoming a SAP ABAP Developer

SAP consulting services USA vs India companies: A Comparative Analysis

10 Real-World SAP ABAP Programming Examples (with Code!)

 

 

WhatsApp WhatsApp us