cancel
Showing results for 
Search instead for 
Did you mean: 

Error 415 while Updating using OData.

Former Member
0 Kudos

Gurus,

I am trying to update Asset using BAPI  BAPI_FIXEDASSET_CHANGE.

I tried to follow the following link in SCN.


But for some reason I wasn't successful, so what I did was I created the custom RFC and Passed 'X' in all necessary places (to whichever fields I needed to update) and used that RFC in ASSETCHANGESET_UPDATE_ENTITY



  Have also written codes to get entries in Read and Query Operations in ASSETCHANGESET_GET_ENTITY and ASSETCHANGESET_GET_ENTITYSET respectively.


Now finally when I dry-run my Odata Query runs fine and I then I select Use as request button and get XML code and then I change the necessary fields and then select POST-> F8, error 415. What did I do wrong?


BTW the XML generated by Use as request button doesn't start typically by <?xml version="1.0" encoding="utf-8" standalone="yes"?>

It starts with  <feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="The Service name">.

I am new to Netweaver Gateway, so, I kindly urge you to explain me in detail. Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Hari,

You want to perform Update right so the HTTP method should be PUT.

HTTP Error 415 is because the payload is having incorrect format.

Correct the payload format please.

The blog you are referring already has sample XML payload. Create your payload the same way shown in blog and this should resolve the issue.

Regards,

Ashwin