on 10-27-2015 10:11 AM
Hello Experts,
I'm not sure if this is SAPUI5 or SAP Gateway question.
I'm using the following code for getting data using gateway:
setDefaultPurchGrp: function(oEvent) {
var sRoot = "<server>:<port>";
var oModelUserParams = new sap.ui.model.odata.v2.ODataModel(sRoot + "/sap/opu/odata/sap/ZOMRI_REQ_SRV");
oModelUserParams.setDefaultCountMode(sap.ui.model.odata.CountMode.None);
oModelUserParams.attachRequestCompleted(function(o) {
console.log("statusCode-->"+o.getParameter("response").statusCode);
});
oModelUserParams.read("/UserParametersSet('EKG')");
}
The service gets EKG value from user parameters.
The service works correctly as long as the user has EKG maintained but if user doesn't have the parameter an error is written to browser's console:
2015-10-27 12:02:24 Service returned messages for entities that were not requested. This might lead to wrong message processing and loss of messages - sap-ui-core.js:80
2015-10-27 12:02:24 The following problem occurred: HTTP request failed404,Not Found,{"error":{"code":"/IWBEP/CM_MGW_RT/020","message":{"lang":"en","value":"Resource not found for segment 'UserParameters'."},"innererror":{"transactionid":"CD917CE597CEF1FBA79700237DD279C8","timestamp":"","Error_Resolution":{"SAP_Transaction":"","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"},"errordetails":[{"code":"/IWBEP/CX_MGW_BUSI_EXCEPTION","message":"Resource not found for segment 'UserParameters'","propertyref":"","severity":"error","target":""}]}}} - sap-ui-core.js:80
statusCode-->404
and only then the 'attachRequestCompleted' is being called.
Is it normal behavior? I would expect that nothing will be written to the console log and the handling for "no entity for key" should be in the attachRequestCompleted' function.
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.