Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 

Prerequisites

Before you deploy your sample SAP Cloud Application Programming Model (CAP) app to SAP Business Technology Platform (BTP), ensure you have the following in place:

  1. BTP Account (Trial or Paid)
    You’ll need a BTP global account with a sub-account in the Cloud Foundry environment.

    • You can register for a free trial at the SAP website. BTP Trial

  2. Development Environment: SAP Business Application Studio or VS Code alternative + CLI tools & MBT 

    • If using Business Application Studio, follow SAP’s onboarding tutorial: “Set Up SAP Business Application Studio for Development”. Setup Business Application Studio

    • Otherwise you may use VS Code (or another IDE) with the following command-line tools:

      • Cloud Foundry CLI (cf CLI) – Install instructions here: CF CLI

      • Cloud MTA Build Tool (mbt) – Install and usage information here: MBT

    • Make sure you’ve configured your CLI to target your BTP subaccount/space (cf api, cf login, cf target). CLI API & Login

  3. HANA DB Instance (or Trial) for your DB
    Your CAP app will typically require a database backend.

    • Get started with the HANA Cloud trial using this tutorial:  HANA Trial

After completing all the prerequisites we can start build the application

Start a Terminal in you IDE of choice

generate the project

cds init bookshop --add sample

Add hana, mta, xsuaa and workzone

cds add hana,mta,xsuaa,workzone --for production

run npm install in all the applications, the sample bookshop has 2 Fiori Elements applications that we'll need to run npm i in their folder as well as in the project folder

cd app/admin-books
npm i
cd ../browse
npm i
cd ../..
npm i

now we can build the project

mbt build

if all goes well then we'll get an mtar file inside the mta_archive folder

before deploying we'll need to make sure that we're logged into cloud foundry

cf login

now we deploy

cf deploy mta_archives/*.mtar

and that is it you should now have a CAP service and 2 fiori elements applications deployed on BTP.

You can then create an instance of Work Zone and surface the application through it or build applications that use the cap application as its backend (This is what I intend to do in upcoming blogs)

3 Comments
Labels in this area