cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SAP HANA Cloud with the SAP Cloud Application Programming Model (automated)

gregorw
Active Contributor

Hello SAP HANA Cloud Experts,

the SAP Cloud Application Programming Model (CAP) does currently only support HANA as the persistence for productive deployments. According to the SAP CP Estimator the currently most affordable HANA offering "SAP Cloud Platform, SAP HANA service" with 32 GB on AWS for EUR 712,48 is marked with "The HANA Standard plan on AWS is scheduled to be retired as of May 21st, 2020.". So the next option is the new SAP HANA Cloud offering. That is offered for 1125 Capacity Units (= Euro) on AWS or 1170 on Azure.

When I work with CAP in the SAP Cloud Platform Trial it is quite easy to get everything going. I simply build my MTA and deploy it with cf deploy using the service hanatrial from the marketplace. But how does this work in SAP CP Production? How do I connect the SAP HANA Cloud instance to the Cloud Foundry Sub-Account or Space in a way that it can be used from my MTA deployment? I've checked the SAP HANA Cloud documentation and found only Binding Applications to an SAP HANA Cloud Instance which describes a completely manual way to create a HDI Container and bind it to the Application. I want the full automation as I'm used to it when deploying the MTA to SAP HANA on Premise or in SAP CP Cloud Foundry Trial.

Looking forward for your input.

Best regards
Gregor

christoffer_fuss
Participant
0 Kudos

Hi Gregor,

do you know the SAP PartnerEdge program? You can register as a partner and buy services and packages from a special partner pricelist. There you can get the HANA for PoC scenarios much cheaper.

Best regards,

Chris

gregorw
Active Contributor
0 Kudos

Hi Chris,

yes, I'm aware of this partner programs. But as I'm mostly helping customers to implement their custom solutions that isn't really an option.

Best regards
Gregor

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

Hi gregorw , when you create a HANA Cloud instance, it's uniquely instantiated in a organization / space that you create within one of your CF subaccounts, not different from other SCP services. The endpoint is nevertheless accessible from other subaccounts, e.g. you can create two HANA Cloud instances in different subaccounts and share data between them using a HANA to HANA SDA (Smart Data Access) virtualization approach. Or you can use your Full-Stack WebIDE from your Neo subaccount to deploy projects into that HANA Cloud. Your CF apps from other subaccounts can also use that unique HANA instance as their persistence layer.

gregorw
Active Contributor

Thank you Henrique for this answer. Do you have a pointer to any documentation or videos that describe the process to make the SAP HANA Cloud instance available in other subaccounts? And can you confirm that my deployment process of SAP Cloud Application Programming Model Apps doesn't need to be adjusted?

Answers (2)

Answers (2)

maxstreifeneder
Product and Topic Expert
Product and Topic Expert

Hi gregorw,

all you have to do is to tell the compiler to create .hdbtable and .hdbview files (not anymore .hdbcds files) - that's what SAP HANA Cloud requires. Everything else should work the same way as it is with your CAP Project + SAP HANA in SAP Cloud Platform Trial.

Release Notes @sap/cds package:

## Version 3.21.0 - 2019-12-11
- `cds add`, `import`, and `watch` now print installation hints if `@sap/cds-dk` is not installed
- Experimental option `hana.syntax=hdi` to create `hdbtable` files instead of `hdbcds`. May still change!

Therefore please add the entry "hana": { "syntax": "hdi" } to your cds section in the package.json at the root of your CAP project.

Example:

"cds": {
        "hana": {
            "syntax": "hdi"
        },
        "requires": {
            "db": {
                "kind": "hana"
            }
        }
    }

Hope that helps!

Cheers,
Max

gregorw
Active Contributor

Hi Max,

thank you for this first clarification. Regarding your follow up question on SAP Mentors & Friends Slack:

"while I posted the answer I'm not entirely sure if I understood your problem right. is it rather that you haven't created your SAP HANA Cloud in a Cloud Foundry space? ("How do I connect the SAP HANA Cloud instance to the Cloud Foundry Sub-Account or Space")"

Here the needed clarification is if the HANA instance can be used in multiple Cloud Foundry Subaccounts.

Best regards
Gregor

maxstreifeneder
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi gregorw,

thanks for the clarification. I'm afraid but I don't have an answer for the SAP HANA Cloud specific question.
Sorry and regards,

Max

Evgenii
Advisor
Advisor

Hi Max! Thanks for the clue!

I've come across the same scenario. I've got the SAP HANA Cloud instance created and running in a SCP space.

Following you recommendation I've indeed got .hdbview and .hdbtable files created in the gen folder of my cap application at the build stage.

But unfortunately at the deployment stage I get the error message: "... Creating service "app-db" from MTA resource "app-db"... Service operation failed: Service "app-db" could not be created because none of the service offering(s) "[hana, hanatrial]" match with existing service offerings or provide service plan "hdi-shared" Process failed..."

Due to this error I'm wondering if the db section of "resources:" should be somehow adjusted in the mta.yaml file of a cap application to deploy a db module.

Now it looks standard like:

resources:

# services extracted from CAP configuration

# 'service-plan' can be configured via 'cds.requires.<name>.vcap.plan'

# ------------------------------------------------------------

- name: app-db

# ------------------------------------------------------------

type: com.sap.xs.hdi-container

parameters: service: hana # or 'hanatrial' on trial landscapes

service-plan: hdi-shared

properties:

hdi-service-name: ${service-name}

Kind Regards,

Evgeniy

Evgenii
Advisor
Advisor
0 Kudos

Hi Max!

I've finally found out the cause of the issue which was lacking of the service instance of the "SAP HANA Schemas & HDI Containers" in the space.

Kind Regards,

Evgeniy

henrique_pinto
Active Contributor
0 Kudos

FYI, instance sharing is now available in HANA Cloud. Just click on the instance dashboard entry and it will take you to the instance sharing mapping UI. It works in the same way as HaaS. Documentation is in the works.

gregorw
Active Contributor
0 Kudos

Hi Henrique,

thank you for this update. Good to know. Now let's hope that it will also be possible to get smaller HANA Cloud instances.

Best regards
Gregor