5

SAP HANA Cloud: SAP Core Data Services (CDS) Migration

 1 year ago
source link: https://blogs.sap.com/2023/02/27/sap-hana-cloud-sap-core-data-services-cds-migration/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
February 27, 2023 2 minute read

SAP HANA Cloud: SAP Core Data Services (CDS) Migration

Attention: The content of this blog was not created by SAP. It was written by a non-SAP consultant to help your migration journey to the cloud. Therefore, please keep in mind that it might take some more time to get answer for your question in case you leave any to this blog.


This blog describes the steps to follow when migrating SAP Core Data Services (CDS) within SAP HANA databases.

1. Prerequisites

In SAP Business Application Studio (BAS), a database module and on top of that application module (NODEJS/CAP/UI5) are already deployed.

2. Add package.json file in srv folder

Add the package.json file to the root folder of the project (in BAS) at the db level, as shown in the below screenshot.

blog_cds1.png

This package.json instructs the system to deploy cds tables in the form of hdbtables and cds views to hdbviews.

3. Add cdsrc.json file

The files need to be added at the same level as mta.yaml, as shown in the below screenshot.

blog_cds2.png

This defines the target path where the cds artifacts will be deployed.

4. Import CDS files to the project

Import CDS files at the same level as src folder, as shown below.

blog_cds3.png

5. Add/change package.json file

Add/change package.json file under the db folder, as shown below.

blog_cds4.png

6. Add build.js

Add the build.js file under the src folder, as shown below.

blog_cds5.png

7. Execute CDS build

Execute CDS build by opening a terminal in the project as shown below and execute the cds build command.

blog_cds6.png

8. Objects generated

Once the CDS build is successful, the corresponding objects (hdbtables and hdbview) will be generated under the gen folder.

blog_cds9.png

9. Objects deployment to the database

After generating the file under the gen folder, deploy them into the database using the deployment option in the SAP HANA projects as shown below.

blog_cds7.png

The CDS build is now complete!

Please feel free to leave any comments/questions. It might take some time as this content is not from SAP, but we will do our best to get back to you with accurate and reliable information.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK