Friday, September 25, 2026

OData Adapter | Sender and Receiver

What is OData Adapter? 

An OData Adapter is an integration component that lets cloud platforms or enterprise systems connect to and communicate with OData APIs using the standardized Open Data Protocol.

Key Capabilities

CRUD Operations: Supports standard actions like Create, Read, Update, and Delete on exposed data entities.

Built-in Query Options: Simplifies data filtering, sorting, pagination, and selection using native parameters (like $filter, $select, $top, and $skip) without manual query writing.

Automatic Metadata Handling: Reads service metadata (EDMX files) to automatically discover entity sets, map structures, and convert payloads between formats like JSON, ATOM, and XML.

Authentication: Supports secure connections via Basic Authentication and OAuth 2.0.

Common Use Cases

Enterprise Integration: Widely used in platforms like SAP Cloud Integration (CPI) and Oracle Integration to link cloud apps with systems like SAP S/4HANA, SuccessFactors, or Ariba.Data Migration: Used to securely extract, transform, and load (ETL) structured entity data between disparate business systems.

Sender Adapter:

The OData Sender Adapter in SAP CPI (Cloud Platform Integration) allows you to expose your integration flows as OData services. This means external clients can call your CPI iFlow using OData protocol (REST + metadata), which is common in SAP UI5, Fiori, and other SAP apps.





Receiver Adapter:

In SAP Cloud Integration, receiver adapters are crucial for enabling communication with external systems. When integrating with an OData API, developers can choose to use either an OData (V2/V4) receiver adapter or an HTTP receiver adapter. While the OData adapter offers convenience by automating some tasks, it also comes with limitations that may necessitate the use of an HTTP adapter. In this blog, I will share my experiences regarding the advantages and limitations of the OData adapter in comparison to the HTTP adapter.

Advantages of the OData Receiver Adapter::

Automated X-CSRF-Token & Cookie Handling

One of the key advantages of the OData adapter is its automatic handling of the X-CSRF-Token and cookies, which is essential for making POST, PUT, and DELETE requests. When making a POST, PUT, or DELETE request using the HTTP receiver adapter without providing a valid token and cookie, you will likely encounter the error...: “HTTP operation failed invoking … with statusCode: 403” with the response body “CSRF token validation failed”. (Important to note is that - although this error seems to indicate a missing or invalid X-CSRF-Token - it may also be caused by missing or invalid cookies).



Configuration Details:


Sample URL:

https://services.odata.org/V2/(S(xjqjf2rkzrvecxualorv4hp))/OData/OData.svc


Here, specify Operation details like Query (GET), POST, Update ..etc based on your requirement.

And then select Resource Path and Query Details..as shown in above screenshot.

Page Size:

Maximum number of records that must be fetched in one page of results.

The value is set to Empty by default.

If no value is set, then Server-side pagination(__next link) is considered.

If a value is entered, Client-side pagination is considered with the value provided.

It’s recommended to leave the value Empty.

Process in Page:

By selecting Process in Pages, you enable the adapter to process messages in batches. The size of a message is defined by the value that you specify for the Page Size.

To use Process in Pages, you must use the adapter in a Local Integration Process that is invoked by a Looping Process Call step. In the Looping Process Call, provide the loop condition details that follow:

Select Expression Type as Non-XML

For Condition Expression, provide ${property.<receiver.name>.<channel.name>.hasMoreRecords} contains 'true'

For Maximum Number of Iterations, provide 999

This option isn’t enabled for Content Enricher.

Retry:

Select the check boxes based on your business case..


OData V4: (latest)
 

Allow Chunking - select it if required.



Now, test the iflow from Postman as shown below..


Status code is 200 OK, it means - Successfully you have received the response from SAP CPI.

Note:

The considerations for choosing between the HTTP and OData receiver adapters in SAP Cloud Integration depend on your integration scenario's specific requirements. The OData adapter simplifies integration with automated token handling and entity management, making it ideal for standard SAP services with XML payloads. However, for specific scenarios that require non-XML payloads or navigation paths, the HTTP adapter provides the necessary flexibility.

I hope this blog provides some insights into when and how to use the HTTP and OData adapters effectively. Please feel free to share any additional experiences or tips in the comments.


Thanks for reading. :-)

SAP Cloud Connector - Setup

What is SAP Cloud Connector.?

SAP Cloud Connector (SCC) is a lightweight software component that securely connects your on-premises systems to SAP BTP (Business Technology Platform) without exposing your internal systems directly to the internet.

Think of it as a secure tunnel between your company's internal network and SAP BTP.

For example, if SAP Integration Suite (Cloud Integration / CPI) needs to communicate with an on-premises SAP ECC system, the Cloud Connector enables that communication securely.



Key benefits:

  • Secure connectivity: Establishes an encrypted connection to SAP BTP.

  • No inbound firewall opening required: It establishes the connection from your internal network to SAP BTP.

  • Access control: Exposes only the internal systems and resources explicitly configured.

  • On-premises integration: Enables cloud applications to access permitted internal resources.

How the communication work..?

  1. The Cloud Connector is installed on a server inside the corporate network.

  2. The administrator connects it to the relevant SAP BTP subaccount.

  3. The administrator configures the backend system, virtual host, port and permitted resources.

  4. The CPI iFlow sends a request to the configured virtual address using the appropriate connectivity setup.

  5. The Cloud Connector forwards the request to the actual internal backend system.

  6. The response travels back through the secure connection.

Important: Cloud Connector does not automatically make every internal system accessible. The administrator must explicitly configure the allowed systems and resources.

How to download and install it?

Download the installer from tools.hana.ondemand.com. https://tools.hana.ondemand.com/#cloud 

Choose the OS-specific version (Windows MSI or Linux RPM).

Follow the basic installation steps, Cloud Connector runs as a local service.

After installation, access the UI using:

https://localhost:8443

UserName: Administrator

Pwd: manage

You can change the pwd after first login

How to configure it?

  • Connect SCC to SAP BTP Subaccount
  • Login to the UI.
  • Go to Cloud To On-Premises => Subaccount.
  • Enter your SAP BTP SubAccount ID, Region, and Authentication details.
  • Save and establish the connection.

If successful, the Subaccount will show the status as "Connected"


Add On-Premise Backend Systems

Now expose on-prem services to BTP:

  • Navigate to Cloud To On-Premise → Add System.
  • Choose the system type (ABAP, HTTP, RFC, etc.).
  • Provide host, port, and protocol details of the backend system.
  • Map virtual host/port to internal host/port.
  • Select resources (paths, RFC functions, services) you want to expose.


Assign Access Control
For each system:
  • Enable Access Control.
  • Specify the resources BTP apps are allowed to consume.
  • Set principal type (none, principal propagation, or basic auth).
Verify the Connection from SAP BTP
  • Go to your SAP BTP Cockpit → Connectivity → Cloud Connectors.
  • Verify status, system availability, and reachable endpoints.
Supported Protocols

To allow your cloud applications to access a certain on-premise system on the intranet, you must specify this system in the Cloud Connector. The procedure is specific to the protocol that you're using for communication. The following protocols are supported:

HTTP
RFC
LDAP
TCP

Now, provide the CPI - sub-account details and check the status..






Common Issues in Cloud Connector?


Sources: help.sap.com

Thanks for reading :-)

Event Mesh & Solace - Administration


Solace - Administration

Solace Administration, which includes configuring, operating, monitoring, and securing the Solace PubSub+ event broker platform.

Solace PubSub+ is an event broker used to distribute messages and events between applications, microservices, enterprise systems, and cloud platforms.

Typical administration responsibilities include:

  • Creating and configuring message VPNs (isolated messaging environments).
  • Managing queues, topics, and topic subscriptions.
  • Creating client usernames, profiles, and ACL (Access Control List) permissions.
  • Configuring message delivery, persistence, and replay-related capabilities.
  • Monitoring queue depth, message rates, connections, and broker health.
  • Troubleshooting authentication, authorization, connectivity, and message-delivery issues.
  • Managing high availability, disaster recovery, and broker upgrades.
Please refer below link for how to create Queue/Topic in Solace admin page and following CPI iflows:

What is SAP Event Mesh?
SAP Event Mesh is a messaging service on SAP Business Technology Platform (BTP) that allows applications to exchange messages asynchronously using queues and topics.

It is useful when integrating SAP and non-SAP applications, for example:
  • SAP S/4HANA publishes a business event.
  • SAP Event Mesh receives and routes the event.
  • SAP CPI (Cloud Integration) consumes the event.
  • CPI transforms the payload and calls a third-party API or another enterprise application.

Depending on the SAP service and event source, events can originate from S/4HANA, SAP applications, or custom applications.







Solace Administration vs. SAP Event Mesh



SAP Event Mesh with SAP CPI


SAP Integration Suite, Advanced Event Mesh



Choose standard Event Mesh when:

  • You primarily integrate S/4HANA with CPI and a few target systems.
  • Event volume and payload sizes fit the service limits.
  • You want to control infrastructure and licensing costs.
  • You don't need a distributed network of brokers.

Choose Advanced Event Mesh when:
  • Your organization needs a global event-driven architecture.
  • Applications span on-premises, multiple clouds and geographic regions.
  • You need advanced event discovery, governance, filtering, tracing or replay.
  • Your throughput, payload or retention needs exceed standard service limits.
Common production incidents you should be able to troubleshoot..



Daily, Weekly and Monthly duties::
Daily
Review critical alerts and failed integrations.
Check queue backlogs and message-processing delays.
Investigate access and connectivity incidents.

Weekly
Review queue and message-volume trends.
Check recurring failures and consumer performance.
Review upcoming certificate and credential expirations.

Monthly
Review service consumption, quotas and capacity forecasts.
Audit permissions and inactive credentials.
Review changes, DR readiness and operational documentation.

Note: I have added most of the day to day and monthly roles and responsibilities from BTP Admin perspective. 

Sources: help.sap.com

Thanks for reading :-)

Friday, July 25, 2025

Raise Fault Policy | API Management

What is Raise Fault Policy..?

The RaiseFault policy allows you to create custom messages in case of error conditions. This policy returns a FaultResponse to the requesting application if it encounters an error condition.

 A FaultResponse can consist of HTTP headers, query parameters, and a message payload. These elements can be populated using variables. This enables you to send customized FaultResponses that are specific to the error conditions.

During execution, the RaiseFault policy transfers the message flow to the default ErrorFlow, which in turn returns the designated FaultResponse to the requesting application.

When the message flow switches to the default ErrorFlow, no further policy processing occurs. All remaining processing steps are bypassed, and the FaultResponse is returned directly to the requesting app.

Example:

We will create a API Proxy and specify end-point URL and then try to access it from Postman by using username/password.

If login credentials are correct then we will get response from the end-point, else we will get custom error message from RaiseFault policy.

API Proxy Creation:


End Point URL: https://dummy.restapiexample.com/api/v1/employees

(replace it with your URL)

Save it and go to Policies

Keep Basic Authentication Policy and Raise Fault Policy as shown below..



For Basic Authentication Policy:

<BasicAuthentication async='true' continueOnError='false' enabled='true' xmlns='http://www.sap.com/apimgmt'>
	<Operation>Decode</Operation>
	<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
	<User ref='current.username'></User>
	<Password ref='current.password'></Password>
	<Source>request.header.Authorization</Source>
</BasicAuthentication>

For Raise Fault Policy:

<RaiseFault async="true" continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt">
    <FaultResponse>
        <Set>
            <Headers/>
            <Payload contentType="application/json">{"status" : "Error", "messege" : "401 Invalid User or Password", "Suggestion" : "Try with correct user name / password " } </Payload>
            <StatusCode>401</StatusCode>
            <ReasonPhrase>Unauthorized</ReasonPhrase>
        </Set>
    </FaultResponse>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>



Specify Condition String:
(current.username != "YOUR_USERNAME")  OR (current.password != "YOUR_PASSWORD")


Save it and deploy it.

Now test it from Postman..with Correct login credentials


With incorrect logins


Based on your requirement, you can customize RaiseFault Policy.

That's it.

Source: SAP Community

Thanks for reading :-)

Wednesday, July 2, 2025

Solace(EventMesh Replica) Setup

In this blog, I am going to explain how to setup Solace (EventMesh Replica) environment and establish connectivity with CPI and small Pub/Sub case study.

First, setup a Solace account with your mail account.

https://console.solace.cloud/login

Upon successful logged in, 

Click on Cluster Manager and create a service ..(it's a self-explanatory process).

Click on service-name..


Go to Manage, where you can see Clients, Queues..etc

Click on Queues, where you can create queues and manage it.


Click on edit to change the settings..


Click on Queue and then create a Topic if you want it.

Connection details, which should be used to connect from CPI


Now, create a small iFlow ..

Specify, connection parameters for AdvancedEventMesh connector.



Now, save and deploy the iFlow.

Upon execution, you can see the payload/messages in queue(Solace)


That's all for Publishing part.

                                                                           *********

Now, build a Subscription iFlow.


Specify connection parameters as created in Publishing side...


You need to deploy the iFlow and test it.

Thanks for reading :-)

Tuesday, July 1, 2025

Value - Mapping

In this blog, I am going to explain what is value-mapping, importance and how to implement it.?

Value Mapping in SAP CPI is a critical feature that enables seamless and consistent data transformation between disparate systems in an integration landscape.

  • In integration scenarios, you frequently encounter scenarios where a "country code" might be "US" in one system (source), "USA" in another (target).
  • Similarly, "material type" could be "ROH" in SAP ERP and "Raw Material" in a manufacturing execution system. 

Without a centralized mapping, data becomes inconsistent, leading to errors, incorrect reporting, and operational inefficiencies.

Various features of Value-Mapping:

  • Centralized Management and Governance: Value Mappings are stored as separate artifacts within integration packages, providing a structured way to manage and govern conversion rules. This centralization aids in documentation, auditing, and ensuring adherence to enterprise-wide data standards.
  • Improved Maintainability and Agility: Value Mappings allow for dynamic updates without necessarily changing the iFlow's core logic. Business users or functional consultants (with appropriate access) can often manage these mappings directly in the CPI tenant, empowering them to react quickly to changes without requiring full developer involvement for every minor adjustment.
  • Enhanced Reusability: Value Mappings are reusable artifacts. Once defined, they can be used across any message mapping within the same integration package, promoting consistency and reducing development effort. If a value changes (e.g., a new country code is introduced), you only need to update the Value Mapping artifact once, and all dependent iFlows automatically inherit the change upon deployment.
  • Bidirectional Mapping: Value Mapping in CPI supports bidirectional lookups.  This means you can not only map from a source value to a target value but also, if needed, reverse the lookup from the target value back to its original source value, which can be useful in certain integration scenarios or for reconciliation purposes.
First, create Value-Mapping 
Under Package<sample> > Artifacts >Add>Value Mapping



Then, save and deploy it.

Create a simple iflow ...





Under Message Mapping, specify source meta data and target meta data, here I used same meta data.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="emprecords">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="emprecord">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="empid" type="xs:unsignedShort" />
              <xs:element name="emplname" type="xs:string" />
  <xs:element name="empfname" type="xs:string" />
              <xs:element name="empage" type="xs:unsignedByte" />
              <xs:element name="emporigin" type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>



Select conversion>value mapping and specify SourceAgency/Target Agency and it's identifiers


On Failure is essential when there is no incoming field is available. 
Where you can select ...below options based on your required.
  • Use Key,
  • Use Default value
  • Throw exception

Now, test the iflow with below given input and you will get given output.

Input Data/Payload:

<?xml version="1.0"?>
<emprecords>
    <emprecord>
        <empid>4001</empid>
        <emplname>Paul</emplname>
        <empfname>David</empfname>
        <empage>20</empage>
        <emporigin>INDIA</emporigin>
    </emprecord>
    <emprecord>
        <empid>4002</empid>
        <emplname>PP</emplname>
        <empfname>Ramesh</empfname>
        <empage>20</empage>
        <emporigin>Germany</emporigin>
    </emprecord>
    <emprecord>
        <empid>4003</empid>
        <emplname>DD</emplname>
        <empfname>Kiran</empfname>
        <empage>20</empage>
        <emporigin>United States</emporigin>
    </emprecord>
    <emprecord>
        <empid>4004</empid>
        <emplname>DD</emplname>
        <empfname>Desh</empfname>
        <empage>20</empage>
        <emporigin>India</emporigin>
    </emprecord>
    <emprecord>
        <empid>4005</empid>
        <emplname>DD</emplname>
        <empfname>Raju</empfname>
        <empage>20</empage>
        <emporigin>Swiss</emporigin>
    </emprecord>
    <emprecord>
        <empid>4006</empid>
        <emplname>DD</emplname>
        <empfname>Pavan</empfname>
        <empage>20</empage>
        <emporigin>Brazil</emporigin>
    </emprecord>
</emprecords>


Output Data/Payload:

<?xml version="1.0" encoding="UTF-8"?>

<emprecords>
    <emprecord>
        <empid>4001</empid>
        <emplname>Paul</emplname>
        <empfname>David</empfname>
        <empage>20</empage>
        <emporigin>IN</emporigin>
    </emprecord>
    <emprecord>
        <empid>4002</empid>
        <emplname>PP</emplname>
        <empfname>Ramesh</empfname>
        <empage>20</empage>
        <emporigin>GM</emporigin>
    </emprecord>
    <emprecord>
        <empid>4003</empid>
        <emplname>DD</emplname>
        <empfname>Kiran</empfname>
        <empage>20</empage>
        <emporigin>-NA-</emporigin>
    </emprecord>
    <emprecord>
        <empid>4004</empid>
        <emplname>DD</emplname>
        <empfname>Desh</empfname>
        <empage>20</empage>
        <emporigin>IN</emporigin>
    </emprecord>
    <emprecord>
        <empid>4005</empid>
        <emplname>DD</emplname>
        <empfname>Raju</empfname>
        <empage>20</empage>
        <emporigin>-NA-</emporigin>
    </emprecord>
    <emprecord>
        <empid>4006</empid>
        <emplname>DD</emplname>
        <empfname>Pavan</empfname>
        <empage>20</empage>
        <emporigin>BLR</emporigin>
    </emprecord>
</emprecords>

Sample Output:


Note: We can achieve same thing with Fix Values feature also. But, you need to update the iflow, whenever you add Key/Value pair or update or delete it and then deploy it. So downtime will be there. So use Value-Mapping instead.

Under Conversions> Fix Values or Value Mapping


Thanks for reading :-)

Optimizing Resource Consumption

In this blog, I am going to explain the process of inspecting resource consumption in SAP CPI by using the Inspect Resource Consumption dashboard. 

By analyzing key metrics such as database connections, data store usage, and monitoring storage you can identify potential issues and then optimize performance. 

Dashboard Overview: 

The Inspect Resource Consumption dashboard provides a snapshot of essential metrics and it displays various tiles that represent the consumption levels of different resources in your tenant. Each tile shows the overall consumption of a resource over the past 24 hours.


Click on any tile (connections/data store) for detailed information about consumption..



Database Resources

Inspect the usage of integration resources associated with the tenant database and with the database connection pool.

  • Connections: you can inspect resource usage of the database connections caused by integration flows.
  • Data Store: you can inspect resource usage of the tenant database caused by integration flows using data store operations steps.
  • Transactions: you can inspect resource usage of the database transactions caused by integration flows.
  • Monitoring Storage: you can inspect resource usage of the monitoring database storage caused by integration flows.

System Resources
Inspect system resource usage caused by your active integration flows.
  • Memory: you can inspect resource usage of system memory caused by integration flows.
  • Temporary Storage: you can inspect the storage usage of temporary files.
Content Resources
Inspect content resource usage caused by your integration artifacts.
  • Content Size: you can inspect the file size that integration artifacts occupy.
  • Integration Flows: you can inspect the integration flows with the highest resource consumption.
Important Points:
  • Resources should be monitored during Load / Performance testing
  • And, Level 2 / support team should monitor the resources in PROD tenant regularly.

Thanks for reading :-)

OData Adapter | Sender and Receiver

What is OData Adapter?  An OData Adapter is an integration component that lets cloud platforms or enterprise systems connect to and communic...