You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write here how you think we can improve the tutorial ...
The tutorial steps 5.1 - 5.8 and 6.5 describe a workaround in order to enable a CAP project for the SAP HANA Tools. By default CAP Nodejs projects are using a deployment staging folder /gen/db/** which causes issues when working with SAP HANA Tools as these tools are assuming that all HANA artefacts are contained in a folder /db/src/**.
Unfortunately the workaround described in the tutorial does not cover all steps required for the migration of the service module srv. As a consequence deploying the srv module to Cloud Foundry will fail. Additional steps are required to successfully deploy and run the CAP services defined in the srv module. A package.json file is required and an entry "model": "gen/csn.json" has to be added to the requires.db configuration in the package.json file.
I've found a different workaround that is much simpler, only affects the db module and leaves the srv module as is avoiding the inconsistencies described above. The workaround makes use of the CAP build task feature instead - https://github.wdf.sap.corp/pages/cap/advanced/deploy-to-cloud
You may want to give it a try and decide...
Create a CAP project with having Basic Sample Files selected. This is important in order to successfully execute the cds build --for hana command described in the next step.
Execute CDS HANA build once in order to generate a package.json which you have to copy into the db folder of your project (avoiding step 6.5 magic): cds build --for hana
copy the file gen/db/package.json into the db folder
Replace the existing cds config section of the package.json file located in the root folder of your project. For further details regarding the configuration of different databases used for local development or production test scenarios see https://cap.cloud.sap/docs/node.js/cds-env#profiles
Execute the following command in order to update the path entry of the db module mta.yaml or change the path yourself as described below: cds add mta --force
Tutorials: https://developers.sap.com/tutorials/hana-cloud-cap-create-project.html
Write here how you think we can improve the tutorial ...
The tutorial steps 5.1 - 5.8 and 6.5 describe a workaround in order to enable a CAP project for the SAP HANA Tools. By default CAP Nodejs projects are using a deployment staging folder /gen/db/** which causes issues when working with SAP HANA Tools as these tools are assuming that all HANA artefacts are contained in a folder /db/src/**.
Unfortunately the workaround described in the tutorial does not cover all steps required for the migration of the service module
srv. As a consequence deploying thesrvmodule to Cloud Foundry will fail. Additional steps are required to successfully deploy and run the CAP services defined in thesrvmodule. A package.json file is required and an entry"model": "gen/csn.json"has to be added to therequires.dbconfiguration in thepackage.jsonfile.I've found a different workaround that is much simpler, only affects the
dbmodule and leaves thesrvmodule as is avoiding the inconsistencies described above. The workaround makes use of the CAP build task feature instead - https://github.wdf.sap.corp/pages/cap/advanced/deploy-to-cloudYou may want to give it a try and decide...
Basic Sample Filesselected. This is important in order to successfully execute thecds build --for hanacommand described in the next step.package.jsonwhich you have to copy into thedbfolder of your project (avoiding step 6.5 magic):cds build --for hanacopy the file
gen/db/package.jsoninto thedbfoldercdsconfig section of thepackage.jsonfile located in the root folder of your project. For further details regarding the configuration of different databases used for local development or production test scenarios see https://cap.cloud.sap/docs/node.js/cds-env#profilespathentry of thedbmodule mta.yaml or change the path yourself as described below:cds add mta --forceDone!
By the way the temporary problem mentioned in 3.1 does no longer exist. Thus user can use the wizard...
The text was updated successfully, but these errors were encountered: