SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Develop the SAP Fiori Elements Application for the SAP SuccessFactors Extension

In this phase of the development you will create the extension UI through a Fiori Elements application.

Overview

🎓 beginner 15 min. SAP Cloud Application Programming ModelBeginnerSAP BTP Cloud Foundry Environment

You will learn

  • โœ”How to add MTA configuration to the project structure
  • โœ”How to add AppRouter configuration to the MTA file
  • โœ”How to create the Fiori Elements app and set it up into the MTA file
  • โœ”How to launch the Fiori Elements app
  • โœ”How to add additional configuration to the MTA file, which is relevant for Cloud Foundry deployment
Unknown U Unknown November 1, 2022
Created by September 28, 2022
Contributors

Prerequisites

Steps

Step 1 Add MTA configuration to the project
โ€”

To deploy your application to Cloud Foundry on SAP BTP, you are going to use the MTA (Multi-Target Application) approach, which facilitates the deployment as it pushes everything at once to the platform: UI application, backend service, database, service instances creation and binding, etc.

As you have already done almost everything that is required to setup your project for deployment following the previous tutorials, you can now add the MTA configuration to it, which will be described using YAML standard in a file named mta.yaml.

Fortunately, once again, CAP can add that file automatically for you, populating it with all that has been configured in the project so far. But, before you do it, just open the package.json file and change the application description as demonstrated below, so it can be reflected in the mta.yaml file:

Figure 1 โ€“ Adjust project description
Figure 1 โ€“ Adjust project description

In the Terminal type cds add mta and press Enter (don’t forget to press CTRL+C to terminate cds watch if it was previously running).

Figure 2 โ€“ Add MTA Configuration
Figure 2 โ€“ Add MTA Configuration

On the left-hand pane, click on the mta.yaml file to open it.

Figure 3 โ€“ mta.yaml contents
Figure 3 โ€“ mta.yaml contents

If you explore the file, you’ll notice that it contains the descriptors for the server module, which is the actual CAP service, with a dependency pointing to the service instance of the HDI container (described in the resources section) and a sidecar module (suffixed -db-deployer), which is an auxiliary app that runs only during deployment and takes care of the creation/update of the HANA database artifacts into the HDI container (notice that it also depends on the HDI service instance).

All of that has been extracted from the CAP configuration (cds.requires section) in the package.json file.

The next step is to create an approuter module with a unique route name (in the context of the subaccount region) to take care of the authentication flow when the application is accessed from the UI in SAP BTP as well as other stuff, such as mapping the backend service route to the same domain as the HTML5 application as a destination to avoid problems like CORS (Cross-Origin Resource Sharing) issues.

Step 2 Add AppRouter configuration to the MTA file
+
Step 3 Create the Fiori elements app as an MTA Module
+
Step 4 Launch the Fiori elements app
+
Step 5 Add additional MTA configuration
+
Step 6 Check your knowledge
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Add MTA configuration to the project 2. Add AppRouter configuration to the MTA file 3. Create the Fiori elements app as an MTA Module 4. Launch the Fiori elements app 5. Add additional MTA configuration 6. Check your knowledge

Learn more →