Skip to Content

Build and Deploy Your SAP Fiori App to SAP Business Technology Platform

test
0 %
Build and Deploy Your SAP Fiori App to SAP Business Technology Platform
Details

Build and Deploy Your SAP Fiori App to SAP Business Technology Platform

October 4, 2021
Created by
August 27, 2020
Build and deploy your SAP Fiori MTA project to your SAP BTP, Cloud Foundry environment.

You will learn

  • How to build and deploy an application to SAP BTP, Cloud Foundry environment
  • How to configure Cloud Foundry settings in SAP Business Application Studio
  • How to run the deployed app from your space on SAP BTP, Cloud Foundry environment
QR code

Prerequisites

After a period of idle time the dev space is automatically stopped. In order to re-start the dev space open the dev space manager, click the Play icon, and click the dev space.

The period for idle time for Factory accounts is different than for trial accounts.


Step 1: Build the application
  1. In the Explorer pane, right-click the mta.yaml file and select Build MTA Project.



    build mta

    The build process creates a multitarget archive (MTAR) file in your project that packages all the project modules for deployment. You can find the MTAR file in the FioriDemo/mta_archives folder.

    terminal mbt build results
Log on to answer question
Step 2: Set Cloud Foundry preferences

If you are not logged in to a Cloud Foundry space - Before you can deploy your new application, set your Cloud Foundry preferences.

  1. In the menu bar, select View | Find Command to open the command palette.

    Command Palette-Login to CF
  2. Select the command CF: Login to cloud foundry.

    Type cf to filter commands.

    Command Palette-Login to CF
  3. When prompted, select the API endpoint, provide your credentials, organization, and space for your project.

    Logged in to CF
Log on to answer question
Step 3: Deploy the application

Deploy your application to SAP BTP, Cloud Foundry environment.

  1. Right-click the mtar file and select Deploy MTA Archive.

    deploy mtar

    The application deployment to the space you are connected to starts and a notification appears. You can follow the deployment progress in the Task: Deploy console at the bottom of your screen.

  2. Wait for the deployment to complete.

    The deployment process takes a few minutes. When the deployment process is complete, the notifications Process finished. and Terminal will be reused by tasks. will appear at the bottom of the Task: Deploy console.

    deploy success
Log on to answer question
Step 4: Access the application on SAP BTP, Cloud Foundry environment

Run the deployed app on SAP BTP. The steps below show you how to access your new application and run it. You will use CF commands in a terminal for this.

  1. On the menu bar select Terminal | New Terminal.

    open new terminal tab
  2. A new terminal tab is opened.

    new terminal tab opened

    The folder it is opened in is the specific project folder. You can use the following command in the terminal to verify it:

    pwd
    
    pwd
  3. Open the mta.yaml file, and locate the destination service instance name. You can find it in the modules > requires section or in the resources section. In this tutorial it should be FioriDemo-dest-srv.

  4. Execute the following command in the terminal to get the details of the deployed application and its URL:

    cf html5-list -di FioriDemo-dest-srv -u -rt launchpad
    
    details of deployed app on CF

    To find out more about this command execute in the terminal:

    cf help html5-list
    
  5. Press [CTRL] and click the app’s link in the terminal.

    app url

    You can use this URL in any browser to access your new application in your space on SAP BTP, Cloud Foundry environment.

    Here we are using the SAP Launchpad service you configured in an earlier step. It enables organizations to establish a central point of access to SAP (e.g. SAP S/4HANA), custom-built, and third party applications and extensions, both on the cloud and on premise.

  6. The app is running on SAP BTP, Cloud Foundry environment, accessing data from an on-premise backend.

    app running on cf
To where is your application deployed?
×

Congratulations!

With this, you have successfully completed the deployment of your SAP Fiori app to SAP BTP using SAP Business Application Studio.

In this tutorial, you used high productivity tools that are available out-of-the-box in SAP Business Applications Studio that make it easy to build and deploy applications as well as work in the Cloud Foundry environment.


Next Steps

Back to top