![](/cvo_files/imgs_sap_abap/logos/logo_cvo_academy_it.png)
✒️SAP Fiori La creación de un proyecto multitarget
SAP Fiori La creación de un proyecto multitarget
![SAP Fiori La creación de un proyecto multitarget SAP Fiori La creación de un proyecto multitarget](https://www.cvosoft.com/cvo_files/imgs_sap_abap/og-images/372.jpg)
1. The Concept of MTA
Multi-Target Application (MTA)
A Multi-Target Application (MTA) consists of various parts (modules), created with different technologies and deployed in different environments, but sharing a common lifecycle. It serves as the descriptor for each Cloud Foundry project, used to define the elements and dependencies of an MTA.
- Descriptor Features:
- Defines microservices and their runtime.
- Declares backup services and links them to microservices.
- Includes resources and types not part of the MTA but required during runtime or implementation.
- Lists dependencies between modules and resources.
- Contains technical configuration parameters, such as URL and application settings.
- Defines environment variables.
Steps to Create an MTA Project:
- Open SAP Business Application Studio (BAS) by logging into your Cloud Foundry subaccount and navigating to the subscription section.
- Access BAS, which is available at the subaccount level.
2. Creating an MTA Project Using a Standalone Approuter
2.1 Creating a New MTA Project
- Use the command palette by pressing Ctrl + Shift + P or accessing it from the View menu.
- Select Open Template Wizard and choose Basic Multitarget Application.
- Name the project and click Finish to create the mta.yaml file.
2.2 Configuring the Application with an Approuter
- Right-click on the mta.yaml file and select Create MTA Module from Template.
- Choose Approuter configuration and click START.
- Complete the Standalone Approuter configuration without setting up authorization immediately.
Purpose of Approuter:
Redirects initial calls to obtain the JSON Web Token from the XSUAA service.
Manages calls to various services in the project.
2.3 Generating a SAP Fiori Application
- Create a new project using New Project from template and select SAP Fiori application.
- Choose SAPUI5 freestyle for flexibility in design and functionality.
- Avoid linking data sources initially and select the existing AppFiori project directory for integration.
2.4 Generated Files and Unit Testing
- Add new modules to the mta.yaml file.
- Update the index.html to use the online library source for SAPUI5.
- Create and configure unit tests in the SAP BTP environment.
2.5 Deploying to Cloud Foundry
- Build the mta.yaml file and log into the SAP BTP environment using cf login.
- Deploy the generated AppFiori_0.0.1.mtar file to Cloud Foundry.
- Verify the deployment by accessing the project in the SAP Cloud environment.
3. Creating an MTA Project Using a Managed Approuter
Benefits of Managed Approuter
- Simplifies development and deployment.
- Reduces the total cost of ownership by eliminating manual updates.
- Ensures consistent and predictable performance.
Steps for Using Managed Approuter
- Use New project from template and select SAP Fiori Aplication.
- Choose SAP Fiori elements and List Report Object Page.
- Configure the project with the SAP BTP destination and the OData service GWSAMPLE_BASIC.
- Define the entity and navigation, and enter the project attributes.
Advantages of SAP Fiori Elements
- Consistent design following SAP Fiori principles.
- Significant reduction in SAPUI5 code and maintenance costs.
4. Using Yeoman for Generating Projects
Introduction to Yeoman
Yeoman is a scaffolding tool that helps developers to quickly set up a new project with a well-defined structure. It provides generators to create boilerplate code for various frameworks and libraries, including SAP Fiori applications.
Setting Up Yeoman
- Install Node.js and npm: Yeoman requires Node.js and npm (Node Package Manager) to be installed. Download and install Node.js from the official Node.js website.
- Install Yeoman: Open a terminal or command prompt and install Yeoman globally using npm.
npm install -g yo
- Install SAP Fiori Tools for Yeoman: Install the specific generator for SAP Fiori development.
npm install -g generator-easy-ui5
Generating a New SAP Fiori Project
- Run the Generator: Open a terminal or command prompt in the directory where you want to create your project and run the Yeoman generator.
yo easy-ui5
- Follow the Prompts: The generator will prompt you for details such as the project name, namespace, and template to use. Provide the required information to generate the project structure.
- Project Structure: The generated project will have a predefined structure with folders for web app, test, and configuration files.
5. Using Different IDEs for SAP Fiori Development
SAP Fiori development can be done using various Integrated Development Environments (IDEs). Here are some commonly used IDEs:
SAP Business Application Studio (BAS)
SAP Business Application Studio (BAS) is a powerful, web-based IDE tailored for SAP development. It provides integrated tools and services for developing SAP Fiori applications.
Advantages:
- Cloud-based: Accessible from anywhere with an internet connection.
- Pre-configured Environment: Comes with pre-installed tools and extensions for SAP development.
- Integration: Seamless integration with SAP services and environments.
Steps to Use BAS:
- Access BAS: Open BAS from your SAP Cloud Platform account.
- Create a New Project: Use the command palette or project wizard to create a new SAP Fiori project.
- Develop and Test: Write your code, test the application using the integrated test tools, and deploy directly to Cloud Foundry.
Visual Studio Code (VS Code)
Visual Studio Code is a popular, lightweight code editor that can be customized with extensions for SAP Fiori development.
Advantages:
- Extensibility: Large ecosystem of extensions to add functionality.
- Performance: Lightweight and fast, suitable for various development tasks.
- Customization: Highly customizable interface and workflows.
Steps to Use VS Code:
- Install VS Code: Download and install Visual Studio Code from the official VS Code website.
- Install SAP Extensions: Install relevant extensions like the SAP Fiori tools extension pack.
- Create a New Project: Use the command palette or Yeoman generator to scaffold a new SAP Fiori project.
- Develop and Test: Write code, test, and debug using VS Code’s integrated tools and extensions.
 
 
 
Sobre el autor
Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor en SAP Fiori.
Jaime Eduardo Gomez Arango
Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C
✒️Autor de: 149 Publicaciones Académicas
🎓Cursando Actualmente: Consultor en SAP Fiori
🎓Egresado de los módulos:
Disponibilidad Laboral: FullTime
Presentación:
Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.
Certificación Académica de Jaime Gomez