SAP Cloud Application Programming Model Getting Started (CAP): Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 35: Zeile 35:


This also monitors changes to the underlying files and restarts when a file has changed.
This also monitors changes to the underlying files and restarts when a file has changed.
== Create Persistency from CDS ==
cds deploy --to sqlite              # creates sqlite.db
cds deploy --to sqlite:my.db        # creates my.db
This also updates the package.json
In order to see the actual created SQL statements:
cds compile srv/cat-service.cds --to sql    # Creates SQL statements
cds compile srv/cat-service.cds --to hana    # Creates hdbcds or hdbtable/hdbview artefacts


[[Category:SAP]]
[[Category:SAP]]
[[Category:HANA]]
[[Category:HANA]]

Version vom 29. April 2021, 15:05 Uhr

This article describes how to build Cloud Application Programming Model projects (CAP projects) and according artefacts with Core Data Services (CDS).

Source: ABAP Freak Show Ep. 1 - HANA Cloud and the Business Application Studio

https://www.youtube.com/watch?v=a3WPQwmpbvI&list=PLoc6uc3ML1JR38-V46qhmGIKG07nXwO6X&index=71

For local native development see SAP HANA Local Native Development

All-in-one Quick Start: https://github.com/SAP-samples/cloud-cap-walkthroughs/blob/master/exercises-node/intro/README.md

More Repositories: https://github.com/SAP-samples/cloud-cap-samples --> Use opensap*-Branches

Installation of Prerequisites

Relevant Tools from SAP

npm i -g @sap/cds
npm i -g @sap/cds-dk

Additional 3rd Party Tools1

npm i -g hana-cli

Create CDS Project

cds init bookshop

or

cds init MyCDSProject --add hana, mta

Start Service

cds watch

This also monitors changes to the underlying files and restarts when a file has changed.

Create Persistency from CDS

cds deploy --to sqlite              # creates sqlite.db
cds deploy --to sqlite:my.db        # creates my.db

This also updates the package.json

In order to see the actual created SQL statements:

cds compile srv/cat-service.cds --to sql     # Creates SQL statements
cds compile srv/cat-service.cds --to hana    # Creates hdbcds or hdbtable/hdbview artefacts