Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
hazalbeyazal
Explorer

 INTRODUCTION

A Multitarget application (MTA) is logically a single application comprised of multiple parts created with different technologies, which share the same lifecycle.

The developers of the MTA describe the desired result using the MTA model, which contains MTA modules, MTA resources, and interdependencies between them. Afterward, the SAP Cloud Deployment service validates, orchestrates, and automates the deployment of the MTA, which results in Cloud Foundry applications, services and SAP specific contents. For more information about the Multitarget Application model, see the official The Multitarget Application Model v.2 and the The Multitarget Application Model v.3  specification documents.

https://help.sap.com/docs/btp/sap-business-technology-platform/multitarget-applications-in-cloud-fou...

 

 Prerequisites

   For this example you only need to have a trial account.

     https://account.hana.ondemand.com/#/home/welcome

Steps

1. Create Space on Cloud Foundry for deployment

2. Understanding managed router and standalone router

3. Create and deploy MTA with managed app router.

4. Create  and deploy MTA with standalone app router.


1. Create Space on Cloud Foundry for deployment
   1. Cloud Foundry -Overview

   Cloud Foundry is SAP's platform for delivering cloud-based services. It gives developers the flexibility and freedom to build, deploy and operate applications.
   2. Space -Overview

   It is a structure where users can organize, isolate and manage applications, services and other resources. In order for users to be able to make space enhancements, view and perform many other operations, they must have the roles to perform these operations and be added as space members.

hazalbeyazal_3-1706608053882.png

  1. Create  a Space
  2. hazalbeyazal_4-1706608179722.pngSpace name is entered.hazalbeyazal_5-1706608238901.png
  3. Mta named space is created.hazalbeyazal_6-1706608383073.png
  4. By clicking on the spaces tab you can see information about spaces and their  quota.hazalbeyazal_8-1706609894324.png
  5. Space Quota Management

   Space quota management is done where necessary to allocate, monitor and manage available resources (e.g. memory, storage, etc.).

hazalbeyazal_9-1706609927191.png

2.Understanding managed router and standalone router

  • Managed App Router &  Standalone App Router

  The most important factor to be considered when creating a multi-target application is router confirmation. Basically, if the application will work with SAP services on the same system and will not work with multi-tenant logic, it is continued with a managed router. In other cases, a standalone router is selected.

hazalbeyazal_10-1706609970304.png

https://www.mindsetconsulting.com/sap-approuters-in-a-nutshell/#:~:text=What%20are%20the%20Different...

3. Create MTA with managed app router.

  1. After logging in to business application studio, select MTA from the project templates.hazalbeyazal_11-1706610024750.png
  2. A definition is enteredhazalbeyazal_13-1706610054116.png
  3. The project is automatically generated and the mta.yaml file is defined

    hazalbeyazal_14-1706610661284.png
  4. At this step we need to determine the router type of the application and add a router module.hazalbeyazal_15-1706610743055.png
  5. The information required for approuter is filled in.hazalbeyazal_16-1706610763430.png   With the addition of the router, a module was added to the mta.yaml file and the backend services required for this module were defined. In this case, we can think of this module here as the basic directory of the needs of this project.hazalbeyazal_17-1706610788895.pnghttps://help.sap.com/docs/btp/sap-business-technology-platform/modules#mta-module-types
    The definitions and parameters of the resources are created automatically.hazalbeyazal_18-1706610818906.png   With the update of the mta.yaml file, the xs.securirty.json file was added to the project. Security related definitions such as access controls, authorizations, security policies in this project are madehazalbeyazal_19-1706611007294.pnghttps://help.sap.com/docs/SAP_HANA_PLATFORM/4505d0bdaf4948449b7f7379d24d0f0d/6d3ed64092f748cbac691ab...
  6. Add fiori module.
    Add a new module, this time selecting the SAPUI5 application.hazalbeyazal_20-1706611076428.png
  7. You can select the type of application you want to develop. I choose the basic template because I just want to convey the life cycle of the project's development without going into too much detail.
  8. hazalbeyazal_21-1706611113839.pngData source is selected.hazalbeyazal_22-1706611213960.pnghazalbeyazal_23-1706611273411.png
    Spoiler
     If more than one SAPUI5 module will be created from this application, creating a common namespace for all of them will ensure an organized progress.
    hazalbeyazal_24-1706611301198.png
  9. At this step, the mta.yaml configurations section should be selected yes and flp config should be added so that the module can be built and made visible in the system.hazalbeyazal_25-1706611339014.png
  10. We choose Cloud foundry because we will upload it to BTP.hazalbeyazal_26-1706611364688.png
  11. Fiori launchpad configuration information is entered.hazalbeyazal_27-1706611387281.pngAfter this step is completed, package.json and the fiori module are added to the application file. Unlike what we know, we see that an xs-app.json file is generated in the application folder.https://help.sap.com/docs/SAP_HANA_PLATFORM/4505d0bdaf4948449b7f7379d24d0f0d/5f77e58ec01b46f6b64ee1e...

  12. The project is build.
     hazalbeyazal_28-1706611476459.png
  13. The resulting mtar file is deployed to the system with the following command.
    cf deploy     mta_archives/zmanaged_app_0.0.1.mtar
    After deployment, the resources defined in the mta.yaml file are defined as instances in the spacehazalbeyazal_29-1706611500300.pnghazalbeyazal_30-1706611520500.png  Since we selected managed router, the application will be displayed in the html5 application tab under the subaccount. In this tab, all the apps uploaded to the system with mta are displayed separately. More than one app can be added in a project.hazalbeyazal_31-1706611574499.png
    Spoiler
    NOTE:  If applications are not visible, SAP BUILD WORKZONE must be enabled.

4.Create MTA with standalone app router.

  1. As in the managed router, first select MTA from the project templateshazalbeyazal_0-1706613385097.png
  2. Definition is entered.hazalbeyazal_1-1706613473794.png
  3. An mta file was created as on the managed router.hazalbeyazal_2-1706613502991.png
  4. Select the router type standalone router by adding a new module.hazalbeyazal_3-1706613525597.png  Added xs-securty.json to the project and updated mta.yaml. Unlike the other router type, an app router folder has been added.

    hazalbeyazal_4-1706613543897.png  First, we see that 2 module types are added automatically in mta.yaml.
      One of them is the module that makes connections and adaptations related to the distribution and content of the applications we call application content. This is also added in the managed router and has the same function in both.
       The other is adding a module of the approuter.nodejs type. This module type makes adaptations related to this since all applications will work with the same link extension.hazalbeyazal_7-1706613689098.png    In the Approuter folder we see an xs-app.json file. All modules in this project will be managed through this file.hazalbeyazal_8-1706613715116.png
  5. Add fiori module.

     

    hazalbeyazal_10-1706613750734.png  This time I am proceeding by selecting a list report. the reason I chose it is to show how it will affect other folders when I add a destination. If I had selected the list report in the admin router the same changes would have happened there.hazalbeyazal_11-1706613816018.png
  6. Data source and other informations are entered.hazalbeyazal_12-1706613840120.pnghazalbeyazal_14-1706613884774.pnghazalbeyazal_15-1706613947009.png   Automatic mta.yaml file creation mta.yaml configuration is selected. At this stage, there is no need for flp configuration as all applications will be managed over a single link.

    hazalbeyazal_16-1706613981271.png
  7.  Mta.yaml file is built and uploaded to the system. Unlike other router types, the router is displayed in the application section of the space section. In this section, a new link is created for each different module structure. All html5 applications are routed through the approuter. And applications are not uploaded to the HTML5 application section.hazalbeyazal_17-1706614007773.png
  8. May receive a redirect error when clicking on the resulting link.hazalbeyazal_18-1706614022883.png
  9. The problem is solved by adding the following redirect authorization to the xs.securirty.json filehazalbeyazal_19-1706614056007.png
Labels in this area