SAP MTA Project Layout & Best Practices

Introduction

A Multi-Target Application (SAP MTA) is a package comprised of multiple libraries, application and resource modules. These have been created using different technologies and deployed to different runtimes but have a common life-cycle. You can bundle different modules together, describe them along with their inter-dependencies to other modules, services, and interfaces, and package them in a Multi-Target Application(MTA) .

Technologies and Tools Involved in SAP MTA

Tool/TechnologyPurposeDescription
Hana Data BaseStore Business DataThis can be any database
Java/ Node.jsAdd Business logicIn place of ABAP, business logic will be written here
UI5/FioriUI DesignLike convention Fiori Application, the UI will be developed in same uniform manner
SAP Cloud FoundryMTA DeploymentThe MTA application is deployed in to SAP Cloud Foundry as a mta.yaml file

Default Project Layouts

Files/FoldersDescription
app/all your UI apps go in here; one or more of such in subfolders
srv/all your service definitions and implementations go in here
src/The default location in which you store your design-time database artifacts. If needed, you can create additional subfolders for the same purpose.
/package.jsonyour project descriptor, for example, listing dependencies
/mta.yamlAll the relevant dependencies of the module are defined in the MTA descriptor
srv/cat-service.jsA root file for all your custom event handlers
node_modules/All node modules sit here
node_modules/server.jsthe main .js file (A root file for all your node calls under the Node Module folder)
node_modules/package.jsonAdd your corresponding description and dependencies of Node.js modules
node_modules/index.jsTo maintain a catalogue of all the Node script files and share the same with one place for reference
lib/Created only if XSJS support is enabled for the module. Contains .xsjs (SAP HANA XS JavaScript) source files.
test/Created only if XSJS support is enabled for the module. Contains XSUnit test (.xsjslib) files.
tests/This folder is created for modules without XSJS support. It contains .js test files.

Note: */ denotes a folder and /* signifies a file

 

Prerequisites and Restrictions

We need to consider the following limits for the SAP MTA deployment on SAP Cloud Foundry deploy service:

  • Maximum size of the MTA archive: 4 GB
  • Maximum size of MTA module content: 4 GB
  • Maximum size of MTA resource content: 1 GB
  • Maximum size of MTA descriptors (mtad.yaml and MANIFEST.MF): 1 MB

Best Practises related to SAP MTA:

  • The MTA descriptor is built in the YAML format and has strict syntax requirements. You can edit the descriptor in the text-based code editor, but it is recommend to use the visual MTA editor because it provides input validation.
  • Use the HTML5 Application Repository in a Multitarget Application as it enables to update the HTML5 applications without restarting the application router in the Cloud Foundry environment.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.