Skip to Content
0

Update Odata Request - Data Table - SAPUI5

Jun 29, 2017 at 09:24 PM

91

avatar image

Hi, experts

I am new in SAPUI5 and I need your help.

I have a Table in WEB IDE and I need update the values in the ABAP System.

This table is linked to the EntitySet in the OData Model.

When I send the request to update the data this is the response:

This is the code in the controller:

I tried to follow this blog: Gateway Batch Calls from SAPUI5, but the answer is similar

Could help me find a solution for this case.

Thank you.

Regards.

cap1.png (17.8 kB)
cap2.png (9.9 kB)
cap1.png (17.8 kB)
cap3.png (29.9 kB)
cap3.png (29.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

eyup aksoy Jun 30, 2017 at 01:05 PM
0

hi,

i think you have GW servce problem search with

/N/IWFND/ERROR_LOG and you can debug with Active Source click where is the problem in ABAP.


			var sServiceUrl = "/sap/opu/odata/SAP/ZHR_PO_SRV/";
			var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl);


			oModel.update("/ErfassunglohnartenSet('" + this.oData.Pernr + "')", this.oData, null, function() {
			// success
			}, function(error) {


				var parser = new DOMParser();
				mess = parser.parseFromString(error.response.body, "text/xml").getElementsByTagName("message")[0].childNodes[0].nodeValue;
				typ = "Error";
				sap.m.MessageBox.show(
					mess,
					sap.m.MessageBox.Icon.ERROR
				);
			});


Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hy eyup aksoy, thanks for your help.

I do not have much experience building these services.

This is the issue : "Only one operation is allowed when implementing the default change set"

Here is my function module to update the data:


Should add something to the code?

Should set something additional in SAP Gateway Service Builder?

Thanks for your help.

Regards.

function.png (52.2 kB)
0

Hi,

You should create service with update_entity

this link can help you;

https://blogs.sap.com/2014/11/02/simple-step-by-step-sap-gateway-service-guide/

when you need me let me know.

1

Hi eyup aksoy !

Very useful your information.

Thanks for your help.

Regards.

0