Skip to Content
avatar image
Former Member

How can I combine two different applications into one in SAPUI5?

Hello everyone,

I am totally new in SAPUI5 and doing an intership now in a company. I want to reuse the view from one application in another application. I have already read so many Q&A and I tried to write some small tests. However, it doesn't work and I still don't understand how it works.

My code is below:







           "sap.ui.demo.wt": "./",

           "": "../test2"}'>



      sap.ui.getCore().attachInit(function () {

         new sap.ui.core.ComponentContainer({

             name: "sap.ui.demo.wt"

      var oComp = sap.ui.getCore().loadLibrary("test2").createComponent({ 
          name: "test2",        

          id: "Comp2",

          settings: {appTitle: "Hello World 2"}        });

         var oCompCont = new sap.ui.core.ComponentContainer("CompCont2", {                 component: oComp




As you can see, I want to add the view from another application with namespace into the current view(application), but it doesn't work. So I think maybe both of the applications don't know each other, because they are totally two separaed applications. So, I tried to change the relationship of those two applications into a parent-son relationship which means I put one of them under the folder of the other one. It's still failed. Should I register the component first? However, I don't know how to register a component from one application. I have read many documents in internet, but they don't have a clear guidelines for us to follow. Have someone maybe an example for me to reference?

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers