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
- 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.
- Click on Create Dev Space to create a new development environment for your project.
- Provide the following inputs to the wizard:
- Give your Development Space the Name HCX.
- Select SAP HANA Native Application as application kind. You do not need to add any Additional SAP Extension.
- Click on Create Dev Space
- Your HCX Dev Space is being created right now. It takes some minutes to switch from STARTING to RUNNING.
- 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.
Customize the default BAS layout
For a better orientation in BAS we adapt the default layout to our needs.
- Click on the Customize Layout… Icon on the top right corner.
-
- Change the Visibility of the Menu Bar to true by clicking on it.
- Then Close the Customize Layout wizard by clicking the X.
- Click on the icon to open the Explorer.
- Right-click on the Outline tab
- Deselect the Outline
- Repeat the process by right-clicking and deselecting the Timeline
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.
- Click on the Cloud Foundry Icon on the Activity Bar on the left side.
- Expand Services
- Click on the Login to Cloud Foundry Icon
- Provide the following values to the Cloud Foundry Sign-In wizard:
- Cloud Foundry Endpoint: {placeholder|cfapi}
- Authentication method: SSO Passcode
- 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:
12
Cloud Foundry Endpoint: {placeholder|cfapi}
- Click in the popup on Open
-
Provide the following input to the identity provider wizard:
- {placeholder|idpplatform}
- Click on Sign in with alternative identity provider
If you are asked for credentials, please use the one you already received for the workshop.
- Click on the icon to copy the Temporary Authentication Code
-
- Return to BAS and paste the Temporary Authentication Code into the SSO Passcode field
- Click on Sign in
- Select the following options in the Cloud Foundry Target wizard:
- Cloud Foundry Organization: Select the Cloud Foundry Organization that is also auto-populated
- Cloud Foundry Space: AC_HANA_DEVELOPMENT
- Then click on Apply
- You set your Cloud Foundry target successfully.
Import the preconfigured project
You will import a HDI project prepared by us into BAS and open it up.
- Download the following file to your file system
HCX_V2.zip
-
- Click File in the Menu Bar
- Click on Open Folder…
-
- Select projects
- Conform the selection with OK
- Now click on Import and upload the HCX_V2.zip file that you have downloaded before
- Click Open in New Workspace
Open the project
- 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.
SAP HANA PROJECTS tab
The SAP HANA PROJECTS tab allows you to deploy the created design-time objects to the SAP HANA Cloud runtime.
- 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.
Bind SAP HDI Container
- Click on the plug symbol next to the hdi_db to create an HDI Container.
- The command line at the top should pop up. Click on Bind to an HDI container
- Click on + Create a new service instance
- Paste in HCX_V2-hdidb-{link|userId} and press Enter
- Building your HDI container initially takes some minutes.
- If the following pop up comes up with an error message:
- 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.
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.
- 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).
- Select Bind to the ‘HCX_REMOTE_SOURCE_GRANTOR_UPS’ service
- If successful, you should see the following message:
Deploy the project to HANA Cloud
- Click on the rocket symbol to deploy the design-time objects to the SAP HANA Cloud runtime.
- 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.
Open the SAP HANA Database Explorer
- Click on Open HDI container
- Click on Open
-
Provide the following input to the identity provider wizard:
- {placeholder|idpplatform}
- Click on Sign in with alternative identity provider
If you are asked for credentials, please use the one you already received for the workshop.
- Click on AUTHORIZE to open the application.
- 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.
Further information