Purpose
This WiKi will show howhow to create an IFLOW and a HTTP Connector and connect to an SAP Gateway Systemto retrieve Data from the Gateway Services.
Overview
Creating an HTTP Flow Connection thru an SAP Cloud Connector to an SAP Gateway System to Read Data from the Gateway Services Flight. This can lead to other
development to consume other Gateway Services.
Prerequisites
- Access to Flights Service in the SAP Gateway Server.
- SAP Cloud Neo, For Cloud Connector to connect to.
- SAP Cloud Integration IFLOW.
- Cloud Connector Configuration please refer to the WIKI Post
https://wiki.scn.sap.com/wiki/x/2AW0Ig
Step 1 Creating Login reference.
The user credentials(username/password) need to be provisioned to connect to SAP Gateway Server thru Cloud Connector.
1-1 Login to Integration tenant and go to Manage Security as illustrated below.
Figure 1 the Main Menu in Cloud Integration.
1-2 From the Menu select Create and then select User Credentials.
Figure 2 Menu option to create User Credentials.
1-3 A popup screen prompts for Create User Credentials. The Name can be anything in this case Name is set to “GW1”
and Description as “SAP Gateway Server”. The authentication Type is set to “User Credentials” with User and Password.
Figure 3 Creating our USER ID and Password Reference GW1.
After user credentials are created simply click on Deploy.
Note: Copy the Name, in this case “GW1” since it is need later when we configure the service URL. |
---|
The following steps to create the IFLOW.
Step 2: Creating an IFLOW.
Figure 4 The Main Screen of the Cloud Platform Integration.
2-1 Login to you Tenant and go to the main screen.
2-2 Select the Pencil.
Figure 5 Find your Container or create one to store your IFLOWS.
2-3 Select your Container where you want to build your IFLOW.
2-4 Top right-hand side click Edit.
Figure 6 Here is the Screen show other IFLOW Project We can create IFLOWS.
2-5 From the pull-down Menu Select Add.
2-6 Select Integration Flow.
Figure 7 Steps to create our IFLOW Project.
After clicking Integration Flow there will be a popup
Figure 8 Adding an Integration IFLOW giving it a unique name.
2-7 File in the required information.
2-8 Name: ABAP_HTTP.
2-9 Click on OK.
Figure 9 Showing the created IFLOW.
Now our project IFLOW is created to open click on ABAP_HTTP.
Figure 10 Default IFOW Empty Project.
NOTE: When Creating an IFLOW Project you always get the Sender Adapter and the Receiver Adapter |
We now have a IFLOW we will need to add some FLOW to our project.
2-10 Click on Edit top right.
2-11 Select the Start and delete.
Figure 11 Deleting the Start and replace with a Timmer.
Note: By Default, all empty Project automatically have a Start and End Flow. |
Figure 12 Steps to add a Timmer to the Project.
2-12 From the Menu select the Target Icon.
2-13 Scroll down and select Timer.
2-14 Drag and drop the Timer on the IFLOW.
2-15 Select The timer connector the line with the Arrow.
Figure 13 Clicking on the Arrow to connect to the End Flow.
2-16 Drag the arrow to the End Icon.
Figure 14 Now the timer is connected to the End Event or End Process.
In the next step will need to add a Request Response Flow to our IFLOW.
Files
2-17 From the menu Bar select the right and left arrow icon this is call
scroll down and select External Call.
Figure 15 This the Parent menu External Call Flow.
NOTE: There are two ways to add Flow Steps to the Project Right Click on the Arrow Line and click the Plus Sing. |
2-18 When selecting External call open it.
2-19 Then from the sub menu select Request Reply.
Figure 16 Showing the Sub Menu of the External call here we select Request Reply Flow.
2-20 Drag and drop the Request Reply on to the IFLOW
Figure 17 Step 2 showing the Request Reply Flow.
Your IFLOW should look like Figure 17.
Next, we need to connect our Request Reply to the Receive.
In the IFLOW Project there should already be a Receive.
2-21 Drag it and place it under the Request Reply
Figure 18 Moving the Receiver under the Request Reply.
2-22 Select the Request Reply and connect it to the Receiver.
You will get a popup to select the Adapter type.
Figure 19 All connectors need a Reference Protocol In the case HTTP.
2-23 Select HTTP.
Your project should look like this.
Figure 20 The Request Reply is now connected to the Receiver and will use HTTP.
Next, we will need to configure the HTTP Connection.
2-24 Select the line marked with HTTP
Figure 21 Connection Configuration Menu in the HTTP Flow.
2-25 Go to the Connection.
2-26 We need to add the following.
2-27 Address Your HTTP URL that points to a Cloud Connector.
2-28 Proxy Type change to On-Premise.
2-29 Location ID is a reference to the Location ID of the cloud Connector.
2-30 Method select GET.
2-31 Authentication Select Basic Auth.
2-32 Credential Name this the predefined Credential Add GW1.
2-33 For the Request Header add an asterisk.
2-34 For the Response Header add an asterisk.
NOTE: The GW1 we created in Step 1-1 this holds the User ID and Password. |
Figure 22 populating the Connections.
The Address http://yourserver:2000/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/
the Virtual Server and Virtual Port number. The Service URL /sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/
this must be a real service URL on the SAP Gateway System.
Note: The Address http://yourserver:2000/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/ |
2-35 click Save
Your IFLOW should look like this.
Figure 23 Completed IFLOW.
Step 3 Adding Groovy Script to Log the IFLOW HTTP Request.
NOTE: Groovy Script is great to Log and trace in development and Test |
To enable logging to see exactly what is being returned from the SAP Gateway Server in the iFlow project,
we need to add a Groovy Script to our IFLOW.
3-3 Select the arrow and then the Plus sign from the Add Flow Step then select Groovy Script as illustrated below.
Figure 24 Show how to add a Flow the Project in this case we are adding a Groovy Script.
3-4 Select the Create Icon, this action will bring up the Groovy Script Editor.
Figure 25 Creating the Groovy Script
3-3 Replace the default content with the following Groovy Script for creating a log file.
import com.sap.gateway.ip.core.customdev.util.Message;
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)
{
messageLog.setStringProperty("log1","Printing Payload As Attachment")
messageLog.addAttachmentAsString("log1",body,"text/plain");
}
return message;
}
The Groovy Script should look like the Following Screen in Figure 26..
Figure 26 Groovy Script editor
3-4 Click Ok to save.
The finished IFLOW should look like the following.
Figure 27 Our Completed IFLOW.
We have completed the IFLOW
Save the IFlow.
Step 4 Deploying the IFLOW.
The IFLOW configuration is completed we now need to deploy the IFLOW
4-1 From Menu top right select Deploy
Step 4
The IFLOW configuration is completed we now need to deploy the IFLOW
4-1 From Menu top right select Deploy
Figure 28 Menu to Deploy.
Your will get a pop message.
Figure 29 Pop Menu asking if you want to deploy.
4-2 Select Yes
The Next screen
Figure 30 Finial message Successful Deployment.
Figure 31 Select the Operate and Monitor.
4-3 Click Ok.
Next
4-4 Select the Eye Icon top Lest.
Next
4-5 Select the Manage Integration Content Tile.
Figure 32 The Main Integration menu.
On the Next Scree we now see out IFLOW was deploy.
Figure 33 Showing the Deployed IFLOW ABAP_HTTP.
From the Menu
4-6 Go to Artifact Details.
4-7 Click on Monitor Message Processing.
After clicking on Monitor Message Processing.
You will see the next Screen.
Figure 34 Reviewing the logs.
From the meu we can see the LOG and the LOG1.
The Log was created during the deployment of the IFLOW.
The Log1 Is the log that was created by the Groovy.
4-8 Select the Open Text View.
Figure 35 Deployment Log
The our put of the successful deployment.
You will notice on the same Screen we can access the Groovy Script log1
4-8 form the same screen select Log1.
You will notice that the output is a continues string
to see the details in a better format simply download the file.
Figure 36 Groovy Script Log1 out put.
4-9 Select Down load.
After downloading the log1 out put
open the file with a text utility like Note pad or Note Pad ++.
4-10 Open the file.
Figure 37 The Downloaded file.
The Log1 out put clearing is connecting and has sent a query to the SAPGateway Server.
Note: The query we used will query the very top of the Service of Flight |
Summary
This document explained in detail how to setup an HTTP connection thru the SAP Cloud Connector to the
SAP Gateway Server On-Premise. The development of an IFLOW Consume Flights Data, As described the steps are very easy and can help to improve future development consideration.
As demonstrated the IFLOW can use HTTP as well as an ODATA Connect to connect and query Data from the SAP Gateway System.
As with any project testing should be done before fully implementing and deploying, also make necessary changes if needed.
Connection using HTTP through the Cloud Connector works very well in this environment and will provide an easy integration to an on-premise SAP Gateway System.
Setting up Cloud Connector to an On-Premise SAP Gateway System to connect SAP Cloud Integration - SAP Cloud Integration - Community Wiki.
Connecting to SAP Gateway Server to consume ODATA data from SAP Cloud Integration iFlow.
FAQs
How to connect SAP Cloud Platform integration and on-premise system? ›
- 1 – Connect SAP BTP (Subaccount) to Local SAP Cloud Connector. SAP Cloud Connector. ...
- 2 – Setup the connectivity between SAP BTP (Subaccount) and SAP On-Premise via SAP Cloud Connector. ...
- 3 – Look up SAP On-Premise from SAP Business Application Studio (BAS)
- STEP 1: INSTALL THE CLOUD CONNECTOR.
- STEP 2: ACCESS TO THE CLOUD CONNECTOR.
- STEP 3: CONNECT AN ABAP SYSTEM WITH SAP CLOUD PLATFORM THROUGH THE CLOUD CONNECTOR.
The SAP CPI-PI iFlow operator provices the possibility to trigger iFlows in an SAP CPI system. It calls the set CPI system sending the received input data (JSON is assumed) as payload. The response is emitted via the outbound port.
How do you integrate between a cloud and an on-premise application? ›The use of an integration Platform as a Service (iPaaS) offers an innovative way of integrating cloud and on-premises apps, enabling development, execution, and management of the integration process through a suite of services accessed via the cloud.
What is cloud connector for SAP on-premise? ›The cloud connector is a component for on-premise databases that serves as a link between SAP HANA Cloud, SAP HANA database and other SAP BTP applications. It lets you easily connect and expose specific parts of an on-premise database without having to expose the entire on-premise landscape.
How do I connect my cloud connector to SAP? ›- Install the Cloud Connector: Installation.
- Perform the initial configuration for the Cloud Connector: Initial Configuration.
- Register the Cloud Connector for your SAP BTP subaccount: Managing Subaccounts.
The Cloud Connector serves as the link between on-demand applications in SAP BTP. This is the browser-based and existing on-premise systems. You can control the resources available for the cloud applications in those systems.
Which of the below is secure tunnel between SAP Cloud Platform and on-premise applications? ›The SAP Cloud Connector provides a secure tunnel between SAP Cloud Platform applications and on-premise systems. It runs as a reverse invoke proxy between the on-premise network and the SAP Cloud Platform.
How do I create an iFlow? ›Step 1 : Create an iFlow Artifact
Click Design in the left Panel. Click Create present on top right corner of the page. This will take you to the page where you can create a package.
SAP provides prepackaged, generic integration content called integration flows (iFlows) for the integration of SAP Cloud for Customer with an on-premise system using SAP Cloud Integration. The list of iFlows with their corresponding mappings, downloaded as a spreadsheet.
What is the difference between SAP BTP and SAP CPI? ›
1. What are SAP BTP and CPI? SAP BTP, or Business Technology Platform, is Business-centric and open technology platform of SAP that can improve how a business works. And CPI is a tool included in it that works as a middleware solution with a sense of replication integrated with its core.
What must you configure when you use the iFlow? ›...
- Who is the sender, how many and who are the receivers.
- Interfaces used with the sender and receivers.
- The adapters used with the sender and receivers.
- The dynamic routing used.
- The mappings used.
The iflow is sent to the tenant management node (tmn node)
Is SAP CPI easy to learn? ›SAP CPI is a complex system. There are some areas that you must understand what mean before you start creating your first real project. If not you are going to spend too much time on something that will not help your project. And it will be difficult to understand how to get started.
How do you connect two SAP systems? ›- RFC Destination: XYZ_TRUST.
- Connection Type 3: ABAP Connection.
- Description: Trusted RFC connection for XYZ System Client 100.
- Target host: <target hostname>
- System Number: Instance number of XYZ.
- Gateway Host: Recommended to provide the gateway host.
A hybrid cloud is a type of cloud computing that combines on-premises infrastructure—or a private cloud—with a public cloud. Hybrid clouds allow data and apps to move between the two environments.
How do you connect cloud connectors in SAP? ›- Log on to the SAP Cloud Connector.
- Click the Add Subaccount button and enter or select the following information, and then click Save. ...
- In the Subaccount dashboard, you can check the state of all subaccount connections managed by the SAP Cloud Connector at a glance. ...
- In the main menu, select Cloud to On-Premise.