Hi all,
we are facing a problem while trying to consume oData with SAPUI5. After we have deployed the application on our ABAP server we are getting the following error when accessing the oData
The problem seems to be that the code adds "?$skip=0&$top=100&$inlinecount=allpages" to the URL which is then not working anymore. With '&' instead of the '?' we could access the data without a problem.
Our local version is working fine with the following code:
App.controller.js
var xModel = new sap.ui.model.odata.ODataModel("proxy/http/server:8000/sap/opu/odata/sap/ZXFT_UI5_SRM_CYCLE_NODE_ITEM_SRV/", false); view.setModel(xModel);
MasterPage.view.xml
<List id="list" items="{/CycleNodeItems?$filter=CreatedAt%20ge%20datetime%272014-03-10T12:01:03%27}"> <ObjectListItem title="{DescrCycleItem}" type= "Active" number="" numberUnit ="" numberState = "Success" description="Description placeholder" press="onListSelect" > <attributes> <ObjectAttribute text="{CreatedAt}" /> </attributes> </ObjectListItem> </List>
But with the deployed version and the adapted code:
App.controller.js
var xModel = new sap.ui.model.odata.ODataModel("http://server:8000/sap/opu/odata/sap/ZXFT_UI5_SRM_CYCLE_NODE_ITEM_SRV/", false); view.setModel(xModel);
MasterPage.view.xml
<List id="list" items="{/CycleNodeItems?$filter=CreatedAt%20ge%20datetime%272014-03-10T12:01:03%27}"> <ObjectListItem title="{DescrCycleItem}" type= "Active" number="" numberUnit ="" numberState = "Success" description="Description placeholder" press="onListSelect" > <attributes> <ObjectAttribute text="{CreatedAt}" /> </attributes> </ObjectListItem> </List>
we are getting the error as described in the beginning.
Any idea how to solve this issue?
Many thanks in advance.