Skip to Content
0

How to get HCP subaccount in HANA XS

Jan 03 at 07:57 AM

73

avatar image
Former Member

Hi Expert,

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

Regards,

Victor

xs
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Ivan Mirisola
Jan 03 at 04:22 PM
0

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.

Regards,
Ivan

Show 1 Share
10 |10000 characters needed characters left 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.

0
Szabolcs Renyo
Jan 03 at 08:39 AM
0

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:
https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/d60337b3631540c6aea5908f6248bbcd.html

Best Regards,
Szabolcs

Show 1 Share
10 |10000 characters needed characters left 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?

1