Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_jung
Developer Advocate
Developer Advocate
This week SAP has begun to ship SAP HANA 2.0 SPS 0.  If you would like to learn more about all the new features in SAP HANA 2.0 broadly, you can refer to the following blog post:
https://blogs.saphana.com/2016/11/08/sap-announces-sap-hana-2-next-generation-platform-for-digital-t...

In this blog, I would like to point out some of the highlights of the new features for developers who use the SAP HANA native application development capabilities. It should be noted that most of the major architectural changes in the development topic area were recently introduced in SAP HANA 1.0 SPS 11.  This is when we first shipped the SAP HANA extended application services, advanced model (XSA), SAP HANA deployment infrastructure (HDI), and the SAP Web IDE for SAP HANA.  If you are new to these topics in general, you might first want to review the what's new details from SPS 11, SPS 12 and the recent openSAP course on this topic.

https://blogs.sap.com/2015/12/08/sap-hana-sps-11-new-developer-features/
https://blogs.sap.com/2016/05/20/sap-hana-sps-12-new-developer-features/
https://open.sap.com/courses/hana5/

We will also be hosting a webinar for the What's New Developer topic:











Dec 5 What’s New – Developer Thomas Jung, Rich Heilman, Lucas Kiesow 6 pm CET 2 hours Download Invite

We have also updated the exercises from the latest openSAP course to include a version that showcases how to build the same using HANA 2.0 SPS 0:

https://github.com/SAP/com.sap.openSAP.hana5.example/tree/hana2_sps0
https://open.sap.com/files/7a5b026b-52b1-4f92-81a8-863dc4b54dee

Database Development
In order to keep this blog from being too large, rich.heilman posted about the database development features in a separate blog here: https://blogs.sap.com/2016/12/01/sap-hana-2.0-sps-0-new-developer-features-database-development

SAP HANA Extended Application Services, Advanced Model
One of the biggest changes to the SAP HANA architecture was the introduction of XS advanced in SPS 11. SAP HANA extended application services in SPS 11 represents an evolution of the application server architecture building upon the previous strengths while expanding the technical scope. While I don’t want to repeat all the architectural features which came with XS advanced in SPS 11, you can review them in this blog: SAP HANA SPS 11: New Developer Features; XS Advanced

With HANA 2.0 SPS 0, we have a few general improvements to the XSA core.  For instance we introduce Node.js 6.x runtime. We have also done much behind the scenes changes for footprint reduction and protocol optimizations.

One of the often requested features has to do with application routing.  XSA before HANA 2.0 SPS 0, offered host-based or port-based routing.  Host-based routing is rarely used outside of production environments because it requires external DNS wildcard entries.  Port-based routing is much simpler to setup but forces any application consumer to know the port number assigned in order to run the application.

With HANA 2.0 SPS 0, XSA introduces the option of context path based routing.  This allows the developer or admin to assign nice URLs with recognizable path names.  It also avoids the same origin policy issue (CORS/Cross-Site-Scripting). Instead of the port access you can assign a path that will route to your application.  This can be assigned during push or more likely direct assigned to a running application via the new create-route command.


Another nice enhancement is tot he xs logs command.  In the past you could receive all the log, the last x lines, or the recent entries.  With HANA 2.0 SPS 0, we add the option to specific a specific time span with the --since and --till options.

XSA Admin Tool
The XS Advanced Administration Application Monitor also received several new features.  It is our goal to bring as much as possible of the command line features to the web interface as well. With HANA 2.0 SPS 0 we see the added ability of the web tooling to stop, start, restart, restage, scale, rename and delete XSA applications.  We've also added a graphical display of the memory consumption of each XSA application.


ODATA
With HANA 1.0 SPS 11, we first introduced a new Node.js based implementation of the XSODATA service document approach to creating OData services.  This was a nearly feature complete version of OData V2 but did lack a few features which we had in XSODATA in XS Classic.  With HANA 2.0 SPS 0, we finish off the feature compatibility to XSODATA in XS Classic by adding support for the OData4SAP annotations.  We also introduce a new feature in the form of additional authorization checks via XSA scopes on the service entitySet level in XSODATA.

However to that end we feel that XSODATA and its OData V2 implementation is feature complete. Beyond HANA 2.0 SPS 0 we don't plan to make any further enhancements to it.  Instead we will shift all of our focus in this area to new OData V4 implementation.

This new OData V4 implementation will be architecturally different from XSODATA. Therefore won't be a service document as there is today. Instead there will be a library approach with one or more EDM providers.  For instance we will have a generic CDS provider as one implementation of this library.  This approach is very similar to how ABAP is able to create OData services from CDS.

In fact with HANA 2.0 SPS 0, we ship the first version of this new OData V4 library.  This first implementation is not feature complete.  It primarily provides read-only access. It is also only implemented in the Java runtime.  In 2017 we plan to further build out this runtime with update/delete/create as well as analytic operations. We will also provide a similar V4 library runtime in Node.js.

The usage of this new library is quite simple.  From your HDBCDS artifact you add the @OData.publish: true annotation before your context:


The new Java module wizard in the SAP Web IDE for SAP HANA will then generate the necessary library calls and code to provide an OData V4 service for the entities in this context. But more on that new Java module option in a little bit when we detail the new SAP Web IDE for SAP HANA features.

We have examples of this here: https://github.com/SAP/com.sap.openSAP.hana5.example/blob/hana2_sps0/user_db/src/data/UserData.hdbcd...

And examples of such a Java module here: https://github.com/SAP/com.sap.openSAP.hana5.example/tree/hana2_sps0/user_java

SAPUI5 as a Central Service
Another often requested feature was to delivery a central version of SAPUI5. Today XSA applications either have reference the external CDN hosted version of SAPUI5 or pack a complete copy of the SAPUI5 runtime into their application.  With SAP HANA 2.0 SPS 0, we ship SAPUI5 as its own MTAR.  This allows multiple XSA applications to share a single copy of the SAPUI5 runtime.  It also allows multiple versions of the SAPUI5 runtime to be installed in parallel on one system and consumed by different applications.

The SAPUI5 MTA has to be declared as a resource in your mta.yaml file.
https://github.com/SAP/com.sap.openSAP.hana5.example/blob/master/mta.yaml
 - name: ui5-lib
type: configuration
parameters:
ID: com.sap.ui5.dist.sapui5-dist-xsa.XSAC_SAPUI5_FESV2:sapui5_fesv2 # Specifies the the ID of the provider MTA.
name: sapui5_fesv2
version: "=1.38.3" # The version (range) of the provider MTA.

You then list that resource as a requirement of your html5 modules.
 - name: openSAP5-ex-web
type: html5
path: web
provides:
- name: web
properties:
ui-url: "${default-url}"
requires:
- name: openSAP5-ex-uaa
- name: ui5-lib
properties:
ui5liburl: ~{url}

In the xs-app.json of your HTML5 module(s) you can configure a dynamic replacement. This avoids having to code the actual URL or port of the SAPUI5 runtime into your application. https://github.com/SAP/com.sap.openSAP.hana5.example/blob/master/web/xs-app.json
}, {
"source": "/(.*)",
"localDir": "resources",
"authenticationType": "xsuaa",
"scope": {
"GET": "$XSAPPNAME.Display",
"default": "$XSAPPNAME.Display"
},
"replace": {
"pathSuffixes": ["index.html", "odataTest.html"],
"vars": ["ui5liburl"]
}
}]

Finally in your html page where you specify the SAPUI5 bootstrap, you can use this replacement variable you defined in the xs-app.json. https://github.com/SAP/com.sap.openSAP.hana5.example/blob/master/web/resources/index.html
<!-- 1.) Load SAPUI5 (from a remote server), select theme and control library -->
<!-- <script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" -->
<script id="sap-ui-bootstrap" src="{{{ui5liburl}}}/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">
</script>

 

Development Tools
SAP Web IDE for SAP HANA provides a comprehensive web-based end-to-end development experience for creating SAP HANA native applications:

  • Development of SAP HANA content and models

  • UI development with SAPUI5

  • Node.js or XSJS business code

  • Git integration


Therefore it provides a complete workflow for all of your new HANA Deployment Infrastructure (HDI) and XS advanced model (XSA) based development.

SAP Web IDE for SAP HANA comprises capabilities of SAP HANA Studio and SAP HANA Web-based Development Workbench. It represents the long term replacement tool for both of these previous offerings. It consolidates technologies, follows industry trends, and leverages industry standards where possible, while retaining a competitive innovation focus of SAP’s current offering.

With SAP HANA 2.0 SPS 0, we continue to enhance and expand the capabilities of the SAP Web IDE for SAP HANA.

Git Integration
Git is the new source code and design time object repository in the new world of HDI and XSA based development.  Therefore its critical that the SAP Web IDE for SAP HANA has capabilities to allow the developer to directly interact with Git. In HANA 2.0 SPS 0, we add new Git features such as ability to interact with multiple Git branches:


We have also added a Git History viewer to the SAP Web IDE for SAP HANA:


Problems View
One of the items of feedback from customers was that build and syntax errors were difficult to find and read in the SAP Web IDE for SAP HANA. Often they were burred deeply in a larger log.  Also there was little to no connection back to the source object which produced the error.

With SAP HANA 2.0 SPS 0, we are happy to introduce the new Problems View. This tool parses the large and complicated build logs to only display the important problem messages.  It presents them in a much more structured way. It also connects them back to their source location.


CDS Editor
The CDS Editor also has been enhanced in SAP HANA 2.0 SPS 0.  First was the added feature of Beautify.  This reformats the code or as many ABAP developers know it - Pretty Prints it.


Selective Build
One of the major new features of HDB module building is the ability to perform a selective build on one or more files in your module. This is great for iterative development.  For instance maybe you have just designed some new tables, but haven't built your HDB module yet.  When you go to create a Calculation View, the new tables won't show up as possible data sources yet.  Now you can selectively build just the new tables so you can easily continue with your View development.

New Modules - Fiori Master-Detail
The SAP HANA 2.0 SPS 0 version of the SAP Web IDE for SAP HANA also introduces support for several new modules. We have expanded the HTML5 module wizards to include a Fiori Master-Detail wizard. But we have also introduced support for a Java module.


This new Fiori Master-Detail wizard not just generates the UI shell, but also allows you to specify the metadata for your target OData service and configure a lot of the UI based upon this service.


For applications generated by this Fiori Master-Detail wizard, the SAP Web IDE for SAP HANA also support the editing or generation of Mock Data for the services as well.


Java Module
Also new is support for Java Modules.  Java development/runtimes have been supported by XSA since its introduction in SAP HANA 1.0 SPS 11. However there was no development tools or build/deployment support for Java modules from the SAP Web IDE for SAP HANA.  This meant that if you had a single application that included Node.js and Java modules you couldn't do the entire development and building in one place.  You could build and run your Node.js based modules from the SAP Web IDE for SAP HANA, but then had to use Maven and the XS command line to build or run your Java Modules.

With SAP HANA 2.0 SPS 0, we now introduce Java module support within the SAP Web IDE for SAP HANA. This means you can build the complete application even when it contains a Java module from the SAP Web IDE for SAP HANA.

We also introduce wizard and code generation support that will link your Java module to an HDI container and support the new OData V4 service generation from CDS entities.


For an example of something built using this new Java module wizard, see the openSAP HANA5 course example exercise here:
https://github.com/SAP/com.sap.openSAP.hana5.example/tree/hana2_sps0/user_java

SAPUI5 WYSIWYG View Editor
One of the most requested features for the SAP Web IDE for SAP HANA was support for the SAPUI5 WYSIWYG View Editor. I'm happy to announce that this feature finally arrives with SAP HANA 2.0 SPS 0. Now XML views can be previewed and designed using a drag and drop and element property dialog based approach.


Database Explorer
The final new feature of the SAP Web IDE for SAP HANA I want to discuss is the Database Explorer. This tool was formerly know as the HRTT - HANA Runtime Tools.  It was a separate tool from SAP Web IDE for SAP HANA. With SAP HANA 2.0 SPS 0, we have renamed the tool to Database Explorer but also integrated as a perspective within the SAP Web IDE for SAP HANA.


This integration comes with a pretty big visual and interaction redesign to help streamline all the processes that interact with both HDI containers.  We also add the ability to interact with traditional database schema from this tool as well.


Closing
With SAP HANA 1.0 SPS 11, SAP introduced a considerable change in the architecture of application development. Much of the development for the past few years has been focused on just delivering the first version of that new architecture and then only closing gaps between the old and new architecture.  With SAP HANA 2.0 SPS 0, you are beginning to see that we can finally innovate based upon this new architecture.  The general improvements combined with tools and programming model changes you see here are laying the foundation to allow you to build new kinds of applications easier and faster than you ever have before.
62 Comments