cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Use C4C BTP Destination in SAP Build Apps

SCHNEIDERT
Active Contributor
0 Kudos
987

Hi Experts,

I created a destination for SAP Sales Cloud in my BTP Subaccount.

When I try to use that destination from within SAP Build Apps, I always get an error saying "incopatible format".

From the BTP cockpit the call (when I click on "Check Connection") is working fine.

Having a look into Sales Cloud OData API Monitor, I was able to see the issue: It seems like during the call from SAP Build Apps, always the "$metadata"-parameter is appended automatically to the URL. But in Sales Cloud this does not work because it is not a valid request URI and for example /LeadCollection has to be the last segment.

Does anybody have an idea of what I'm doing wrong or how to solve that issue?

BR Tobias

Accepted Solutions (1)

Accepted Solutions (1)

agpekka
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tobias,

You could try to leave the path out from the url.
Build Apps adds the default path /sap/c4c/api/v1/repository-service/apis/ to the metadata call and tries to show you all the collections you have in that instance.

The reason you see also $metadata added to the calls is that the app does not know what kind of destination it is facing so it tries both regular odata and sales cloud.

BR, Pekka

SCHNEIDERT
Active Contributor
0 Kudos

Hi Pekka,

even though the "Check Connection" in destination throws an http 500 error and the call in SAP Sales Cloud looks wrong because of the missing $metadata parameter, it seems to work when I use the URL with the path /sap/c4c/odata/v1/c4codataapi (which in my opinion is the correct one for the metadata) but without /LeadCollection

Thanks for your hint! 🙂

BR Tobias

Answers (0)