Skip to Content
0
Sep 10, 2020 at 08:59 AM

How to read data from getOwnerCompoent model

77 Views

Hi ,

I have created a sapui5 application and added a oData service to it by givine the model name as 'mainService' . I have multiple entities that are exposed in the oData service.

how to get the data from using the model inside the application.

I am trying out with the below code:

this.getOwnerComponent('mainService').getData()

this returns null

I want to get the data of each entity and do some action based on the data. I don't want to go for model.read and wait for the success call back as there is much delay to reach success call. Can any one help how to get this done.