Showing results for 
Search instead for 
Did you mean: 

Error while retrieving destination

0 Kudos

Hello Experts.

We are having a problem with an App that is Deployed in BTP, this herd calls an Odata that is hosted in the Odata provisioning, which works without a problem, showing the Metadata.

But when opening the app, a 500 error appears and it does not show Odata data.

Reviewing the Error Log, I get the following message.

GET request to ...0.0.1/odata/SAP/.../$metadata?sap-language=ES 
completed with status 500 Error while retrieving destination SAP_HCM_ODP from destination service. HTTP status code: 404, token details: 

(the points are to cover the url for confidentiality issues)

Honestly we are very lost, we don't know why it may be failing, so I turn to you for any help or suggestion that could help us solve this problem.

We already reviewed everything that occurred to us, between the destination, the server deployment, the roles and profiles in the users.

We appreciate each and every one of your responses.


Accepted Solutions (0)

Answers (2)

Answers (2)

Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Edson,

What does the URL look like when you're calling the service? Please share the dataSources configuration in your manifest.json if this is where you are making the call from, as you might need to switch from an absolute to a relative URL.

Of course, this would only work if your BTP destination and your xs-app json are configured correctly.

0 Kudos

Hello Leoni,

First of all, thanks for your comment, exactly what you say, it was something that we reviewed while we saw why it did not call Odata correctly.

The reason why our app did not show information is because the Destination was configured in another subaccount, with a name similar to the one where the app was hosted and this meant that it did not find anything, therefore, it would never view the information.

Correcting that, we were able to access and see that everything was ok.

Thanks for answering my question.

Have a great day.


Product and Topic Expert
Product and Topic Expert
0 Kudos

Great, thanks for the update - please close this question.

0 Kudos

Hii Edson,

Have you added routes in the xs-app.json file?

if not, add the below code and, please fill the pattern with your URL pattern in blank space, which defines if the URL includes odata/SAP then it will call the destination mentioned in the destination.

    "source": "^/__________/(.*)$", // odata/SAP
    "target": "/_______/$1", // odata/SAP
    "authenticationType": "xsuaa",
    "destination": "SAP_HCM_ODP"
0 Kudos

Hello Fatema.

Thank you for your answer, yes, everything was already configured, both in the files as you tell me, fortunately yesterday we were able to solve it, it turns out that we needed to configure a Destination in the subaccount to which the application was pointing.

It had been configured in another account, so it could not work and therefore, it did not generate the call correctly.

I appreciate your time in answering my question.

Have a great day.