cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to perform POST from SAP Build Apps.

anmolbhatia003
Participant
241

Hi Experts,

I am facing error while performing  a POST request form SAP build apps to SAP Hana DB. The service was created using a CAPM project in SAP BTP.

Service works correctly using a postman. GET, POST, PATCH is working.

 

Below is  error "msg":"400 > /n code: '400",In message: 'Property I"@odata.type\" does not exist in Asp•••••••••••••.Asp●●●●●●●●"In)","type":"log"]

 

However, not from build apps.

 

miroll
Product and Topic Expert
Product and Topic Expert

Hi,

this is a known current issue with interoperability of CAP Version 8 and SAP Build Apps. You can find the solution in this blog:

https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-with-sap-build-apps-creating-a-cr...

It's under the headline "Resolving an interoperability issue between SAP Build Apps and CAP version 8"

Best regards,

Niklas

agpekka
Product and Topic Expert
Product and Topic Expert

CAP dropped support for that @odata.type for some reason. To use the old adapter add odata_new_adapter: false to the configuration like the previous comment's blog post mentions

jessicademarchi
Product and Topic Expert
Product and Topic Expert

As @miroll suggested, the blog contains the answer.

You just need to add the code below inside in your package.json

"cds": {
  "features":{
     "odata_new_adapter": false
  }
}

 

Accepted Solutions (1)

Accepted Solutions (1)

anmolbhatia003
Participant
0 Kudos

Thanks @miroll , the blog contains the answer

This works code below inside in your package.json

"cds": {
  "features":{
     "odata_new_adapter": false
  }
}

 

Answers (0)