Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
prashil
Advisor
Advisor
4,646
Hi All,

I have gone through many blog posts which explains developing SAPUI5 Application but lacking details about how to deploy the application to SAP Cloud Platform (SCP).

I struggled and learned it after lots of reading.

I would like to detail out on deploying SAPUI5 application from SAP Business Application Studio.

First thing, we have to make sure the application to test the application from SAP Business Application Studio.

To test your application, you need to make "run configuration", switch to "Run Configuration"

Click on "Add Button" to add a new configuration

Once "Add Button" is clicked, the command pallet should bring the list of all available applications

Select the application for which you would like to test

It will create a new run configuration as shown below


Run Configuration


Next is to click on the "Run" button, this should launch a debug console and expose some ports

There might two different ports exposed, one for the listener and for the app

Make sure you click on Open tab on "Expose and Open"


This should launch a new tab which will run the application

Please note the URL of the test application, it should look like:
https://<cloud-test-url>/<name space><module name>/index.html

https://<>/comtestprashilHTML5Module/index.html

If all works fine and you are ready for deployment on SCP, first connect to your SCP account, subaccount, and space.


Login to CF command pallet


There is also an alternative to login to Cloud Found using the terminal: Open the terminal and type
cf login

 

Once logged in and Org and Space are set, let's build and deploy.

The SCP requires a Multi-Target Application Archive (*.mtar), this will be generated as an artifact of the build process and can be selected to deploy. You have to open the terminal and navigate to your project. Once there, you can run the command:
mbt build -p=cf


 

If the build is successful, you'll see the path of the .mtar file which is ready for deployment.


In the deployment logs, look for application host

Application xxxxxx-approuter" started and available at "xxxxxxxx-approuter.cfapps.sap.hana.ondemand.com"

Now, you can launch your application using the url as:
xxxxxxx-approuter.cfapps.sap.hana.ondemand.com/<name space><module name>/index.html

I would like to highlight that you have to modify the URL with the name space and module name to launch the index file.

Thanks

Prashil Wasnik
8 Comments