Skip to Content

Set Up the SAP HANA Cloud Service

test
0 %
Set Up the SAP HANA Cloud Service
Details

Set Up the SAP HANA Cloud Service

November 3, 2021
Created by
June 14, 2021
This tutorial shows you how to set up the SAP HANA cloud service instance.

You will learn

  • How to set up the SAP HANA cloud service instance
  • How to add SAP HANA client to your project
QR code

To start with this tutorial use the result in the cap-roles branch.


Step 1: Add SAP HANA client and configuration to your project
  1. Add SAP HANA support to your project by running.

    cds add hana
    

    This adds the hdb module for SAP HANA access to your package.json file and will configure kind sql as the database service.

    Changes in the package.json file done by cds add hana:

    {
        "name": "cpapp",
        ...
        "cds": {
            "requires": {
                "db": {
                "kind": "sql"
                }
            },
            "hana": {
                "deploy-format": "hdbtable"
            }
        }
    }
    

    Different to CAP default behavior, kind sql uses the SQLite in-memory database for local testing and the SAP HANA database for productive usage in the cloud.

    The deploy-format setting is required to create the required artifacts for SAP HANA Cloud in the build which are different from the artifacts for the previous SAP HANA offering.

    Additional Documentation:

  2. Run cds watch in your project folder and check that your app still works locally as it used to work before at http://localhost:4004/.

Which value for kind allows to use SQLite in development and SAP HANA in productive mode?
×

Step 2: Prepare using SAP HANA Cloud service

To earn your badge for the whole mission, you will need to mark all steps in a tutorial as done, including any optional ones that you may have skipped because they are not relevant for you.

SAP HANA Cloud service instances are not created automatically for any type of account. Therefore, you will have to create a SAP HANA Cloud service instance first, if you don’t have one yet.

If you already have an SAP HANA Cloud service instance in your Cloud Foundry space continue with Use an Existing SAP HANA Cloud service instance.

If you need to create a SAP HANA Cloud service instance first continue with Create an SAP HANA Cloud service instance.

Additional Documentation:

Log on to answer question

Step 3: Use an existing SAP HANA Cloud service instance
  1. Go to your SAP BTP cockpit by using one of the following links, depending on the landscape you want to use.

    https://cockpit.hanatrial.ondemand.com/

  2. Enter your Global Account.

  3. Choose Account Explorer.

  4. In the Subaccounts tab, choose the subaccount to which you want to deploy your service and application.

    Choose Subaccount
  5. Choose Cloud Foundry Spaces in the left-hand pane.

  6. Choose the space where you already have the SAP HANA Cloud service instance.

  7. Choose SAP HANA Cloud in the left-hand pane.

  8. Choose Manage SAP HANA Cloud in the upper right corner.

  9. Sign in with your SAP BTP Cockpit username/email.

    The SAP HANA Cloud Central cockpit opens.

  10. Choose an organization and again choose the space where you have the SAP HANA Cloud service instance.

    SAP HANA Cloud cockpit
  11. Choose your service instance.

  12. Choose Create Mapping.

  13. Choose the Org ID and Space ID where you want to deploy the application.

  14. Choose Add.

  1. Go to your SAP BTP cockpit by using one of the following links, depending on the landscape you want to use.

    https://account.hana.ondemand.com/

  2. Enter your Global Account.

  3. Choose Account Explorer.

  4. In the Subaccounts tab, choose the subaccount to which you want to deploy your service and application.

    Choose Subaccount
  5. Choose Cloud Foundry Spaces in the left-hand pane.

  6. Choose the space where you already have the SAP HANA Cloud service instance.

  7. Choose SAP HANA Cloud in the left-hand pane.

  8. Choose Manage SAP HANA Cloud in the upper right corner.

  9. Sign in with your SAP BTP Cockpit username/email.

    The SAP HANA Cloud Central cockpit opens.

  10. Choose an organization and again choose the space where you have the SAP HANA Cloud service instance.

    SAP HANA Cloud cockpit
  11. Choose your service instance.

  12. Choose Create Mapping.

  13. Choose the Org ID and Space ID where you want to deploy the application.

  14. Choose Add.

Log on to answer question

Step 4: Create an SAP HANA Cloud service instance
  1. Go to your SAP BTP cockpit by using one of the following links, depending on the landscape you want to use.

    https://cockpit.hanatrial.ondemand.com/

  2. Enter your Global Account.

  3. Choose Account Explorer.

  4. In the Subaccounts tab, choose the subaccount to which you want to deploy your service and application.

    Choose Subaccount
  5. Choose Cloud Foundry Spaces in the left-hand pane.

  6. Choose the Space that you want to deploy to.

    SAP HANA Cloud
  7. Choose SAP HANA Cloud in the left-hand pane.

    SAP HANA Cloud
  8. Choose Create SAP HANA database.

  9. Sign in with your SAP BTP Cockpit username/email.

  10. Choose SAP HANA Cloud, SAP HANA Database and choose Next Step.

    Create SAP HANA Cloud: Step 1
  11. The Organization and Space will be selected. Enter the Instance Name cpapp.

    Create SAP HANA Cloud: Step 2a
  12. Enter a password for DBADMIN in Administrator Password and Confirm Administrator Password.

    Create SAP HANA Cloud: Step 2b
  13. Choose Next Step. The default settings should be sufficient for the tutorial application.

    Create SAP HANA Cloud: Step 3
  14. Choose Next Step.

  15. In the Availability Zone field, leave the default setting Assign Automatically unchanged and choose Next Step.

  16. Choose Allow only BTP IP addresses.

    Create SAP HANA Cloud: Step 4

    Do not create a Data Lake. It’s useful for ingesting, storing and analyzing high volumes of data but you don’t needed it for the tutorial application.

  17. Choose Review and Create to review your HANA Cloud instance configuration and choose Create Instance.

    You can also copy the configuration so you can create a similar instance or cancel the creation and start from the beginning.

    The creation of the database instance can take some minutes to complete. The final result looks like this in SAP BTP cockpit:

    SAP HANA Cloud Instance Created

    Your SAP HANA Cloud service instance will be automatically stopped overnight, according to the server region time zone. That means you need to restart your instance every day before you start working with it.

  1. Go to your SAP BTP cockpit by using one of the following links, depending on the landscape you want to use.

    https://account.hana.ondemand.com/

  2. Enter your Global Account.

  3. Choose Account Explorer.

  4. In the Subaccounts tab, choose the subaccount to which you want to deploy your service and application.

    Choose Subaccount
  5. Choose Cloud Foundry Spaces in the left-hand pane.

  6. Choose the Space that you want to deploy to.

    SAP HANA Cloud
  7. Choose SAP HANA Cloud in the left-hand pane.

    SAP HANA Cloud
  8. Choose Create SAP HANA database.

  9. Sign in with your SAP BTP Cockpit username/email.

  10. Choose SAP HANA Cloud, SAP HANA Database and choose Next Step.

    Create SAP HANA Cloud: Step 1
  11. The Organization and Space will be selected. Enter the Instance Name cpapp.

    Create SAP HANA Cloud: Step 2a
  12. Enter a password for DBADMIN in Administrator Password and Confirm Administrator Password.

    Create SAP HANA Cloud: Step 2b
  13. Choose Next Step. The default settings should be sufficient for the tutorial application.

    Create SAP HANA Cloud: Step 3
  14. Choose Next Step.

  15. In the Availability Zone field, leave the default setting Assign Automatically unchanged and choose Next Step.

  16. Choose Allow only BTP IP addresses.

    Create SAP HANA Cloud: Step 4

    Do not create a Data Lake. It’s useful for ingesting, storing and analyzing high volumes of data but you don’t needed it for the tutorial application.

  17. Choose Review and Create to review your HANA Cloud instance configuration and choose Create Instance.

    You can also copy the configuration so you can create a similar instance or cancel the creation and start from the beginning.

    The creation of the database instance can take some minutes to complete. The final result looks like this in SAP BTP cockpit:

    SAP HANA Cloud Instance Created

    Your SAP HANA Cloud service instance will be automatically stopped overnight, according to the server region time zone. That means you need to restart your instance every day before you start working with it.

Log on to answer question

The result of this tutorial can be found in the hana-cloud-setup branch.


Next Steps

Back to top