on 08-07-2019 1:28 AM
Dear Friends,
I have developed an oData services and it working fine with SAP transaction(segw).However, while consuming the same in SAPUI5, I am getting the below error. Please let me know what could be the reason.
Code in UI is below:
var oTable = new sap.ui.table.Table({
title: "Sales View",
visibleRowCount: 10,
selectionMode: sap.ui.table.SelectionMode.Multiple
});
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Sales Document"}),
template: new sap.ui.commons.TextField().bindProperty("value","SO_ID"),
width: "200px",
sorted: true
}));
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Created by"}),
template: new sap.ui.commons.TextField().bindProperty("value","CREATED_BY")
}));
//create the relation
var oModel = new sap.ui.model.odata.ODataModel("https://xxxxx:8031/sap/opu/odata/SAP/ZOEMSO1_SRV/");
// true,
// "",
// "");
// oModel.setCountSupported(false);
oTable.setModel(oModel);
oTable.bindRows("/ZOEMSO1Set");
oTable.placeAt("content");
Appreciate your help on the same.
you should use relative url, like /sap/opu/odata/SAP/ZOEMSO1_SRV/
run through destination in web ide, or deploy to abap server to run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jun and Vincent for the responses. Issue is resolved by fixing few things at Sevice implementations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try something like this:
var oDataHelp = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZXX_GW_HELP_SRV/", true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.