The Configuration and Usage of SAP HANA Web-based IDE
We have a Chinese version(http://scn.sap.com/community/chinese/hana/blog/2014/03/12/sap-hana-%E5%9F%BA%E4%BA%8Eweb%E7%9A%84ide%E7%9A%84%E9%85%8D%E7%BD%AE%E5%8F%8A%E4%BD%BF%E7%94%A8) of this document.
For SAP HANA developer, SAP HANA Studio is a common client tool to develop or manage on SAP HANA. At the same time, SAP HANA XS engine also provides a web-based development environment. Only using a web browser, you can perform some simple development. When you either cannot install and use SAP HANA studio locally or you need to develop from a remote location, you can use this IDE.
This web-based IDE is called SAP HANA Web-based Development Workbench, which contains four modules:
- Editor:operate objects in HANA repository.
- Catalog:manage objects in catalog.
- Security:manage users and roles.
- Trace:check or download trace files of XS applications.
Notice: In the version of SPS06, SAP HANA XS provides two web-based IDE tools: HANA IDE (Integrated Development Environment) lite to perform simple operations and SAP HANA Web-Based Development Workbench for complex operations. In the version of SPS07, the two tools are merged to the new tool, SAP HANA Web-based Development Workbench.
Usage and Privilege
After installing SAP HANA server, the SAP HANA Web-based Development Workbench is installed by default. You can use the link http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/ide to access it. The user to logon need to be granted the related roles or privilege in advance. The user granted the system role sap.hana.xs.ide.roles::Developer can access all the modules of SAP HANA Web-based Development Workbench.
For each module, here are the links and related roles:
module |
link |
role |
Editor |
http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/ide/eidtor |
sap.hana.xs.ide.roles::EditorDeveloper |
Catalog |
http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/ide/catalog |
sap.hana.xs.ide.roles::CatalogDeveloper |
Security |
http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/ide/security |
sap.hana.xs.ide.roles:: SecurityAdmin |
Trace |
http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/ide/trace |
sap.hana.xs.ide.roles::TraceViewer |
sap.hana.xs.ide.roles::Developer are the collection of the other four roles, containing all the privileges.
Editor
In Editor, you can maintain and execute all the objects in HANA repository. Here you can create, edit and run all objects, containing packages and applications.
According to this example, we create a simple SAP UI5 project and introduce the main features of Editor.
Firstly, you can create a new package:
In a package, you can use “Multi-File Drop Zone“to add multiple files at the same time.
Then, create a new application:
Fill in the package name and choose a template (here we choose SAP UI5 Hello World).
When using this template, .xsaccess, .xsapp and index.html files can be created automatically and you can modify them as your need. Editor doesn’t only provide different templates of SAP HANA XS application, but also provides template for files, such as .hdbtable and .hdbschema files.
After modifying, choose “save file” or use Ctrl+S to save the file. And the file is activated in the repository by default. Then choose the html file or xsjs file, and choose “Run on server”or use F8 to run on the browser.
Notice: Editor also supports to save but not activate a file. You can configure in HANA Studio: in Configuration tab, choose xsengine.ini->httpserver, add the parameter developer_mode, and set it ture:
Then set Editor:enable inactive save and enable inactive object execution。
When saving files, you can choose “save file“(Ctrl+S) or“save without activating“(Ctrl+I)。
Then to the modified files, you can check the modified version, the corresponding modify time and modifier. And you can compare two versions of the same file.
Editor also provides the function of debugging server side javascript files. You can set break point, perform single step, check the value of variables and compute the value of expressions. The user who perform the debug function must have the role of sap.hana.xs.debugger::Debugger.
Catalog
Catalog is a tool providing the function of developing and maintaining the runtime objects. The user must own the related privileges of the operated schemas, tables or other objects.
You can check the definition of tables and execute SQL sentences.
Security
In Security, you can manage users and role. The user must have the system level privilege of “USER ADMIN”.
In this module, you can create new user or role, check or modify the roles or privileges of a user or a role and change the password of a user.
Trace
Trace provides the function of checking the trace files of XS applications and setting trace level. The user who sets the trace level must have the system level privilege of “TRACE ADMIN”.
Add trace sentence in the related files.
Set the trace level for the application.
You can check and download trace files.
the role of sap.hana.xs.ide.roles::Developer seems to expire everyday for me. I need to revive the role and privileges every day again. Is there a way to fix this?
I can successfully open the SAP HANA Web-based Development Workbench.
When launching the Editor I'm getting the following error message:
"Unhandled Error: Failed to load metadata for Plugin http://<hostname>:<port>/sap/hana/ide/editor/plugin/editors/xsjslib/plugin.json! Reason: error"
Any ideas ?
There is a typo in the Link for the Editor:
http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/ide/eidtor
it should be editor instead of eiditor
This is a problem as some people will copy the link ans will wonder why it is not working.
Best regards
Tobias
Hi,
I am recently migrated Hana SPS9 to SPS11. after migration, I could not access my Web-based editor. If I try to login, It's hanging up. I have checked browser console. the error seems like some of plugins.json file missing. it's saying
"Error: Problems detected while checking service definition consistency:
Not all required services are provided:
Plugin: sap.hana.ide.editor.analytics missing required services ---> usernotification".
at assertServicesDefinitionConsistency (https://xyz.com:4301/sap/watt/core/PluginRegistry.js:124:10)
at https://xyz.com:4301/sap/watt/core/PluginRegistry.js:818:5
at Promise.apply (https://xyz.com:4301/sap/watt/lib/q/q.js:1120:26)
at Promise.promise.promiseDispatch (https://xyz.com:4301/sap/watt/lib/q/q.js:751:41)
at https://xyz.com:4301/sap/watt/lib/q/q.js:1335:14
at MessagePort.flush (https://xyz.com:4301/sap/watt/lib/q/q.js:108:17)
Any ideas about this?
Regards,
Chandresh
Hi, thank you for this post.
I gave sap.hana.xs.debugger::Debugger to me but debugging did not work. Maybe I have to do something else?
Did you checked if system priv “TRACE ADMIN” is also assigned?