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

How to properly configure a BTP Destination for a CAP OData service and consume it in an SAPUI5 app

LuizNext4s
Newcomer
2,739

I’ve created a simple CAP application that exposes an OData V2 service. When I test the service in Postman with URLs like: 

https://<my-cap-app>.cfapps.<region>.hana.ondemand.com/odata/v2/CatalogService/$metadata

…I get a valid response (status 200) and can see the entity sets and metadata. So far, so good.

However, my goal is to consume this CAP-based OData service from another existing SAPUI5 app (also running on SAP BTP). I tried setting up a Destination in the SAP BTP cockpit, but I keep encountering a 404 error in SAP Business Application Studio or via the Fiori Tools wizard. The wizard attempts to reach ABAP-specific endpoints like:

/sap/opu/odata/IWFND/CATALOGSERVICE;v=2

which obviously do not exist in my CAP service.

Here’s my scenario and what I’ve tried:

  1. My CAP OData endpoint is working fine (verified in Postman).
  2. I created a Destination in my subaccount (under Connectivity → Destinations) with the following properties:

 

#clientSecret=<< Existing password/certificate removed on export >>
#
#Thu Mar 06 19:03:25 UTC 2025
tokenServiceURLType=Dedicated
clientId=xxxxxxxx
tokenServiceURL=https\://xxxxxx.authentication.us10.hana.ondemand.com/oauth/token
WebIDEEnabled=true
URL=https\://XXXXXX-dev-approvalhierarchy-srv.cfapps.us10-001.hana.ondemand.com/odata/v2/CatalogService
Name=ApprovalHierarchy
WebIDEUsage=odata_gen,odata_abap,dev_abap,ui5_execute_abap
Type=HTTP
HTML5.DynamicDestination=true
Authentication=OAuth2UserTokenExchange
scope=uaa.user
HTML5.Timeout=60000
ProxyType=Internet

 

    • I also tried other approaches like pointing just to https://<my-cap-app>.cfapps.<region>.hana.ondemand.com and letting the UI5 app add /odata/v2/CatalogService.
  1. When I click Check Connection on the Destination, it returns “200 OK” (or at least “reachable”).
  2. In SAP Business Application Studio, if I try the “Fiori: Open Service” or “Add Data Source” wizard using the system catalog, it fails with 404 errors because it’s looking for /sap/opu/odata/....

Questions:

  • What is the correct way to set up a Destination for a CAP OData service so that I can consume it in my existing (or new) SAPUI5 app?
  • Is there a recommended best practice to handle the fact that the Fiori Tools wizard assumes an ABAP Service Catalog path (/sap/opu/odata/IWFND/CATALOGSERVICE)?
  • When setting up a UI5 application, do I need to skip the “Service Catalog” approach entirely and just provide the full OData service URL manually (e.g., in the manifest.json or ui5.yaml)?
  • Are there additional steps for routing in xs-app.json (or a “managed approuter”) that I might be missing?

Below are screenshots of:

  • My CAP service metadata response in Postman (showing it works at /odata/v2/CatalogService/$metadata).
  • The Destination configuration in SAP BTP cockpit.
  • The error logs from SAP Business Application Studio / Fiori Tools wizard indicating 404 due to “All catalog service requests failed.”

I would really appreciate any guidance on how others have successfully consumed CAP-based OData services in UI5 apps on SAP BTP — especially regarding Destination settings, xs-app.json routing, and whether or not it’s possible to use the wizard “Connect to an SAP System” for a CAP service. Thank you in advance!

Best regards



 

Accepted Solutions (0)

Answers (0)