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: 
binil_sivan2
Discoverer

This blog delineates the process of embedding a Fiori app within another Fiori app deployed in SAP Build Work Zone, standard edition. Here, for clarity, "Fiori apps" refers specifically to applications developed using SAPUI5.

Libraries, Fragments, and Component Containers stand out as the primary options for code reuse in SAPUI5-based Fiori applications. When considering the embedding of one Fiori app (which may be independently deployed) within another Fiori app, the optimal approach is to employ Component Containers, given that Fiori apps are built upon Components.

A Component Container serves as a receptacle for a component, as the name implies. It facilitates the loading of the child Fiori app based on a Component to a designated position within the Parent Fiori App.

When these apps are deployed within the SAP backend as BSP applications, no additional processing is necessary beyond linking both apps using relative paths during the instantiation of the Component Container. The backend system automatically resolves the path and identifies the correct app to load. However, if these apps are independently deployed within the BTP Cloud Foundry environment, and managed descriptors are utilized to register them with Build Work Zone-based portals, the parent app cannot load the child app solely using the relative path.

The pivotal step occurs within the mta.yaml file of the Child App.

Upon deployment of a Fiori App in Cloud Foundry, three service instances are generated by default: Destination Service, App Repository Service, and Authorization & Trust Management Service.

binil_sivan2_0-1708347325891.png

It is essential for the child app to reuse destination service of the parent app to enable resolution of Component Container paths.

mta.yaml file of the Child App needs to be adapted so that it can reuse the destination service of the Parent App.

Modules Section of mta.yaml of Child App:

binil_sivan2_1-1708347407191.png

Resources Section of mta.yaml of Child App:

binil_sivan2_2-1708347445934.png

By configuring these settings, the Component Container specified in the parent app will successfully load the Component from the child app and embed the child App into the Parent App.

Screenshots of an app which uses child app embedding on parent app is given below:

Parent App before embedding:

binil_sivan2_3-1708347620806.png

Child App launched independently:

binil_sivan2_4-1708347672894.png

Parent App with embedding enabled:

binil_sivan2_5-1708347720363.png

 

 

 

 

 

 

 

 

 

Labels in this area