Skip to Content
avatar image
Former Member

Create Records through OData using Jquery

Hi All,

I have created a OData Service in SAP ECC system in format

http://hostname:portno/sap/opu/odata/sap/Z_PORDER_SRV/PurchaseOrderHeaderCollection

I am trying to create a record from front end using JQuery.   I am able to retrieve all the records, but creation of records using Method "POST" fails.

For creating records, using the method "GET", i fetch the token "X-CSRF-Token" and then pass the token to the "POST" method.

I am getting an Exception "No Handler for Data" error is coming.   I am accessing the OData Service using the datajs framework.

(datajs-1.1.1.min.js).

Please help me in resolving this issue.

Thanks,

Divya

               

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 04, 2014 at 01:25 PM

    Did you set all of the headers correctly?  Please post your code.

    Regards,

    Jamie

    SAP - Customer Experience Group

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thanks all... My issue is resolved.

      Passing data, I passed the entire JSON Structure from the REST client and mapped the required fields.

      Thanks,

      Divya