Adam Harkus
Adam Harkus

Reputation: 2210

SAPUI5 - Gateway Errors on update method

I can't seem to get update methods working in SAPUI5.

Here's the example:

oModel.update("/JobOfflineSet('" + self.jobId + "')", oEntry, {
        success: function () {
        var oRouter = sap.ui.core.UIComponent.getRouterFor(self);
        oRouter.navTo("main", {});
        dialog.close();
        },
        error: function (oError) {}
        });

And I'm receiving the following error.

There's no error shown in the SAP Gateway and we aren't even getting into ABAP to debug.

{"error":{"code":"/IWBEP/CM_MGW_RT/022","message":{"lang":"en","value":"The system cannot return your search. Please try again."},"innererror":{"application":{"component_id":"","service_namespace":"/SAP/","service_id":"ZSV_SURVEY_SRV","service_version":"0001"},"transactionid":"306596E88F59F1CD80C7005056BEAC32","timestamp":"","Error_Resolution":{"SAP_Transaction":"","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)","Batch_SAP_Note":"See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)"},"errordetails":[{"code":"/IWBEP/CX_MGW_BUSI_EXCEPTION","message":"The system cannot return your search. Please try again.","propertyref":"","severity":"error","target":""}]}}}

Upvotes: 0

Views: 8053

Answers (1)

krisho
krisho

Reputation: 1044

This is mostly because UI5 is triggering a MERGE method instead of a PUT method (To handle MERGE, Gateway internally makes a GET request, which might be failing). You can specify the update method as 'PUT' in the manifest.json.

Upvotes: 3

Related Questions