Introduction:
In this blog post, we will walk through the process of establishing a connection between the SAP Business Application Studio, a powerful cloud service, and the on-premise backend systems. This setup will allow you to develop, test, and deploy applications seamlessly, leveraging the best of both cloud and on-premise capabilities.
Before we dive into the steps, it’s important to ensure you have a few things in place.
Pre-requisites:
- SAP HANA Platform: You should have an instance of the SAP HANA Platform already set up and available in your on-premise environment.
- SAP HANA Extended Application Services Advanced (XS Advanced): The XS Advanced platform should be set up and ready to go. This is crucial for developing and deploying web applications on the SAP HANA Platform.
- Cloud Connector: The Cloud Connector should be installed. This software acts as a link between your on-premise systems and the cloud services.
- Familiarity with Cloud Connector Setup: While we will cover the basic setup, it’s crucial to have a basic understanding of setting up the Cloud Connector.
- Connection to SAP BTP Sub account in Cloud Connector: Ensure you’re connected to your SAP Business Technology Platform (BTP) Sub account through the Cloud Connector. This connection is essential for linking your cloud and on-premise services.
Now that we have the prerequisites covered, let’s dive into the step-by-step process of setting up the connectivity.
In order to expose on-premise backend systems, we need to collect the endpoints for those systems.
Here’s a breakdown of the required endpoints:
- XS advanced controller (controllerEndpoint): This endpoint is needed to connect to the XS advanced controller. You can find the endpoint URL by using the command “xs -v” in your command line interface.
- XS advanced User Account and Authentication (XSUAA) (authorizationEndpoint): The XSUAA endpoint is necessary for user account and authentication purposes. You can obtain the endpoint URL using the same “xs -v” command.
- SAP HANA cockpit (hana-cockpit) service: The endpoint URL for the SAP HANA cockpit service is also required. You can find this URL using the “xs -v” command.
- The Multitarget Application(MTA) Archive deployer service (deploy-service): The endpoint URL for the MTA deployer service is needed as well. You can obtain this URL by using the “xs -v” command.
- SAP HANA run-time-tools service (hrtt-service): To find the endpoint URL for the SAP HANA run-time-tools service, you can use the command “xs app hrtt-service“.
- The SID and instance number of the SAP HANA database that is mapped to XS advanced: To find the SID and instance number, use the command “xs tenant-databases” and copy the value of the sql-port. The second and third digits of the port number represent the instance number.
In case of doubt, refer to the following screenshots:
Collect endpoints for controllerEndpoint, authorizationEndpoint, hana-cockpit, and deploy-service
Collect endpoints for hrtt-service
Collect endpoints SAP HANA SID and sql-port
Cloud Connector
The Cloud Connector is a vital tool that allows the SAP Business Technology Platform (BTP) to connect with XS Advanced and the underlying on-premise system(s). The Cloud Connector can be installed and set up on any host that can access the system hosting the backend system.
To connect SAP BTP to XS Advanced, it’s important to know the default HOST and HTTP/TCP ports:
For SAP HANA (both the system database and the default tenant database), the required TCP port range is 3<HANA_INST_#>13 – 3<HANA_INST_#>17. For instance, if the instance number of the SAP HANA database is “00”, the range would be 30013 – 30017.
Note: In this blog, we’ll use 06 as the instance number. This might be different for you.
For additional tenant databases, three ports per tenant are required, with the range being 3<HANA_INST_#>40 – 3<HANA_INST_#>42.
Configuring SAP Cloud Connector
- Connect your BTP Sub-account(see the screenshot)
- Click on Cloud To On-Premise to expose your backend systems(or services)
- For all backend systems except SAP HANA, expose a new system by clicking the + icon and providing the following details:
- Back-end Type: Other SAP System
- Protocol: HTTPS
- Internal Host: endpoint without port (we collected these in the beginning)
- Internal Port: port
- Virtual Host: choose any valid virtual host name(You may choose any unused host name, you’ll need this later)
- Virtual Port: choose any valid virtual port(You may choose any unused port, you’ll need this later)
- Principal Type: None
- Host In Request Header: Use Virtual Host
- Description: Provide a description, it is optional
- Check Internal Host
- Click Finish. (Check if the system is reachable. The value of column Check Result will be “Reachable” if a host is reachable from your cloud connector. If not, then contact the System Administrator)
In case of doubt, refer to the following screenshots:
Choose Back-end Type
Choose Protocol
Choose Internal Host and Internal Port
Choose Virtual Host and Virtual Port
Choose Principal Type
Choose Host In Request Header
Provide optional description
Check Internal Host
After exposing the systems, add resources for each system
- Add Resource
- Click on the internal hostname field
- Click the “+” icon in resources section
- Choose values as shown in the screenshot below
- For SAP HANA, click the + icon and provide the following details
- Back-end Type: SAP HANA
- Protocol: TCP SSL(or TCP depending on your SAP HANA installation)
- Internal Host: endpoint without port (you fetched these in the beginning)
- Internal Port: sql-port
- Virtual Host: choose any valid virtual host name(You may choose any unused host name, we’ll need this later)
- Virtual Port: choose any valid virtual port(You may choose any unused port, you’ll need this later)
- Principal Type: None
- Host In Request Header: Use Virtual Host
- Description: Provide a description, it is optional
- Check Internal Host
- Click Finish
- For SAP HANA, click the + icon and provide the following details
- Back-end Type: SAP HANA
- Protocol: TCP SSL(or TCP depending on your SAP HANA installation)
- Internal Host: endpoint without port (you fetched these in the beginning)
- Internal Port: sql-port
- Virtual Host: Non-FQDN, e.g. my(You may choose any unused host name, we’ll need this later)
- Virtual Port: same port chosen in the previous step
- Principal Type: None
- Host In Request Header: Use Virtual Host
- Description: Provide a description, it is optional
- Check Internal Host
- Click Finish
Your exposed systems list should be like the list in the screenshot below:
Exposed Systems list in Cloud connector
If all the systems are reachable then you’re good to go for the next step i.e. destinations configuration in your SAP BTP Sub-account
SAP BTP Destinations
- Login to SAP BTP
- Navigate to your sub-account
- Click Connectivity > Destinations
Select Destinations in SAP BTP Sub-account
Create XS Controller Destination
Click Create Destination and fill in the following values:
- Name: SAP_XS_Advanced_Runtime
- Type: HTTP
- Description: Optional text
- URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
- Proxy Type: OnPremise
- Authentication: NoAuthentication
- For additional properties, click “New Property Button” and choose the following key values
- HTML5.DynamicDestination : True
- WebIDEEnabled : True
- XsApiEndpoint : http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
- For additional properties, click “New Property Button” and choose the following key values
- Click Save button
Create Destination
XS Controller Destination
Create XSUAA Destination
Click Create Destination and fill in the following values:
- Name: SAP_XS_Advanced_UAA
- Type: HTTP
- Description: Optional text
- URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30632
- Proxy Type: OnPremise
- Authentication: NoAuthentication
- For additional properties, click “New Property Button” and choose the following key values
- HTML5.DynamicDestination : True
- WebIDEEnabled : True
- WebIDEUsage : xsuaa
- XsApiEndpoint : http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
- For additional properties, click “New Property Button” and choose the following key values
- Click Save button
- Check connection. If the connection fails, then recheck the provided values or contact your System Administrator
XSUAA Destination
Create HRTT Destination
Click Create Destination and fill in the following values:
- Name: SAP_XS_Advanced_HRTT_Service
- Type: HTTP
- Description: Optional text
- URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:51064
- Proxy Type: OnPremise
- Authentication: NoAuthentication
- For additional properties, click “New Property Button” and choose the following key values
- HTML5.DynamicDestination : True
- WebIDEEnabled : True
- WebIDEUsage : xs_hrtt
- XsApiEndpoint : http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
- For additional properties, click “New Property Button” and choose the following key values
- Click Save button
- Check connection. If the connection fails, then recheck the provided values or contact your System Administrator
HRTT Destination
Create XS Deployer Destination
Click Create Destination and fill in the following values:
- Name: SAP_XS_Advanced_Deploy_Service
- Type: HTTP
- Description: Optional text
- URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:51041
- Proxy Type: OnPremise
- Authentication: NoAuthentication
- For additional properties, click “New Property Button” and choose the following key values
- HTML5.DynamicDestination : True
- WebIDEEnabled : True
- WebIDESystem : True
- XsApiEndpoint : http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
- For additional properties, click “New Property Button” and choose the following key values
- Click Save button
- Check connection. If the connection fails, then recheck the provided values or contact your System Administrator
XS Deployer Destination
Create SAP HANA Cockpit Destination
Click Create Destination and fill in the following values:
- Name: SAP_XS_Advanced_HANA_Cockpit
- Type: HTTP
- Description: Optional text
- URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:51041
- Proxy Type: OnPremise
- Authentication: NoAuthentication
- For additional properties, click “New Property Button” and choose the following key values
- HTML5.DynamicDestination : True
- WebIDEUsage : xs_cpt
- WebIDEEnabled : True
- XsApiEndpoint : http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
- For additional properties, click “New Property Button” and choose the following key values
- Click Save button
- Check connection. If the connection fails, then recheck the provided values or contact your System Administrator
SAP HANA Cockpit Destination
Create HANA Database Destination
Click Create Destination and fill in the following values:
- Name: SAP_HANA_Database
- Type: HTTP
- Description: Optional text
- URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my:30615
- Proxy Type: OnPremise
- Authentication: NoAuthentication
- For additional properties, click “New Property Button” and choose the following key values
- HTML5.DynamicDestination : True
- WebIDEEnabled : True
- WebIDEUsage: xs_hdb
- For additional properties, click “New Property Button” and choose the following key values
- Click Save button
- Check connection. If the connection fails, then recheck the provided values or contact your System Administrator
SAP HANA Database Destination
If the connection is successful for all the added destinations, that is the indication of successful connectivity setup for communication between SAP Business Application Studio and XS Advanced System.
You may now set up a Development Space in SAP Business Application Studio [Documentation].
Detailed documentation about the setup is available here.