SAPUI5 CDS Odata.read issue

24 views Asked by At

I am trying to do a simple oData.read, but it does not work. Model is published from CDS. I put a debugger in the callback functions, but the read does not even get there, there is no oData read in the network visible, nor do I find any error in the backend error monitor. Any ideas, what could be wrong here?

Thanks, Tim

Manifest:

            "ZXXX_C_MATERIALS_CDS": {
            "uri": "/sap/opu/odata/sap/ZXXX_C_MATERIALS_CDS",
            "type": "OData",
            "settings": {
                "annotations": [
                    "ZXXX_C_MATERIALS_CDS_Annotation"
                ],
                "localUri": "localService/ZXXX_C_MATERIALS_CDS/metadata.xml",
                "odataVersion": "2.0"
            }
        },

Controller:

                var sUrl = "/sap/opu/odata/sap/ZXXX_C_MATERIALS_CDS/";
                var oDataModel = new sap.ui.model.odata.v2.ODataModel(sUrl, {
                json: true,
                loadMetadataAsync: true
                });
            
                oDataModel.read("/ZXXX_C_MATERIALS", {
                    //filters: [],
                    //urlParameters: {
                    //  "$select": "Plant, Material",
                    //},
                    success: function(oData, response) {
                    debugger;
                    },
                    error : function(oError) {
                    debugger;    
                    }, 

                  });
0

There are 0 answers