12

Content Enricher with Combine and Enrich Aggregation Algorithms in SAP CPI

 2 years ago
source link: https://blogs.sap.com/2021/05/28/content-enricher-with-combine-and-enrich-aggregation-algorithms-in-sap-cpi/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Technical Articles
Posted on May 28, 2021 2 minute read

Content Enricher with Combine and Enrich Aggregation Algorithms in SAP CPI

1 Like 62 Views 0 Comments

Introduction-

Content Enricher –

This document describes about the utilization of Content Enricher Element and also ODATA Receiver Adapter configuration. The content enricher adds the content of a payload with the original message in the course of an integration process. This converts the two separate messages into a single enhanced payload. This feature enables you to make external calls during an integration process to obtain additional data, if any.

Content Enricher is a Message Transformation pattern used to enrich the content with information from a third server. Content Enricher component implements the Content Enricher pattern in CPI.

Business Requirement :

  • The End application system is expecting the Supplier details along with Product details.
  • We are getting only Supplier details from Source application System.
  • CPI required to fetch, Identify the Product details based on Supplier ID from the ODATA Application resource.
  • CPI required to get all the Product details and sent to Product & Supplier details to End system.
  • Product details are required to add to the Original message of Supplier information.

Design of IFLOW –

Integration Flow –

Capture-1-1.jpg

Input Supplier Data

Capture-2-1.jpg

Use Enrich Aggregation Algorithm –

Capture-3-1.jpg

ODATA Receiver Adapter Configuration

Transport Protocol – HTTP

Message Protocol – OData V2

Connection Details-

We need to provide Address, Proxy Type and Authentication Parameters details which are Mandatory.

Capture-4-1.jpg

Processing

  • ODATA Receiver Adapter provides you a technical capability of usage of Multiple Operations.

Operations – Create, Merge, Update, Query, Read, Delete, Patch and Function Import.

  • Here in our case we need to get Product details based on Supplier ID.
  • All the Product related details will be used in Query.
  • Once the Query executes the result of Query execution data and all the details will be passed as an Input to Content Enricher.
  • The content enricher adds the content of a payload with the original message during an integration process.
  • The final output will be passed to N number of Receivers.

Capture-5-1.jpg

Capture-6-1.jpg

Message Logs –

Capture-7-1.jpg

Output Payload with Aggregation Algorithm ‘Enrich’

Capture-8-1.jpg

Output Payload with Aggregation Algorithm ‘Combine’

Capture-9-1.jpg

When you use Aggregation Algorithm Combine, You will get the all the details as per the query execution and when we use Enrich, The Product details are added to Original Supplier message based on Supplier ID.

Conclusion –

Hope this document will help to beginners to understand CPI concepts.

In this document we will come to know ODATA Receiver adapter configuration and also Enrich, Combine algorithms. Hope you enjoy reading this blog.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK