Skip to Content
0
Former Member
Sep 10, 2014 at 05:03 PM

UI5 Ajax Request to GW Service

36 Views

Im trying to store some data to my created GW service which is bind to a RFC FM.

But i get a 500 internal error.

 GET http://<host>:<port>/sap/opu/odata/sap/ZMOBILE_SRV_01/Protokolle?IvPspnrS=P-4433&IvPosidS=P-4433&IvTcode=SE13&IvBeschr=test&_=1410368050273 500 (Internal Server Error)

var oParameters= {
           "IvPspnrJ" : "P-4433",
           "IvPspidJ": "P-4433",
           "IvPspnrS": "P-4433",
           "IvPosidS": "P-4433",
           "IvTcode": "SE13",
           "IvBeschr": "test"
         };

$.ajax({
           url : "/sap/opu/odata/sap/ZMOBILE_SRV_01/Protokolle",
           contentType : "application/json",
           dataType : 'json',
           data: oParameters,
           success : function(data, textStatus, jqXHR) {
             alert("success");
           }
         });

In the SAP Netweaver Gateway Client i can create these values so the service is running correctly. Is the call to the service wrong ?