SAP MTA Project Layout & Best Practices

Preface – This post is part of the SAP Multi-Target Application (MTA)  series.


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/Technology Purpose Description
Hana Data Base Store Business Data This can be any database
Java/ Node.js Add Business logic In place of ABAP, business logic will be written here
UI5/Fiori UI Design Like convention Fiori Application, the UI will be developed in same uniform manner
SAP Cloud Foundry MTA Deployment The MTA application is deployed in to SAP Cloud Foundry as a mta.yaml file

Default Project Layouts

Files/Folders Description
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.json your project descriptor, for example, listing dependencies
/mta.yaml All the relevant dependencies of the module are defined in the MTA descriptor
srv/cat-service.js A root file for all your custom event handlers
node_modules/ All node modules sit here
node_modules/server.js the main .js file (A root file for all your node calls under the Node Module folder)
node_modules/package.json Add your corresponding description and dependencies of Node.js modules
node_modules/index.js To 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.


  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.

    View all posts


Leave a Reply

Your email address will not be published. Required fields are marked *

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