Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can I use multimodel structure?

Hello expert,

As you know I'm developing a project and right now there is a situation to break me. I have 2 different views which are using 2 different models but even their desc are different, when I go to page both of them called same models that is described last.

here is my model create codes but couldnt find how to call different field from diff. models for my tables:

View1:

    aData.clients.push({"id":mname,"parti":lname,"miktar":aname,"olcbirimi":bname,"masyeri":cname,"nedkodu":dname,"harkodu":ename});

      moModel.setData(aData);

var moModel = new sap.ui.model.json.JSONModel();

  moModel.setData(aData);

  sap.ui.getCore().setModel(moModel);

View2:

bData.clients.push({"id":mname,"parti":lname,"miktar":aname,"olcbirimi":bname,"masyeri":cname,"nedkodu":dname,"harkodu":ename});

      boModel.setData(bData);

var moModel = new sap.ui.model.json.JSONModel();

  boModel.setData(bData);

  sap.ui.getCore().setModel(boModel);

Not what you were looking for? View more on this topic or Ask a question