Project Setup

Project Setup

Access SAP Business Application Studio

To realize database projects we mainly use the SAP Businness Application Studio (BAS for short). It is recommended to use the incognito tab of one of the following three browsers with the latest version.

  • Google Chrome
  • Mozilla Firefox
  • Microsoft Edge
  1. Click Lobby to open the SAP Business Application Studio.

Create Development Space in BAS

Before you can start your project you must first create a Development Space within BAS. A dev space is a development environment with the tools, capabilities, and resources needed for developing your application. A dev space provides tailored tools and pre-installed runtimes for your business scenario. This simplifies and saves time in setting up your development environment and allows you to efficiently develop, test, build, and run your solution locally or in the cloud.

  1. Click on Create Dev Space to create a new development environment for your project.

img
  1. Provide the following inputs to the wizard:
    1. Give your Development Space the Name HCX.
    2. Select SAP HANA Native Application as application kind. You do not need to add any Additional SAP Extension.
    3. Click on Create Dev Space

img
  1. Your HCX Dev Space is being created right now. It takes some minutes to switch from STARTING to RUNNING.

img
  1. Now that your space is running click on the Name HCX to open it. Your BAS Development Editor opens, in which you create your projects.

img

Customize the default BAS layout

For a better orientation in BAS we adapt the default layout to our needs.

  1. Click on the Customize Layout… Icon on the top right corner.

img
    1. Change the Visibility of the Menu Bar to true by clicking on it.
    2. Then Close the Customize Layout wizard by clicking the X.

img
  1. Click on the icon to open the Explorer.

img
  1. Right-click on the Outline tab

img
  1. Deselect the Outline

img
  1. Repeat the process by right-clicking and deselecting the Timeline

img

Set Cloud Foundry Endpoint

You will connect your development space in SAP BAS to Cloud Foundry, so we can later deploy the project to the SAP HANA Cloud running on the Cloud Foundry environment.

  1. Click on the Cloud Foundry Icon on the Activity Bar on the left side.

img
  1. Expand Services

img
  1. Click on the Login to Cloud Foundry Icon

img
  1. Provide the following values to the Cloud Foundry Sign-In wizard:
    1. Cloud Foundry Endpoint: {placeholder|cfapi}
    2. Authentication method: SSO Passcode
    3. Click on Open a new browser page to generate your SSO passcode

it is very important that the Cloud Foundry API Endpoint is correctly entered:

Code Snippet
12
Cloud Foundry Endpoint: {placeholder|cfapi}

img
  1. Click in the popup on Open

img
  1. Provide the following input to the identity provider wizard:

    1. {placeholder|idpplatform}
    2. Click on Sign in with alternative identity provider

    If you are asked for credentials, please use the one you already received for the workshop.

img
  1. Click on the icon to copy the Temporary Authentication Code

img
    1. Return to BAS and paste the Temporary Authentication Code into the SSO Passcode field
    2. Click on Sign in

img
  1. Select the following options in the Cloud Foundry Target wizard:
    1. Cloud Foundry Organization: Select the Cloud Foundry Organization that is also auto-populated
    2. Cloud Foundry Space: AC_HANA_DEVELOPMENT
    3. Then click on Apply

img
  1. You set your Cloud Foundry target successfully.

img

Import the preconfigured project

You will import a HDI project prepared by us into BAS and open it up.

  1. Download the following file to your file system

HCX_V2.zip

    1. Click File in the Menu Bar
    2. Click on Open Folder…

img
    1. Select projects
    2. Conform the selection with OK

img
  1. Now click on Import and upload the HCX_V2.zip file that you have downloaded before

img
  1. Click Open in New Workspace

img

Open the project

  1. On the left, you should now see the imported project. In this area, you design your database objects. Click on the arrow next to the project name HCX_V2 to expand the folder structure. Expand also the folder db and after it the folder src. It should look like this in the end.

img

SAP HANA PROJECTS tab

The SAP HANA PROJECTS tab allows you to deploy the created design-time objects to the SAP HANA Cloud runtime.

  1. Take the SAP HANA Projects tab, located at the bottom of your screen, expand, and pull it up to the middle of the screen. For a better overview, expand the HCX_V2/db. It should look like this in the end.

img

Bind SAP HDI Container

  1. Click on the plug symbol next to the hdi_db to create an HDI Container.

img
  1. The command line at the top should pop up. Click on Bind to an HDI container

img
  1. Click on + Create a new service instance

img
  1. Paste in HCX_V2-hdidb-{link|userId} and press Enter

img
  1. Building your HDI container initially takes some minutes.

img
  1. If the following pop up comes up with an error message:

img
  1. Click again on the plug symbol next to the hdi_db to bind the previously created HDI Container again. Select Bind to an HDI container and type in {link|userId} to find your HDI container and select it. Then click on Enable & do not ask again.

img

Bind existing User-Provided Service instance

To access data that resides outside of the HDI Container and access remote sources that are already created, we will need to use a user-provided service.

  1. Click on the Plug-Symbol on the cross-container-service-1 in the bottom part to bind this service (if you do not see the Plug-Symbol, hover over it).

img
  1. Select Bind to the ‘HCX_REMOTE_SOURCE_GRANTOR_UPS’ service

img
  1. If successful, you should see the following message:

img

Deploy the project to HANA Cloud

  1. Click on the rocket symbol to deploy the design-time objects to the SAP HANA Cloud runtime.

img
  1. The terminal opens and first of all some needed node modules will be installed. After this is done the deployment to HANA Cloud starts. After this has come to an end you see a massage if the deployment was successful.

img

Open the SAP HANA Database Explorer

  1. Click on Open HDI container

img
  1. Click on Open

img
  1. Provide the following input to the identity provider wizard:

    1. {placeholder|idpplatform}
    2. Click on Sign in with alternative identity provider

    If you are asked for credentials, please use the one you already received for the workshop.

img
  1. Click on AUTHORIZE to open the application.

img
  1. You can see your HDI container in the SAP HANA Cloud runtime. The database objects are organized by their types in a catalog. Leave the Database Explorer tab open and return to BAS.

img

Further information