cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAPM database connection error

vykuntrao
Participant
0 Kudos

Hi team,

Am unable to connect database while using simple capm application

Here I can show you the error of image1 and further image showing database connection details

Not sure why showing database connection error even though hana instance running in the back ground

image1.png

image.png

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
vykunt2009

what was the command you used when trying to see your cap app in command line... ? check if your using hybrid

vykuntrao
Participant
0 Kudos

I didn't get you what you said regarding Hybrid. Can you explaing in details

Am using cds run command in terminal to run the app

gregorw
Active Contributor
0 Kudos
vykuntrao
Participant
0 Kudos

I think this is a simple demo application created in SAP BTP. I don't think above url won't help for my issue and not related to it

Accepted Solutions (1)

Accepted Solutions (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi vykunt2009,

Even though you are running your CAPM project with "cds run" command, it is still running inside your IDE (be it BAS or VCODE). Therefore, you must instruct the app to look at the backing service on BTP.

The connection from BAS to any services running on your BTP account are not automatically created for you.

If you are using BAS, simply open the run configuration tab and create a new configuration. There you will be given the option to connect your project with the running instance on BTP.

Here is a nice blog you can follow to get you started with your tests:

https://blogs.sap.com/2020/10/22/running-cap-node-applications-in-sap-business-application-studio/

And here you will find a more complete example with CAP development integrated with HANA:

https://blogs.sap.com/2022/11/30/sap-hana-development-with-sap-cloud-application-programming-model-u...

Best regards,
Ivan

Answers (1)

Answers (1)

vykuntrao
Participant
0 Kudos

Yes, by adding the configuration for the app am able to run the CAPM application.