Skip to Content
test
0 %
Add a Database to Your Business Application
Details
// Explore More Tutorials

Add a Database to Your Business Application

10/17/2018

Deploy the data model to the SAP HANA database that is associated with your enterprise or trial account.

You will learn

  • How to deploy the data model you created for your business application to the SAP HANA database using SAP Web IDE Full-Stack


Step 1: Add a database

Right-click the db module and choose Build.

Build the db module

Wait for the notification that says the build was successful.

Log on to answer question
Step 2: Enable SAP HANA Database Explorer

To view the generated deployment artifacts, SAP HANA database explorer must be enabled in SAP Web IDE. If you have already enabled the SAP HANA database explorer, go to step 3.

  1. Go to Tools | Preferences | Features.

  2. Search for the database explorer and enable it.

    Enable the database explorer
  3. Choose Save.

Log on to answer question
Step 3: Open the SAP HANA Database Explorer
  1. Go to Tools | Database Explorer.

  2. Expand Cloud Foundry API Endpoint and choose the URL of the Cloud Foundry API for the region, where you created your space.

    It should be https://api.cf.us10.hana.ondemand.com if you followed the suggested values for this tutorial group.

    Connect to the database
  3. Choose Connect.

  4. Choose Yes.

    Add a Database
  5. Select the bookshop database.

    Add the database

    Once connected you can view the different database artifacts. For example, the books table that you have created.

Log on to answer question
Step 4: Fill in initial data
  1. Download the following files:

    Authors.csv

    Books.csv

    Orders.csv

    Data.hdbtabledata

  2. In your workspace, go to bookshop/db/src/, right-click on the src folder and choose Import | File or Project.

  3. Browse to the location where you have saved the Authors.csv file.

  4. In the Import to field, add /csv to the default location and choose OK.

    This creates a /csv folder under /bookshop/db/src and adds the Authors.csv file to that location.

  5. Repeat steps 2 and 3 to add the remaining 3 files to /csv folder.

What is the purpose of the Data.hdbtabledata file?
×
Step 5: Re-build the db module and run the app
  1. Go back to your workspace and right-click the db module and choose build.

    Wait for the notification that says the build was successful.

  2. Right-click the app module and choose Run | Run Configurations.

  3. Choose Run flpSandbox.html and deselect Run with mock data.

  4. Choose Save and Run.

  5. Open your app from the SAP Fiori Launchpad and choose Go.

You now have actual data served automatically.

Log on to answer question

Next Steps

Back to top