In the SAP Cloud Platform you have the ability to create applications that exist out of multiple development languages. You can have for example that contains code that needs to run on HANA, some Java code for generating an OData service and UI5 code. (this is also called microservice) For handling the deployment of a complete project on SCP and run each part of software on the correct runtime, SAP is using MTA projects. MTA will help you for deploying microservice, read all about it here:
https://www.sap.com/documents/2016/06/e2f618e4-757c-0010-82c7-eda71af511fa.html
The SAP Web IDE makes it easy to create MTA applications with focus on CloudFoundry. It will automatically update the yaml file based on the different modules you add to your mta project. Although, you don’t always want to deploy to Cloud Foundry. Some cases you maybe want to deploy to NEO, for example:
- You have an MTA app but don’t have cloud foundry license --> deploy to NEO
- Want to use transport management service (currently in beta and only supports MTA apps on NEO)
- Any other reason why you would like to use MTA and deploy it to NEO ?
In this blog I’ll show you how to create an MTA app in the SAP Web IDE and deploy it to NEO on the AP Cloud Platform
Let’s start creating an MTA app in the SAP Web IDE
Give the project a name:
Fill in an app id
Add an HTML5 Module
Select the basic SAPUI5 Application template
Give a name to the module. I’m using UI as this module will represent the ui.
Give your first view a name:
Add something to the view just to test:
The full MTA project will look like this:
Just one thing, we’re going to deploy this app to NEO and not CF. For some reason, we need to add the version to parameters of the ui module. Otherwise we won’t be able to deploy the MTA app to NEO.
From now on we don’t need the SAP Web IDE anymore, export the project:
Extract the project and add the mtabuilder into the folder. You can download the mta builder from the SAP market, you can find more information here:
https://help.sap.com/viewer/58746c584026430a890170ac4d87d03b/Cloud/en-US/9f778dba93934a80a51166da3ec...
With the MTA builder you can generate an MTAR file for each SCP environment. Use “NEO” behind the “—build-target” parameter to build for NEO. This is the full command
java -jar mtabuilder.JAR --build-target=NEO build
Result will look like this:
If everything went we’ll, you’ll find an mtar file in the project folder. You can use this mtar file to upload your MTA project to NEO.
Go to your NEO account, select solutions and click on Deploy
Select the mtar file and start deploy
When it’s finished, you’ll get the following message:
You’ll see your created app as a tile between your solutions:
Open the solution and go to the ui module
Click on the URL and test your app.
You just deployed an MTA app to SCP NEO.
This was just a basic example of a SAPUI5 app in an MTA app but you could also add Java and HANA coding in the MTA. It will allow you to add code that run on multiple runtimes in one package!
Hope this helped.
Greetings,
Wouter