cancel
Showing results for 
Search instead for 
Did you mean: 

Transporting Objects across different spaces in BTP HANA Cloud

0 Kudos

Hi SAP experts,

I'm currently working on creating Replication Tasks, Calculation view etc in Business Application Studio in BTP HANA Cloud. Later we need to transport it to other spaces such as QA/Prod.

I was searching for good documentation on transporting objects in HANA Cloud but couldn't find any.

Anyone would please let me know what the best possible ways are available in BTP HANA Cloud to transport across different spaces/environments?

Thanks in advance!

Kind Regards,

Chethan

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

Hi chethan.krishna.chethanadka.venkatramana,

When you create data models and other Hana objects using BAS, you are in fact creating what is known as design-time artifacts. For example: when you create a CDS files or Calculation Views, they are not being deployed directly to HANA in any way. Such files have to be processed and deployed by the HDI deployer in order to became what is known as a runtime artifact. For example: a CDS file can become a bunch of tables, views and other SQL objects in the database after this process takes place. The same applies to a CV, etc.

In order to create the design-time artifacts you probably have created an MTAR project in BAS. Whenever you build a database design-time artifact, it will perform several activities behind the scenes for you. First it will process the artifact and convert it to HDB statements and then to SQL statements. Then it will call the HDI deployer passing these statements and make sure they get processed at the database level in order to create/update the runtime-objects. The HDI deployer takes care of any merging that has to take place. That's what's happening when you see all the activity on the log window. However, this is something only you as a developer will see while working on your unit testing phase.

Once you have finished developing, all design-time artifacts will be available on your MTAR project. You can then build the MTAR file (which will create a file with extension 'mtar'). Build the project will package all of your work into a deployable file - similar to what we used to do with a WAR file (if you are familiar with Java development).

You could simply export the MTAR file from BAS and save it to your computer. Then you can deploy it to any other subaccount using CF CLI. Or you could simply deploy it directly from BAS (which has all the needed tools for building and deploying the mtar file to any subaccount). For a tutorial, please see the following:

https://developers.sap.com/tutorials/btp-app-cap-mta-deployment.html

This process is the "manual" approach which requires you to manually build, export and deploy.

You can also rely on a remote git repository with a CI/CD solution in place to build and deploy your mtar automatically. BAS is fully integrated with any remote git repository you may have which is publicly exposed to the internet. And all CI/CD solutions will be able to pick up all your artifacts from there and run a script to build the mtar and deploy it. You can make it happen according to the contents of a particular branch in your repository. So when you move artifacts to it, the process will kick in.

SAP also has its own offering that allows you to automate such processes:

https://help.sap.com/docs/btp/sap-business-technology-platform/continuous-integration-and-delivery-c...

Here is a tutorial on how to use it:

https://developers.sap.com/tutorials/btp-app-ci-cd-btp.html

For further reading and reference, please see the CI/CD Best Practices:

https://blogs.sap.com/2020/02/20/weve-finished-our-renovations-our-new-ci-cd-best-practices/

Best regards,
Ivan

Thank you so much Ivan for this detailed explanation. Will definitely try these.

Kind regards,

Chethan

Nandan
Explorer
0 Kudos

When compare the manual process the CI/CD is very efficientl,Currently we are using the CI/CD solution, and it is very effective working and easy to identify if there are any issues.