sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
720 stars 773 forks source link

Access a Classic Schema from SAP Web IDE Full-Stack #5416

Closed AnOffe closed 4 years ago

AnOffe commented 4 years ago

Tutorial URL: https://developers.sap.com/tutorials/haas-dm-access-cross-container-schema.html

Maybe not an issue, but a question.

How can I manage access to a classic schema with VS Code? After creating and configuring the service, I added it to the mta.yaml as a ressource and a requirement for the db module. "cds build" went fine, but "npm start" ended with

Error: service ServiceName_1 not found; the service definition does not exist.

Regards,

Andre

Add: Using HANA Express 2.0 SPS04 in a VM locally on my laptop together with my VS Code. I tried the example from Exercise 2.6: Non-Container Schemas, User Provided Services & Synonyms from openSAP_hana7. Btw: a great course, all went well in my environment

jung-thomas commented 4 years ago

Please in the future only use the Tutorial issues for reporting problems directly related to tutorial content. The SAP Community Q&A should be used to ask questions in general.

If you want to do development in VSCode then you must be using a default-env.json to simulate the VCAP environment settings. If you are going to use this approach then you also need a SERVICE_REPLACEMENTS section in the default-env.json to map the alias (like ServiceName_1) to actually target service names. The other option is to not use service name alias at all and just code the actual service name in the hdbgrants.

However I'm closing this issue as its not at all related to the tutorial nor is it about the content of the tutorial.