Cloud Platform Integration
Cloud Platform Integration
SAP CPI enabling Cloud, integrates data Cloud services, integration across on-premise
and mobile applications by consolidating, processing and publishing data quickly and
securely.
Key Benefits?
Reduced integration costs
Improved Productivity
Enhanced Agility and Analytics
Real time Monitoring
1
Faster Deployment
Access to innovation
Agile deployment configuration
Lower TCO & faster time to value
The sender is the source of the message, and the receiver is the target system where the
message is delivered.
The sender is connected to the start of the Iflow and sends data to the integration
process. While the receiver is connected to the end of the Iflow and receives the
processed data.
Sender is act like our outbound message and receiver is inbound message.
Adapters:
Adapters are used to connect different systems and applications.
HTTPS Adapter: A lightweight adapter that can exchange data between systems over
HTTPS protocols. It supports various message formats, including XML, JSON and plain
text.
IDOC: The IDOC adapter enables SAP Cloud integration to exchange intermediate
document (IDoc) messages with systems that support web communication via SOAP
services.
OData: Allows users to communicate with an OData API using the OData protocol.
SFTP (Secure File Transfer protocol): The SFTP Adapter connects an Integration tenant to
a remote system using the SSH (Secure Shell) file transfer protocol system to write files
to the system.
Definition - SFTP adapter to encrypt and exchange sensitive business data between
trading partners.
2
(RFC) Remote Function Call: It is a standard SAP interface that allows communication
between SAP systems and other systems. It enables the exchange of data and execution
of functions in remote systems.
SOAP(Simple Object Access Protocol) Adapter: It allows you to exchange SOAP messages
between remote clients or web services server and the integration server and supports
security setting for signing and verifying the SOAP body.
1. Robust : If you want to get request and response. once you send the request you
want the response then to go for robust.
2. WS Standard: If you don't want to see any response to the client to go for the WS
Standard.
WSDL:
Web Services Description language (WSDL) file for a SOAP Call, SOAP is the standard
format for web services.
CSRF:
For fetch the token we’ve to use HEAD in postman.
Local Integration process: To simplify the integration process we can break down the
main integration into smaller fragments by using local integration process.
3
Exception subprocess: To catch any exceptions thrown in the integration process and
handle them.
Events:
Start Message and End Message: “Start Message” event marks the beginning of a
message processing flow. While an “End Message” event indicates the end of the flow,
sending the processed message to the receiver.
Error Start and Error End: “Error Start and Error End” can be used only within an
exception sub-process.
Timer Start: An integration flow to automatically start and run on a particular schedule.
Asynchronous: The SAP application does not wait for a response from the receiver.
Content Modifier:
We use the Content Modifier step to modify the content of the incoming message by
providing additional information in the header or body of the message.
Headers: Headers can be access outside of the CPI. We can use headers to provide
authorization.
It acts as the top-level container for all other elements defining the overall structure of
the document and ensuring that there is only one parent element for every other
element within the xml file.
To prevent naming conflicts between element and attributes from different sources by
associating them with unique identifiers.
4
Suppress Json root element: we can check this option when we want Json response
without root element.
Request Reply:
To allows a user to call an external system and receive a response.
Send Pallet:
Using send pallet for sending mail. It acts like request reply.
Message Mapping:
A process that transforms data between systems by mapping fields between messages.
In simple words use message mapping for converting one structure to another structure.
Value Mapping:
Value mapping is used to translate source values into target values during data
integration.
Splitter:
A splitter is used to break message into smaller parts that can be processed
independently.
Grouping: The size of the groups into which the composite message is to be split.
For example, if a message has 10 nodes and grouping is defined as 2, the message is
split into 5
Streaming: Select this option if you want to stream the process of splitting a large
composite message.
If you activate streaming, the system already starts processing parts (chunks) of the
composite message before the message is fully transferred to the memory (of the
runtime node).
5
If you deactivate this option, the message is transferred fully to the memory before it is
split and processed
General Splitter: Split a message into individual messages, while preserving the context
of the root nodes.
Iterating Splitter: Splits a general document into its constituent elements but does not
include the enclosing tags in the individual messages.
XSD File:
An "XSD file" stand for "XML Schema Definition" file, which essentially defines the
structure and data used types of an XML message used in integration flows, allowing for
data validation and ensuring the consistency of data exchanged between different
systems the integration process.
An XSD file specifies the element, attributes, and their data types within an XML
message, acting like a blueprint for How the data should be organized.
Validation Tool: By using an XSD, CPI can Validate incoming XML message against the
defined structure, identifying any errors or in the data.
XSD files are crucial for creating message mappings in CPI. where you transform data
from format (e.g. an external system) to another based on the defined structure.
OData:
The OData adapter allows you to communicate with an OData protocol. you can use
messages in ATOM or JSON format for Communication.
6
Host:
This is the IP address of the server hosting the OData service.
Port:
The port number on which the OData service is listening. The default ports are 80 for http
and 443 for https.
Path:
This is the base path for the service. it identifies the service and OData and specifies the
namespace for the entities exposed by the service.
Sublevel:
A Sublevel typically refers to the depth of nested entities or related data that can be
expanded in an OData query.
Entity:
An "entity" represents a single, structured record of data, like a customer or product.
(Set of Records)
Proxy type:
Internet: Internet proxy type is Suitable when your OData service is externally hosted or
available on the internet. it allows the adapter to communicate with the service over the
public network.
On-premise: The on-premise proxy type is suitable for Scenarios where the OData service
is hosted within your organization’s network.
Metadata Document:
When you access the URL in your step-1, typically the service will respond with metadata
about the available entity sets, properties. relationships and operations exposed by the
service.
"The metadata document describes the Structure and capabilities of OData service,
allowing the clients to understand how to interact with it programmatically.
In summary, when you access the full URL, you'll receive metadata and information
about the available resources and operations provided by the OData service.
7
*.edmx is the extension of metadata.
XSLT Mapping:
"Extensible Stylesheet Language Transformations" mapping refers to the process of using
XSLT to transform and map data between different formats during integration scenarios.
XSLT mapping is a powerful tool in SAP CPI that enables you to manage complex data
transformations and mapping in integration scenarios, easing seamless communication
between different systems with varying data formats.
<employee>
<name>John</name>
<age>30</age>
</employee>
You want to transform it into:
<person>
<fullName>John</fullName>
<years>30</years>
</person>
Then your XSLT would look like:
8
</xsl:template>
</xsl:stylesheet>
2. <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
version="1.0": Specifies the version of XSLT you're using (1.0 in SAP CPI).
xmlns:xsl=...: Declares the xsl namespace. All XSLT commands use this
prefix.
4. <xsl:template match="/employee">
Think of it as: “When you find an <employee> element, apply this block
of transformation.”
New tag: It’s not coming from the source; you define this to match the
target structure.
9
6. <staffId><xsl:value-of select="id"/></staffId>
What it does:
o Fills it with the value of the <id> element from the input.
7. <fullName><xsl:value-of select="name"/></fullName>
8. <division><xsl:value-of select="department"/></division>
9. </xsl:template>
10. </xsl:stylesheet>
JSON:
JavaScript Object Notation (JSON) is a standard text-based format for representing
structured data based on JavaScript object syntax.
JSON Object:
JSON object literals are surrounded by curly braces.
JSON object literals contain Key/Value pairs.
Keys and Values are separated by a colon.
JSON Arrays:
JSON arrays values must be type string, number object, array, boolean or null.
10
XML:
XML (Extensible Markup Language) is a way to store and exchange data between
systems. It's a file format that can be read by both humans and computers.
XML Schema:
An XML schema describes the structure of an XML document.
XML Attributes:
Attributes values must always be quoted. for a person's gender, the <person> element
can be written like this-
attribute
XML Element:
An XML the element is everything from element's start tag to the elements end tag.
<price> 20.39<price/>
element
Filter:
Use filter to from an extract information from an incoming message, in other words you
Filter out parts of the message that you don’t want and extract only the data that you
want.
1. //elementname[filterParameter = ‘value’]
2. Multiple : //elementname[filterParameter = ‘value1’, ‘value2’]
Router:
We use router when you specify conditions based on which the messages are routed to
receive an interface during runtime.
The router is a tool directs messages to different recipient’s based on specific conditions.
11
We’ve to define the client id in our iflow. There are 3 types of client id-
Development
Quality
Production
Security Material:
This is for create our credentials.
Groovy:
Groovy is an object-oriented language which is based on java platform.
Import: The import statement can be used to import the functionality of other libraries.
which can be used in your code. By default, groovy includes the following libraries in your
code.
import java.lang.*
import java.util.*
import java.iot.*
import java.net.*
import groovy.util.*
Println(“Hello World!”);
*Identifiers: Identifiers are used to define variables, functions or other user defined
variables, identifiers start with letter, dollar or an underscore. they cannot start with
number.
def x = 5;
It is a function that runs the code inside it when the system calls this script.
In processData (Message, message), the word Message and message have different
purpose:
1) Message (with a capital M) is the type (or class) of the object. it tells the system what
kind of working with.
12
2) message (with a lowercase m) is the name of the variable that holds the actual data or
object passed into the function.
Example-
The Cloud Connector serves as a link between SAP BTP applications and on-
premise systems.
Write Variable:
Write variables to share data across different integration flows (deployed on the same
tenant).
1. Local Variable
2. Global Variable
A "Write Variable" step is used to store a piece of data (like a timestamp, token, or
configuration value) as a variable that can be accessed and reused across different parts
of an integration flow or even in other integration flows within the same tenant.
Multicast:
We can use the Multicast step to send copies of the same message to multiple routes. we
can send copies to all routes at once using Parallel Multicast or in an order of your choice
using Sequential Multicast. This allows you to perform multiple operations on the same
message in a single integration process. Without Multicast, you needed multiple
integration processes to perform this task.
13
Gather And Join:
The Gather step merges messages from different routes (into a single message) with the
option to define certain strategies how to combine the initial messages. The Join step is
used in combination with the Gather step. It brings together the messages from different
routes, but it does not affect the content of the messages.
Example Gather:
Input:
Example Join:
Input:
What is API?
API (Application Programming Interface) It's a set of rules that allows software
applications to communicate with each other. APIs are used to exchange data, features,
and functionality.
14
What API headers do?
Authorization: Provide proof that the user has permission to perform an action.
Content type: Specify the format of the request body or response body.
Content length: Specify the length of the request body or response body.
Server information: Provide information about the server that processed the
request.
A simple method that uses a username and password to authenticate a client with a
server. It's widely supported by browsers and web servers, but it's not suitable for high-
security applications.
3. OAuth 2.0
A standard that allows third-party services to access data on behalf of a client. It uses
access tokens to grant access without exposing the client's credentials.
An open standard protocol that uses a compact, URL-safe way to represent claims
between two parties. JWTs are signed using a cryptographic algorithm to ensure that
claims cannot be altered after the token is issued.
5. Bearer Token
A Bearer Token is a type of access token that is used to authenticate users and authorize
access to resources in web applications and APIs.
What is Cookie?
15
API cookies are small pieces of data that a server sends to a client's browser. They are
stored on the client's device and used to track and store information about the user.
Cookies Session
Cookies are client-side files on a local Sessions are server-side files that contain
computer that hold user information. user data.
Cookies end on the lifetime set by the When the user quits the browser or logs
user. out of the programmed, the session is
over.
It can only store a certain amount of info. It can hold an indefinite quantity of data.
The browser’s cookies have a maximum We can keep as much data as we like
capacity of 4 KB. within a session, however there is a
maximum memory restriction of 128 MB
that a script may consume at one time.
Cookies stored data in text file. Session save data in encrypted form.
16
CPI offers more flexibility with cloud-native features, lightweight architecture, and
is suitable for hybrid integrations.
Subaccount: Represents the environment within an SAP BTP account, hosting CPI
services and managing users.
17