I have an sapui5 code on HANA studio and would like to know how I can programatically tell if I'm in Dev, test or Prod environment. Is there a way to do this?
Asked
Active
Viewed 113 times
0
-
1You could check the application URL with window.location and use it to determine the environment – Stephen S Mar 29 '17 at 08:04
1 Answers
0
You can use the system view M_DATABASE
as documented here.
In column USAGE
you can find whether the system is used for production, test, development, demo, ...
SAP HANA Studio uses this information to set the UI colour differently for production systems and to provide additional confirmation dialogues when changing data.

Lars Br.
- 9,949
- 2
- 15
- 29