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
Normally when we introduce new features for HANA, it is only done via a new release version (HANA 1.0 or 2.0) or an SPS - Support Package Stack (ex. HANA 2.0 SPS 0, SPS 01, SPS 02, SPS 03).  However the XSA runtime and the SAP Web IDE for SAP HANA actually have a rather independent technical infrastructure from the HANA DB itself.  Up to this point we've never used this feature to deliver new features separate from a HANA release or SPS.  But it was always possible.

With HANA platform itself moving to just one SPS a year, we saw a need and an opportunity to update XSA and the SAP Web IDE for SAP HANA without having to wait until the next SPS of HANA itself. Therefore the HANA 2.0 SPS 03 Feature Revision 1 for XSA and the SAP Web IDE for SAP HANA was born.  The latest patch level of XSA Runtime (1.0.97) and SAP Web IDE for SAP HANA (4.3.57) which were released this week contain far more than the regular revision patches. Normally a revision patch only contains bug, security, or performance fixes. However for XSA and the SAP Web IDE for SAP HANA, this patch contains major new features.

In order to access these new features you only need to update XSA and the SAP Web IDE for SAP HANA. It does not require a HANA Platform/database update. In fact because both XSA and the SAP Web IDE for SAP HANA are backwards compatible, these new features can be updated on any supported HANA release/SPS - even all the way back to HANA 1.0 SPS 12. We've heard from years from customers and partners that they want new technical features, particularly for developers and admins, but don't want to disrupt the business by going through major HANA updates. This is exactly what we are able to deliver here.

XSA Runtime


The XSA Runtime has a variety of new features that impact the infrastructure, administration and development aspects of XSA applications.  The release notes with a complete list are available here: https://launchpad.support.sap.com/#/notes/2691905

However I will go ahead and summarize some of best of these major new features with the focus on developers here:

SAP Web IDE for SAP HANA


New Project Wizards


Two new project wizards




  • SAP HANA Database Application (lightweight/simple project for DB-only development)

  • SAP Cloud Platform Business Application (new programming model for SAP Cloud Platform and on-premise development – see Week 2 for more details)


SAP HANA Database Application Wizard




  • Creates an MTA project, DB module, and HDB container resource from one wizard workflow

  • Great for calculation view modelers and other low-code developers who just want to create DB artifacts and not have to learn much about mta.yaml and large project structures


Application Programming Model for SAP Cloud Platform


Don't let the name fool you, the Application Programming Model for SAP Cloud Platform is now available for SAP HANA on premise via XSA and the SAP Web IDE for SAP HANA as well. To read more about this powerful new programming model, check out the introduction here: https://blogs.sap.com/2018/06/05/introducing-the-new-application-programming-model-for-sap-cloud-pla...



  • New application wizard that creates an MTA project but also initializes it for CDS/new application programming model development

  • Supports both Node.js (Odata V4) and Java (OData V2) service module creation

  • Creates the HANA DB module

  • Creates the UAA configuration in the mta.yaml and wiring to generated modules


For much more on this new Application Programming Model and especially how it can be used in the HANA Native development scenario, be sure to check out the upcoming openSAP course: https://open.sap.com/courses/hana7

New Database Artifact Dialog




  • Today, you have to type in the file extension for most database artifacts

  • Error-prone task, and a typo can lead to difficult error messages

  • Difficult to know which extensions are supported

  • This new dialog simplifies things by letting you choose the extension from a value list


We now have new database artifact dialog.  Previously, there were only a few artifact types listed in the “New” menu option for database artifacts, like we had procedures and functions.  But there were a lot of HDI based artfiacts that were missing and we always had to do a “New” -> “File” and give the name of the file and its associated file extension.  This was very error prone when having to type out the file extensions, especially for very long ones like .hdbstructuredprivilege.   Typos lead to ambiguous error messages and just waste a lot of time.  This new dialog simplifies things by allowing you to choose your artifacts from a list, and all of the DB artifacts are now available.

Multiple Workspaces




  • Developers can now create multiple workspaces with different configurations in each workspace

  • You can also have different branches of the same project open for editing in each workspace


Developers can now create multiple workspaces with different configurations in each workspace.  This is primarily useful when interacting with multiple git branches. Sometimes you need to make changes in two or more branches at the same time. For instance, when you need to make complex cherry picked fixes in multiple development or feature branches.  Before we could only have a single git repository/branch open at one time. Now we can use separate workspace to work on different branches of the same project in parallel.

Resource Manager




  • A new view in the bottom-right corner of SAP Web IDE for SAP HANA

  • It displays all service resources defined in your project

  • You can also see the service instance name (much like performing the xs services command)

  • Most important, you can delete the service instance from here


The new resource manager is a new view in the bottom-right corner of the Web IDE which displays all of the service resources defined in our project.  You can also see the service instances names and more importantly, you can delete the service instances from here as well.  Many customers asked for this feature because they were concerned by how many old containers developers were creating and then abandoning.  Admins could use the Cockpit or command line to clean up these container instances, but it is difficult for them to tell when developers are truly finished with them.

Now developers can directly see and take responsibility to clean up their service instance resources – especially before deleting a project or branch from the Web IDE. This feature also helps with troubleshooting errors during service provisioning or binding.

Inactive Indicator




 

  • A new, special indicator for database artifacts

  • This indicator is shown after you change an object and save it, but before you build the DB module

  • This helps you identify if recent changes have already been sent to the runtime objects in the database container

43 Comments
former_member389060
Participant
0 Kudos
Hi Thomas

Nice blog with loaded feature list. Have some qustions:

1:I saw a recent blog by dj.adams https://blogs.sap.com/2018/10/29/monday-morning-thoughts-exploring-reuse/

where he tries to nicely explain the Application programing model, question can we also reuse procedures and functions like cds in HANA?

2: Will the resource manager fnctionality evolve in future , I was expecting that we can also fine tune the resources on a HDI. But i think this version is good to start

3: Any plan of having code beautifier for sql codes

4: Any plans to enhance the SQL code analyzer functionality

Seeking your response!

 

-Mihir
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
question can we also reuse procedures and functions like cds in HANA?

Not the same way since CDS doesn't support creating procedures and functions. Therefore you can't share them via NPM like CDS files.  Also even if you could share them with multiple projects like CDS, you would be creating a copy of the procedure/function in each container when build. Instead just create the procedure/function in a container and then create a synonym to that container to reuse it in other projects. You don't need the new CDS or Application Programming Model to do that.
Will the resource manager fnctionality evolve in future , I was expecting that we can also fine tune the resources on a HDI. But i think this version is good to start

I'm not sure what you mean by fine tune the resources. But in general yes we do have more plans for resource handling.  For example we plan for the Web IDE to be able to automatically provision more resource types in the future - removing manual steps.  Also we would like to add some sort of dialog when you delete a project asking you if you also want to delete all resource instances. This would make the clean up of abandoned container instances even better.
Any plan of having code beautifier for sql codes

Yes I would love that.  Its constantly in the back log.
 

Any plans to enhance the SQL code analyzer functionality

Yes. 😉 Did you have something specific in mind?
0 Kudos
Interesting features!

But how(and where) can I download XSA and WebIDE ?

I have checked for updates with HXECheckUpdate_linux.bin and it gives me this output:
Installed SAP HANA, express edition version : 2.00.033.00.20180925.2
Connecting to download server...
Your SAP HANA, express edition version is up to date.


Thanks in advance...
Ebu
thomas_jung
Developer Advocate
Developer Advocate
Customers of “full” HANA systems can download the patches from the Service Marketplace.  For HANA Express, a new version should be available relatively soon.  HANA Express generally does need some extra time for testing and packaging after a new release/revision becomes available.
former_member389060
Participant
0 Kudos
Cool stuff!

1:thanks for idea to use synonyms in my case for reusing functions/procedure.

2: On resource manager i meant that it would be good if the developer can get chance to optimize or tune the number of threads/ resources on a HDI. HANA workload manager exists for short of this purpose but having a subset of workload manager is bot bad on web ide resource manager. What do you think?

3: Good to know on beautifier , product owner need to prioritize the backlog 😉

4: Yes by tuning the SQL code analyzer I mean can we have more robust sql static and dynamic code checks? Like sql leaks, use dynamic sql, security related checks. As far as i know hana has 3 or 4 standard procedures which get called when code analyzer runs , as you mentioned i am eager to have more here.

i am looking more from scalability and modular usability of this in CI/CD pipeline of Jenkins tool. If i get time in our CEI session on 7th November , will talk in detail.

 

cheers and nice weekend

-Mihir
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
I don't really get the comment about the number of threads/resources on HDI.  First the resource manager is for the resources in your project in the DEV system. It doesn't do anything in a productive system. So do you really only want to do tuning local in the Dev system?  Also why tune HDI?  You talk about workload manager for HDI, but HDI build already takes place in a separate process - diserver and not the indexserver or nameserver. So the impact to the workload on the rest of the system is already segregated. Plus build should be relatively short lived compared to the activate of old.  Do you really need to tune the threads on something that only runs once upon deployment for a minute or two?
As far as i know hana has 3 or 4 standard procedures which get called when code analyzer runs

We had 3 in SPS 02 and already added 5 more in SPS 03.  We will continue to add more over time.

New rules in SPS 03:

USE_OF_UNASSIGNED_SCALAR_VARIABLE- detects variables which are used but were never assigned explicitly. Those variables will still have their default value when used, which might be undefined. It is recommended to assign a default value (can be NULL) to be sure that you get the intended value when you read from the variable.

USE_OF_CE_FUNCTIONS - checks whether Calculation Engine Plan Operators (CE functions) are used. Since they make optimization more difficult and lead to performance penalties, they should be avoided.

DML_STATEMENTS_IN_LOOPS - detects the following DML statements inside of loops: INSERT, UPDATE, DELETE, REPLACE/UPSERT. Sometimes it is possible to rewrite the loop and use a single DML statement to improve performance instead.

USE_OF_SELECT_IN SCALAR_UDF – detects if SELECT is used within a scalar UDF which can lower the performance. If table operations are really needed, procedures or Table UDFs should be used instead.

COMMIT_OR_ROLLBACK_IN_DYNAMIC_SQL -  detects dynamic SQL which use the COMMIT or ROLLBACK statement. Since COMMIT and ROLLBACK can be used directly in SQLScript without the need of dynamic SQL, it is recommended to use COMMIT and ROLLBACK directly.

 
former_member321811
Participant
0 Kudos

Hi Thomas,

Great news! Could you please confirm the OData versions in the following statement:

Supports both Node.js (Odata V4) and Java (OData V2) service module creation

I thought it was the opposite V2 for Node.js and V4 for Java.

Cheers,

Pierre

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
What’s stated in the blog is correct. It’s OData V4 for Node.js and OData V2 for Java.

 
former_member389060
Participant
0 Kudos

Sorry for confusion, I was more interested on tuning the Hana database asynchronous calls. may be HDI is wrong to use here. was following link and we have huge issues with performance on asynchronous calls in the databases. but this is not HDI. in this case the node module generates so much sql calls and threads that CPU is over utilized. We are using  hana2.0 DB revision34 and web ide patch 7. may be the standard node module needs some enhancement , not sure. I tried to share the picture from web ide, if that helps.

Can you throw more lights here.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
I have no idea what your code or application is doing so I really couldn’t comment. There is no general problem with ansy DB calls.  We use this technique ourselves all the time.  Generally you only get one or a few dB calls per user request. Do you have an extremely high number of user requests or are you somehow generating a high number of DB requests from a single user request?  Really this topic should be discussed elsewhere as it has no real connection to the topic of this blog.
former_member321811
Participant
0 Kudos
Ok thanks. This is kind of confusing because before only V2 was supported for Node.js and V4 for Java according to the documentation (https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/78606fc13a6b41e5b654ca5f289351ca.html). So if I understand correctly:

  • MTA: Node.js = OData V2 (xsodata) and Java = OData V4 (cds?)

  • APM: Node.js = OData V4 (cds) and Java = OData V2 (cds)


A blog post explaining the different options to create backend services using OData would be nice because I didn't even mention other solutions (classic ABAP dev or Mobile OData Server Generator which supports OData V2/V4 using Java for instance).
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
The new Application Programming Model doesn't reuse any of the existing OData frameworks. So yes there is still OData V2 support in Node.js via XSODATA, but XSODATA is not part of the Application Programming Model. Likewise there was an older OData framework for Java that did support V4, but it is now deprecated and replaced by the new Application Programming Model and this new implementation currently only supports OData V2 for this new Java implementation.
Hi Thomas,

 

when can we expect some type of documentation for the new Node.js OData V4 Application Programming Model? I can't find anything according to this. Will it work with cds views?



 

Thanks in advance

Lukas
thomas_jung
Developer Advocate
Developer Advocate
The documentation for the Application Programming Model can be found here in the Cloud Platform docu: https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/00823f91779d4d42aa29a498e0535cdf.html

The documentation you you reference approve is obviously incorrect now that we have shipped the application programming model for XSA. Unfortunately while we could ship the new functionality to SPS 03, the documentation won't be updated until SPS 04. Until then I would suggest looking at the Cloud Platform documentation.

And yes the new Node.js OData V4 is absolutely working with CDS views.

Although our documentation situation is admittedly messy right now, we do have the upcoming openSAP course where we will lay out the topic in detail.  Hopefully that will help fill the gap.

I also have some sample projects which use the new node.js ODATA V4 framework with CDS in my personal github repo here which might help in the intern: https://github.com/jungsap?tab=repositories
0 Kudos
Okay thanks. Is there an release date for SPS 04? To use Node.js OData V4 I only need the repo's @sap/hdi-deploy & @sap/ui-annotations? In your github repo I only saw cds views on entities, is it possible to do cds views on synonyms too? And if, how?

Thanks in advance

Lukas
dvankempen
Product and Topic Expert
Product and Topic Expert
For those interested, we have posted a video tutorial about how to update SAP HANA XSA to feature revision 1.
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
 Is there an release date for SPS 04?

SPS 04 is planned for around May 2019.
 To use Node.js OData V4 I only need the repo’s @sap/hdi-deploy & @sap/ui-annotations?

You don't need @sap/ui-annotations actually.  You do need @sap/cds which is in a new package.json in the root of your project and applies to both your db and srv modules. This is both the CDS "compiler" and the generic service framework. https://github.com/jungsap/hana-xsa-apm-itelo-node/blob/master/package.json
In your github repo I only saw cds views on entities, is it possible to do cds views on synonyms too?

Not directly in the new CDS.  It doesn't have the capability like the old .hdbcds or .hdbdd to import existing DB artifacts (at least not yet). Therefoere you have to define a "proxy" entity with the annotation @cds.persistence.exists .  This creates an entity but doesn't try and persist it in the DB (because it already exists). The downside to thsi approach is that you must completely redefine all the columns with matching names and data types in .cds. The new .cds doesn't pull the service metadata from the DB but instead from the edmx data in the srv module.  Therefore we today have to duplicate this metadata at the cds entity level. Hopefully we can improve this in the future.  And yes back to the core of your question this does work with synonyms. We  have build just such an example in the new openSAP HANA7 course.
0 Kudos
Thanks! Is there some type of feature-list which OData V4 features will be supported in Node.js? E.g. $expand or Arithmetic Operators for $filter. Does CRUD works out-of-the-box or do we have to code it by ourselves?

 

Thanks in advance

Lukas
thomas_jung
Developer Advocate
Developer Advocate

Check out the README.md in the @sap/odata-v4 module. It lists the supported features. Its pretty broad support of the standard.

Yes CRUD works out of the box if there is an entity or projection view as the source.  The generic framework obviously can’t handle more complex views/calc views out of the box.   But that’s why we have an exit framework like the old XSODATA had. However we now even have a read exit. For example I had data for a service that had a NULL value in a key (which OData standard doesn’t like). So I used a read exit to change that value:

	this.after("READ", entities.CURRENCY, (entity) => {
if (entity.length > 0) {
for (let item of entity) {
if (item.CODE === null) {
item.CODE = "NUL"; //remove the NULL value
}
}
}
});

 

For each operation type (READ/CREATE/UPDATE/DELETE) there are Before, After, and On (override) exit events.

former_member321811
Participant
I can't wait for the new openSAP course because without the updated documentation it's quite difficult to understand how things work and what we can do with this new model. Are function imports supported for instance (for OData V2 or V4 and with Node.js or Java) ?

I guess we'll just have to go through the code in your repositories in the mean time to see if we can figure this out.
Thanks, it's great to see the features described in the .README(s) but anyway this is kind of confusing. So to get Node.js OData V4 working with HANA2 we need @sap/cds which self requires @sap/odata-v4.

So if I want to expose a cds view on a synonym via OData V4, I would expect that only read / get works out-of-the-box and all other functionalities must be defined via .on(). Could you make an example of how to define the service.cds to expose cds views on synonyms?

Is it possible to implement custom requests e.g. GET http://host/serviceRoot/EntitySet/$myfancyfunction ?

Could you send us a summary of what's in the sap cp docs at this link? I don't have the right to access it. https://help.sap.com/viewer/DRAFT/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/a131984aefe94ff884e6b...

 

Thanks in advance

Lukas
thomas_jung
Developer Advocate
Developer Advocate
So to get Node.js OData V4 working with HANA2 we need @sap/cds which self requires @sap/odata-v4.

Which is actually not that different than the way this works with OData V2 and XSODATA. There you reference the @sap/xsjs module directly which internally uses the @sap/xsodata module.

@sap/cds is an "umbrella" module. Its the entry point into a whole lot of functionality - both the design time compiler of cds and the runtime generic service framework. Isn't it better that we give you one endpoint to deal with and we deal with the inner dependencies and relationships ourselves?
So if I want to expose a cds view on a synonym via OData V4, I would expect that only read / get works out-of-the-box and all other functionalities must be defined via .on().

No the full CRUD works on the synonym (as long the synonym itself points to a table). Just think of the synonym as a alias. It redirects the request internally to the actual DB object.
Could you make an example of how to define the service.cds to expose cds views on synonyms?

Yes we have such an example in the new openSAP course. The only part you really need is the "proxy" entity with the annotation @cds.persistence.exist that I described earlier.
Is it possible to implement custom requests e.g. GET

Custom functions are part of OData V4, although I've not tried that feature in this new framework yet. I've been able to get by with the regular entity GET and the Read exit upon it.
Could you send us a summary of what’s in the sap cp docs at this link? I

I'm not sure how you got the draft link, but that's unreleased/unfinished documentation. I couldn't really comment on it. I can only point you to the released version of the documentation, the samples from TechEd, and the upcoming openSAP content.

TechEd content: https://github.com/SAP/cloud-sample-spaceflight-node

Beyond that, I know more documentation is being worked on. I don't know when it will be ready. I know its frustrating that the documentation is lagging behind the release. And that the openSAP course is still a few weeks away. I am going to see if I can get the new openSAP source code released to Github in the next few days even though its well ahead of the course itself. Its not perfect, but perhaps could help.
0 Kudos
Isn’t it better that we give you one endpoint to deal with and we deal with the inner dependencies and relationships ourselves?

Yes, I like it.

Is there any reason why the files in the db directory of your cloud-sample-spaceflight-node repo have the file extension .cds? If I try to get it done in our XSA HANA 2.0 SPS 03, I get the error that there is no compiler for this file extension. After I changed it to .hdbcds it works fine.
No the full CRUD works on the synonym (as long the synonym itself points to a table). Just think of the synonym as a alias. It redirects the request internally to the actual DB object.

But what will happen if I try to use DELETE on such a type? If I'm right, you can't delete something out of a view, because the view is e.g. a select statement on a synonym. How will this be handled? That's the reason why I expect that only read will work and the other functions won't work without custom .on() handlers.

As long as the new openSAP course isn't available to the public, could you give us some lines of code in this blog? Without some examples, it is very difficult to achieve the things that you told us. Some lines according to the “proxy” entities would be great.
I am going to see if I can get the new openSAP source code released to Github in the next few days

Even if the code don't works, it would really help to better understand the system behind.

 

Thanks in advance

Lukas
thomas_jung
Developer Advocate
Developer Advocate
Is there any reason why the files in the db directory of your cloud-sample-spaceflight-node repo have the file extension .cds?

Yes because this is a completely new implementation of CDS with new syntax and concepts which is used as part of the new Application Programming Model. It replaces the CDS used in HDBCDS (and introduces incompatible changes). Therefore the different file extension to tell the two implementations of CDS apart.
If I try to get it done in our XSA HANA 2.0 SPS 03, I get the error that there is no compiler for this file extension.

Did you apply the patch levels mentioned in this blog that just came out last week?  It is only with this patch that you get support for the new Application Programming Model and the new .cds files.  Also notice the location of the cds files in my application. They are in the root of the db module not in the src folder.  They aren't built via the HDI Deployer. Instead there is a separate Build CDS option in the Web IDE that "compiles" the .cds files to edmx in the srv/gen folder and hdbcds files in the db/src/gen folder.  So this new .cds is a further level of abstraction.
But what will happen if I try to use DELETE on such a type? If I’m right, you can’t delete something out of a view,

A synonym isn't a view. Its just an alias name.  Notice earlier when you asked about CRUD on synonyms I responded: as long the synonym itself points to a table.  The synonym doesn't change the rules. If the underlying object is a table, the operations on tables are possible. If the underlying object is a view, the operations on a view are possible. Synonyms don't change that fact.
could you give us some lines of code in this blog

We have released the openSAP project on github:

https://github.com/SAP/hana-xsa-opensap-hana7

And specifically the proxy entities can be found here:

https://github.com/SAP/hana-xsa-opensap-hana7/blob/master/db/import.cds
ashwin_narayan
Participant
0 Kudos
Hi Thomas,

Starting from XS Classic to even XSA, I always had the issue with session timeout. We can configure the time duration, but my concern is how to notify the users that the session is getting timed out. For example : the screen is idle for a couple of minutes and when the user returns to the screen, the UI doesn't prompt anything, it still behaves the same, but the backend calls get errored out.

 

How to handle this situation??

 

Thanks,

Ashwin
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
For each of your service calls, you need to check for an http redirect status code to indicate unauthorized.  Then you can decide how to handle it.  Do you refresh the current page and cause a redirect to the login page? Or do you just notify the user.  Its a completely client side design decision.
0 Kudos
Nice Blogs.

Thanks For Sharing!
0 Kudos
As always, a clear and concise blog from Thomas. I can't wait to try out the XSA functionality.  Thanks for all the hard work.

 

Al

 
former_member597049
Discoverer
0 Kudos
Hi Thomas,

Is there any example available for @sap/odata-v4 module? I have tried creating a server with an EDM Json file but keep getting the below error when I try to access the metadata.



Regards,
Mahesh
thomas_jung
Developer Advocate
Developer Advocate
You don't use the odata-v4 module directly but instead via CDS and the generic service provider.
mike_howles4
Active Contributor
Thanks for that video.  I was able to apply the update by following your instructions on the web based method at the end.
0 Kudos
Hi thomas.jung

We have xsjs application deployed in CF. The XSJS version was pretty old( 3.4.0). Now we have upgraded to latest version which is 4.0.1, but after upgrading I am getting error saying that "No Audit log configuration provided.". How can I add Audit log configuration to the application?

 

Complete error details are below.

ERR /home/vcap/deps/0/node_modules/@sap/xsjs/lib/index.js:187
throw new Error('No Audit log configuration provided.');
^
Error: No Audit log configuration provided.
at checkOptions (/home/vcap/deps/0/node_modules/@sap/xsjs/lib/index.js:187:11)
at module.exports (/home/vcap/deps/0/node_modules/@sap/xsjs/lib/index.js:28:3)
at Object.<anonymous> (/home/vcap/app/start.js:10:11)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)

 

Thanks for your time,

Dev
thomas_jung
Developer Advocate
Developer Advocate
The 4.x version of XSJS does make some incompatible changes that require migration/adjustment.  It's perfectly fine to actually stay with the 3.7.0 version of the library in the short term.  That's the last patch release before the major new functionality in the 4.x version.

This is actually documented in the CHANGELOG.md in the module itself:

4.0.0 - 2018-10-04


Changed



  • Providing auditLog options is now mandatory.

  • Underlying database driver is now @sap/hana-client.

  • Due to the changed driver, precision and scale in metadata may differ for some data types (e.g. REAL, FLOAT, DOUBLE, BLOB).

  • $.db.ResultSetMetaData.getCatalogName now throws an exception instead of returning a value.

  • $.db.ResultSetMetaData.getColumnDisplaySize now throws an exception instead of returning a value.

  • String representations of SECONDDATE and TIMESTAMP are in a different format (without 'T'). The format now is: YYYY-MM-DD HH24:MI:SS.FF, the format in previous versions was: YYYY-MM-DDTHH24:MI:SS.FF.

  • $.hdb, calling stored procedures with input table parameters: since default data type conversions are not performed over input table parameters, and since @sap/hana-client is more restrictive on values provided for DATE and TIME types compared to the hdb driver, scenarios with input table parameters and table content provided as an array of objects will now throw if the input table parameter has DATE or TIME columns and the values are provided as Date objects.

  • $.db.ResultSet.close does not close the result set. All results will be closed when the corresponding statement is closed.


If you do want to convert to the 4.x version, you might have a look at the source code of the upcoming openSAP course.  We use the 4.x version in that course.

You will need an audit log resource in your mta.yaml:

https://github.com/SAP/hana-xsa-opensap-hana7/blob/master/mta.yaml#L135

And it needs to be added as a requirement of your xsjs service:

https://github.com/SAP/hana-xsa-opensap-hana7/blob/master/mta.yaml#L101

And finally you have to adjust the generated bootstrap code of your server.js in the xsjs module to load the configuration for the audit log server:

https://github.com/SAP/hana-xsa-opensap-hana7/blob/master/xsjs/server.js#L27

 
cader
Member
0 Kudos
Hi Thomas,

Your posts are enriching. I’m new to hana and just starting to learn development on hana.

Im doing the course by you in opensap Introduction to Software Development on SAP HANA. and overwhelmed by so much changes from the time that course was done. It would be great if you could guide into the staring point to learn HANA 2.0. Thanks
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
If you are starting fresh with HANA 2.0, the I would suggest beginning with the HANA4 openSAP course and work up from there.  No reason to go back to the really old courses because they will show you tools and techniques that are now obsolete.

https://open.sap.com/courses/hana4

https://open.sap.com/courses/hana5

https://open.sap.com/courses/hana6

https://open.sap.com/courses/hana7  (upcoming)

 
sikhumbuzo
Associate
Associate
Hi thomas.jung

Thanks for the blog! Since history column tables are not supported by CDS, how would one go about creating one on XSA, and exposing it as an OData service using the Application Programming Model?

Do you perhaps have a blog or tutorial that I can use as reference?

Thanks in advance!

 

 
thomas_jung
Developer Advocate
Developer Advocate
You can use existing database artifacts (such as those created by hdbtable or Calculation view) in CD&S by creating a "proxy" entity for them with the special annotation - @cds.persistence.exists.  I have video on that topic here: https://youtu.be/P2Y7UXlEtVA
former_member194460
Participant
0 Kudos
"we have huge issues with performance on asynchronous calls in the databases"

I saw it two times that we had really big trouble with the cpu utilization. (tests on different systems showed us that it has nothing to do with our node.js-apps) When we did have had this issue recently, we realized that our system admins missed to upgrade the XSA on a required rev. After fixing this issue it went well.

 
0 Kudos
Hello Denys,

 

Thanks in advance.

 

Is these below files are avialable in sap hana 2.0 sp3.. my admin not able to getting the below files from sap market palce .

 



one of my admin saying these files supports to SP1 and SP2 and SP4  not to SP3 .. is it ture ?

 

present we are using HANA 2.0 SP3 hana license but getting only few below urls not able to get WEBIDE URL...can you plesse help me on this.



 

 
0 Kudos
Hello Thomas,

 

Hello Lan,

 

Thanks in advance.

 

Is these below files are avialable in sap hana 2.0 sp3.. my admin not able to getting the below files from sap market palce .

 



one of my admin saying these files supports to SP1 and SP2 and SP4  not to SP3 .. is it ture ?

 

present we are using HANA 2.0 SP3 hana license but getting only few below urls not able to get WEBIDE URL...can you plesse help me on this.



 

 
dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi,

As mentioned by Thomas, the application server (XSA) and database server (HANA) are separate entities.

You have to check the associated SAP Notes for limitations but in principle you should be able to install the latest XS advanced collection from October 2019 on your SAP HANA 2.0 SPS 01, 02, 03 or 04 environment (but check the notes!!!).

On the command line, 'xs apps' will return installed applications. The XS Controller web UI will show you this as well. If there is no URL returned, the app is not installed. See the SAP HANA documentation about how to install Web IDE for SAP HANA.

D

 

 

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
XSA Runtime and Web IDE are both Release Independent (from HANA itself) and backwards compatible. Therefore you should always apply the latest version to your system of these components. No reason to match up to the specific HANA version.
0 Kudos
Hi Thomas,

Thank you.

Could you please suggest me any information or links about perfomence optimization of calculation view on XSA web ide.