Skip to Content
avatar image
Former Member

How to get HCP subaccount in HANA XS

Hi Expert,

How can we get the HCP subaccount in HANA XS, is there any API or SQL statement can use? Thanks.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 03, 2018 at 04:22 PM

    Hi Victor,

    I believe there are no xsjs APIs (here is a reference for you to look at) that you could use for this. However, the easier way to go about this would be to retrieve the server url and extract the account id from it. Then, you could store it on a global variable for later use. There is a Tenant API in Java, but I wouldn't recommend you using it just for that - unless you already have a java app consuming a computing unit for other purposes.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ivan

      Thanks for your reply, we used to consider to get it from URL, but there will be a problem with those URL that using DNS service.

  • Jan 03, 2018 at 08:39 AM

    Dear Victor,

    First of all you need an SCP (global) account. After you should buy a HANA db. Your local sales representative can help to purchase them.

    Then you can create subaccount according to the following SAP Help Documentation:

    Best Regards,

    Add comment
    10|10000 characters needed characters exceeded

    • If I understood the question, @victorcui has no problem with contracting a CP account or a HANA db instance. Nor his problem is related with creating a subaccount.

      I believe he has a CP account on which there is already a HANA DB instance inside it. Actually, based on the question is very likely he also owns other sub accounts on which there are other HANA DB instances...

      He is probably writting some native XS app and needs to figure it out during runtime whether he is using CP subaccount A or B or C.

      By the information given is hard to give other suggestion other than inspecting the domain URL as @ivanmirisola described.

      @Victorcui could you please describe what are you are trying to accomplish? Do you want to differentiate a "development" subaccount from a "productive" one?