Build and Deploy Your SAP Fiori App to SAP Business Technology Platform
- 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
- The SAP Fiori dev space is in status
RUNNINGand you opened it.
- You completed Create an SAP Fiori App Using SAP Business Application Studio.
- For the deployment step, additional prerequisites apply. You need to have the following available in the Cloud Foundry space to which you will log on (see Add a New Entitlement to Your Subaccount):
- Cloud Foundry Runtime: 1GB free
- Destination: 1 free
- HTML5 Applications: 1 free
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.
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.
- Step 1
- In the Explorer pane, right-click the
mta.yamlfile and select Build MTA Project.
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
MTARfile in the
- In the Explorer pane, right-click the
- 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.
In the menu bar, select View | Find Command to open the command palette.
Select the command CF: Login to cloud foundry.
cfto filter commands.
A Cloud Foundry Sign In tab opens in SAP Business Application Studio. Select the API endpoint, provide your credentials, and click Sign in.
Select the Cloud Foundry organization, Cloud Foundry space, and click Apply.
You have been logged in. notification appears at the bottom-right of your screen.
- Step 3
Deploy your application to SAP BTP, Cloud Foundry environment.
mtarfile and select Deploy MTA Archive.
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.
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.
- Step 4
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.
On the menu bar select Terminal | New Terminal.
A new terminal tab is opened.
The folder it is opened in is the specific project folder. You can use the following command in the terminal to verify it:Shell/BashCopy
mta.yamlfile, 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
Execute the following command in the terminal to get the details of the deployed application and its URL:Shell/BashCopy
cf html5-list -di FioriDemo-destination-service -u -rt launchpad
To find out more about this command execute in the terminal:Shell/BashCopy
cf help html5-list
Press [CTRL] and click the app’s link in the terminal.
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.
The app is running on SAP BTP, Cloud Foundry environment, accessing data from an on-premise backend.
To where is your application deployed?