Skip to content

Latest commit

 

History

History
97 lines (54 loc) · 3.74 KB

README.md

File metadata and controls

97 lines (54 loc) · 3.74 KB

Exercise 1 - Deploy a CAP Business Service to SAP Business Technology Platform

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.

Exercise 1.1 - Change the workspace to the projects folder

  1. Launch the SAP Business Application Studio or access it from https://account.hanatrial.ondemand.com.

  2. Switch your workspace to the projects folder. Click on the Explorer icon and click Open Folder.

    MDK

  3. Select the projects folder if not already selected and click OK.

    MDK

    The BAS page reloads in the browser and you will now see the PROJECTS folder is opened as the workspace.

    MDK

Exercise 1.2 - Deploy CAP project to SAP Business Technology Platform

Before you deploy the CAP project, please make sure that your HANA cloud instance is up and running. BTP Cockpit

  1. Navigate to Terminal menu | New Terminal.

    MDK

  2. 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

    MDK

    You can get API endpoint from your Cloud Foundry account MDK

  3. Execute below command setting the current path to your CAP project.

    cd teched2022-AD181/exercises/ex1/ESPM-main
  4. Execute below script to deploy CAP project to SAP BTP.

    sh deployCFMTA.sh

    MDK

    Once deployment process is finished, you will see a message about ESPM-srv application availability.

    MDK

    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.

    MDK

    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.

    MDK

    The resulted page displays list of Entity sets of your OData service.

    MDK

    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.

Summary

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