cancel
Showing results for 
Search instead for 
Did you mean: 

MDK Read Model data

horiii
Explorer
0 Kudos
433

Hello experts,

There is an alternative in MDK to take the data and read the data from backend.

I was trying like this but didn't work. Have you any idea?

Thanks

const setData = () => { const oModel = new sap.ui.model.odata.ODataModel("myServiceURL"); oModel.read(`/Products?$top=${pageSize}&$skip=${num}`, null, null, true, (oData) => { const oODataJSONModel = new sap.ui.model.json.JSONModel(); oODataJSONModel.setData(oData); view.setModel(oODataJSONModel, "getData"); });
View Entire Topic
robinkuck
Product and Topic Expert
Product and Topic Expert

Hi Horatiu-Paul,

yes you can use the clientAPI.read method. Check out this example: https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/features/backen...