In this exercise, you will deploy your SAP Cloud Application Programming Model (CAP) project to SAP Business Technology Platform (BTP), Cloud Foundry environment using SAP HANA Cloud service.
-
Launch the SAP Business Application Studio or access it from https://account.hanatrial.ondemand.com.
-
Switch your workspace to the
projects
folder. Click on the Explorer icon and click Open Folder. -
Select the
projects
folder if not already selected and click OK.The BAS page reloads in the browser and you will now see the PROJECTS folder is opened as the workspace.
Before you deploy the CAP project, please make sure that your HANA cloud instance is up and running.
-
Navigate to
Terminal
menu |New Terminal
. -
Execute below command to create a Cloud Foundry session. After successful login select your org and space.
cf login
OR execute below command if your user is configured with multi factor authentication. Enter your temporary authentication code from the passcode link.
cf login --sso
-
Execute below command setting the current path to your CAP project.
cd teched2022-AD181/exercises/ex1/ESPM-main
-
Execute below script to deploy CAP project to SAP BTP.
sh deployCFMTA.sh
Once deployment process is finished, you will see a message about
ESPM-srv
application availability.If you see
Error retrieving MTA: Could not find MTA ESPM_1.0.0.mtar
in terminal window, please make sure that you have added the required CDS Graphical Modeler and CAP Tools as additional SAP Extensions in your dev space. Please check this pre-requisite.The highlighted URL in above screenshot is your service endpoint. Copy it and paste in a new tab in your browser.
Service Endpoints list down various path to access information about e.g., service document, service metadata document and available entities.
In order to find the required destination for Mobile development, click on the
/service/ESPM
path.The resulted page displays list of Entity sets of your OData service.
Keep a note of this URL as you will configure this endpoint as a Destination in Mobile Services.
If you see the output in Raw format, you may install any
JSON formatter
extension in your browser to get a parsed output in more structured way.
You've now generated an OData service based on SAP Cloud Programming Model (CAP).
Continue to - Exercise 2 - Create an application from the MDK template