Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Participant
0 Kudos
Real vision is the ability to see the invisible.

- Jonathan Swift




IT system landscapes are majorly hybrid landscapes with on-premise and cloud systems with applications being SaaS or home grown applications. Integration of these systems and applications in hybrid landscape is key for organizations to run end to end business processes smoothly. Integration will provide the unified experience for users when navigating through the business processes. But most of the time integrations are like black box. In a way that integrations simply work but business have less visibility in to them. For example a question like "How many orders are received from customer A in september that need to be shipped to location A?". We can answer this question straightaway in ERP system by running order reports. Can we answer similar question from integration perspective as well? Integration systems (middlewares) has an advantage that all interface traffic goes through these systems. These systems know when a customer create an order even before the order is created in the backend ERP systems. Can we leverage this advantage and get insights in to business processes from an integration perspective? Turned out the answer is yes. One other case is if there is an issue with an integration, can we analyze the impact and transactions that got affected and recover from it quickly and gracefully. This blog discusses an approach. The foundation for this blog is my previous blog. Please go though below if you want to review the technical architecture behind this.





For the rest of the blog, I am going to discuss a solution for the above mentioned use cases for achieving message search using business data with SAP cloud platform integration (CPI). The idea is to store the business data attributes of payload as additional header data in the message processing log. This idea is already discussed in the community in some blogs and questions. Below are the references.


Sravya Talanki's Blog

Comprehensive SAP CPI Guide for Standards & Best Practices

Very good solution from Shivaram

Storing custom information on Message Processing Logs SAP CPI

and recent blog from Santhosh


This blog is enhancing the same concept for some of the above mentioned use cases. Let me briefly explain the scenario used below. It is a very simple i flow which accepts and returns a SOAP message. We give the order number as input and get the order details form backend (Northwind service is used as backend). I designed the i flow as simple as possible just for demo but it can be any complex scenario.


Sample input:



Sample output:

<ShipName>Rattlesnake Canyon Grocery</ShipName>
<ShipAddress>2817 Milton Dr.</ShipAddress>


Using a content modifier, store the business data attributes from payload in to message headers:


Next use a script like shown below to add message headers as custom header properties of message processing log. Custom header properties are additional properties we can store in message processing log of a message. This is a perfect place to store business data attributes.

import java.util.HashMap; def Message processData(Message message) {

def body = message.getBody(java.lang.String) as String;
def messageLog = messageLogFactory.getMessageLog(message);

if(messageLog != null){

def map = message.getHeaders();
def valueorderId = map.get("orderId");
def valuecustomerId = map.get("customerId");
def valueshipCountry = map.get("shipCountry");
def valueorderDate = map.get("orderDate");

messageLog.addCustomHeaderProperty("orderId", valueorderId);
messageLog.addCustomHeaderProperty("customerId", valuecustomerId);
messageLog.addCustomHeaderProperty("shipCountry", valueshipCountry);
messageLog.addCustomHeaderProperty("orderDate", valueorderDate);
return message;

Check the message processing logs and see if the business data attributes are getting saved as custom header properties.

When i mentioned flexible and agile architectures in my previous blog, such architecture should support building new applications or changes to existing applications easily. Leveraging the architecture described in previously, a search application is built to search the integration messages based on business data.


A search with out any business data attribute gives all integration messages with technical attributes as well as business data attributes like ship country, order id, order date, and customer id.



A refined search like orders of a particular customer gives messages of the selected customer's orders.




As integrations are becoming more an more diverse and complex in the current hybrid landscapes, deeper visibility in to integration processes provides the insights we need and help to answer several business process questions from integration perspective. Also in case of integration issues, it helps to analyze the impact quickly and gives the ability to recover fast. This blog shows one such scenario to see how we can gain such visibility in to integrations using different services of SAP cloud platform.


Please feel free to leave your comments. Your feedback is greatly appreciated.


Labels in this area