on 12-15-2021 8:36 AM
Hey together,
I've build a simple App for reset the user password. But I get back a 500 Error:
The following problem occurred: HTTP request failed500
The Logs:
/IWBEP/ERROR_LOG and /IWFND/ERROR_LOG dont show an error.
With the SAP Gateway Client the URL: /sap/opu/odata/IWBEP/USERREQUESTMANAGEMENT/ResetUserCredential?UserName='USER'
works with POST.
My Code:
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/MessageBox"
], function (Controller, MessageBox) {
"use strict";
return Controller.extend("??????.controller.MainView", {
onInit: function () {
var oView = this.getView();
var sServiceUrl = "/sap/opu/odata/IWBEP/USERREQUESTMANAGEMENT/";
var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, false);
this.getView().setModel(oModel);
},
pressAbsenden: function (oEvent) {
var oView = this.getView();
var oId = oView.byId("anln1").getValue();
var oModel = this.getView().getModel();
sap.ui.getCore().setModel(oModel);
oModel.create("/ResetUserCredential?UserName='" + oId + "'", null, function (response) {
MessageBox.confirm("Erfolgreich");
}, function (Error) {
MessageBox.error("Error");
});
}
});
});
Thanks for helping
regards
i don't think it is "normal" way to call create function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just look a the create method, not other thing in that blog.
https://blogs.sap.com/2019/05/07/crud-operations-on-employee-profile-using-sap-ui5/
this.getOwnerComponent().getModel().create("/EmpSet", payLoad, {
success: function (odata, Response) {
if (odata !== "" || odata !== undefined) {
MessageBox.success("Created successfully.");
} else {
MessageBox.error("New entry not created.");
}
},
error: function (cc, vv) {
}
});
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
7 | |
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.