Connectivity between SAP Business Application Studio and XS Advanced

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:

  1. SAP HANA Platform:  You should have an instance of the SAP HANA Platform already set up and available in your on-premise environment.
  2. 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.
  3. Cloud Connector: The Cloud Connector should be installed. This software acts as a link between your on-premise systems and the cloud services.
  4. 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.
  5. 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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“.
  6. 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_endpoints1

Collect endpoints for controllerEndpoint, authorizationEndpoint, hana-cockpit, and deploy-service

Collect_endpoints2

Collect endpoints for hrtt-service

Collect_endpoints3

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)connect_to_btp_subaccount
  • 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:
    1. Back-end Type: Other SAP System
    2. Protocol: HTTPS
    3. Internal Host: endpoint without port (we collected these in the beginning)
    4. Internal Port: port
    5. Virtual Host: choose any valid virtual host name(You may choose any unused host name, you’ll need this later)
    6. Virtual Port: choose any valid virtual port(You may choose any unused port, you’ll need this later)
    7. Principal Type: None
    8. Host In Request Header: Use Virtual Host
    9. Description: Provide a description, it is optional
    10. Check Internal Host
    11. 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
    1. Click on the internal hostname field
    2. Click the “+” icon in resources section
    3. Choose values as shown in the screenshot below

  • For SAP HANA, click the + icon and provide the following details
    1. Back-end Type: SAP HANA
    2. Protocol: TCP SSL(or TCP depending on your SAP HANA installation)
    3. Internal Host: endpoint without port (you fetched these in the beginning)
    4. Internal Port: sql-port
    5. Virtual Host: choose any valid virtual host name(You may choose any unused host name, we’ll need this later)
    6. Virtual Port: choose any valid virtual port(You may choose any unused port, you’ll need this later)
    7. Principal Type: None
    8. Host In Request Header: Use Virtual Host
    9. Description: Provide a description, it is optional
    10. Check Internal Host
    11. Click Finish
  • For SAP HANA, click the + icon and provide the following details
    1. Back-end Type: SAP HANA
    2. Protocol: TCP SSL(or TCP depending on your SAP HANA installation)
    3. Internal Host: endpoint without port (you fetched these in the beginning)
    4. Internal Port: sql-port
    5. Virtual Host: Non-FQDN, e.g. my(You may choose any unused host name, we’ll need this later)
    6. Virtual Port: same port chosen in the previous step
    7. Principal Type: None
    8. Host In Request Header: Use Virtual Host
    9. Description: Provide a description, it is optional
    10. Check Internal Host
    11. 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

  1. Login to SAP BTP
  2. Navigate to your sub-account
  3. Click Connectivity > Destinations

Select%20Destination%20in%20SAP%20BTP%20Sub-account

Select Destinations in SAP BTP Sub-account

Create XS Controller Destination

Click Create Destination and fill in the following values:

  1. Name: SAP_XS_Advanced_Runtime
  2. Type: HTTP
  3. Description: Optional text
  4. URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30630
  5. Proxy Type: OnPremise
  6. 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
  7. Click Save button

Create Destination

XS Controller Destination

Create XSUAA Destination

Click Create Destination and fill in the following values:

  1. Name: SAP_XS_Advanced_UAA
  2. Type: HTTP
  3. Description: Optional text
  4. URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:30632
  5. Proxy Type: OnPremise
  6. 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
  7. Click Save button
  8. 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:

  1. Name: SAP_XS_Advanced_HRTT_Service
  2. Type: HTTP
  3. Description: Optional text
  4. URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:51064
  5. Proxy Type: OnPremise
  6. 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
  7. Click Save button
  8. 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:

  1. Name: SAP_XS_Advanced_Deploy_Service
  2. Type: HTTP
  3. Description: Optional text
  4. URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:51041
  5. Proxy Type: OnPremise
  6. 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
  7. Click Save button
  8. 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:

  1. Name: SAP_XS_Advanced_HANA_Cockpit
  2. Type: HTTP
  3. Description: Optional text
  4. URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my.acme.com:51041
  5. Proxy Type: OnPremise
  6. 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
  7. Click Save button
  8. 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:

  1. Name: SAP_HANA_Database
  2. Type: HTTP
  3. Description: Optional text
  4. URL: http://<virtual host for controller endpoint>:<virtual port>. Example: http://my:30615
  5. Proxy Type: OnPremise
  6. Authentication: NoAuthentication
    • For additional properties, click “New Property Button” and choose the following key values
      • HTML5.DynamicDestination : True
      • WebIDEEnabled : True
      • WebIDEUsage: xs_hdb
  7. Click Save button
  8. 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.

Scroll to Top