Skip to Content

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

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
raz-kornRaz KornDecember 10, 2024
Created by
smahati
December 10, 2024
Contributors
smahati

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 of SAP Business Application Studio and click the Play icon. When the dev space is in state RUNNING, click on the dev space name.

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

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



      build mta

      The build process creates a multi-target 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

    This step mentions two dev space states. Which of the following states can a dev space have?

  • Step 2

    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 left side bar, select the Hamburger icon | View | Command Palette… 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. A Cloud Foundry Sign In tab opens in SAP Business Application Studio. Select your API endpoint.

      Cloud Foundry Login dialog

      If you don’t know your API endpoint open the SAP Business Technology Platform Cockpit and navigate to your subaccount. Click on Overview on the left and you can see the URL of the API endpoint under Cloud Foundry Environment.

      Cloud Foundry Login dialog
    4. Select authentication method as SSO Passcode.

      Choose the link Open a new browser page to generate your SSO passcode.

      Sign in with the appropriate identity provider, and copy the Temporary Authentication Code.

      Enter the Temporary Authentication Code as SSO Passcode.

      Choose Sign in.

      Cloud Foundry Login dialog
    5. Select the Cloud Foundry organization, Cloud Foundry Space, and click Apply.

      If the Cloud Foundry Target dropdowns are empty you need to change the default Cloud Foundry Endpoint to the one of your subaccount (see previous step). To obtain your subaccount’s Cloud Foundry Endpoint open the SAP Business Technology Platform Cockpit and navigate to your subaccount. Click on Overview on the left and you can see the URL of the API endpoint under Cloud Foundry Environment.

      If the dropdown for Select Cloud Foundry Space is empty, check if you have created the needed Cloud Foundry Space as described in the section Create your Trial Space in Setting Up Your Trial Account.

      Cloud Foundry Login dialog

      A notification You have been logged in. appears at the bottom-right of your screen.

      Logged in to CF

    This tutorial shows how to use a template to start SAP Fiori app development. What other option is available in SAP Business Application Studio to create an SAP Fiori app?

  • Step 3

    Deploy your application to SAP BTP, Cloud Foundry environment.

    1. In the Explorer pane under the folder mta_archives, 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

      If you have issues with the deployment, check out the SAP Business Application Guided Answers for troubleshooting.

    What is ES5?

  • Step 4
    1. Go back to your SAP BTP Trial account and click the button Go To Your Trial Account.
    deploy mtar
    1. Click the trial tile to navigate to your trial subaccount in the SAP BTP cockpit.
    deploy mtar
    1. Select HTML5 Applications in the left navigation panel.
    deploy mtar
    1. You will see a list of all HTML5 Application you deployed up to now. Select the one you deployed in the previous step.
    deploy mtar

    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.


    To where is your application deployed?

Back to top