Skip to Content
Author's profile photo Jens Weiler

New ABAP for HANA features in SAP NW 7.4 SP5

With the newly released AS ABAP 7.4 SP5 we have deepened the interplay between the ABAP and SAP HANA and enhanced the capabilities of the ABAP for HANA development. Following the code to data paradigm we have focused on enabling you to innovate faster and better with ABAP for HANA.For more information on code pushdown in ABAP on HANA take a look at this blog: ABAP for HANA and “Code Push-Down” .

So what is inside this release for ABAP on HANA developers?

Performance Worklist Tool

The SQL Performance Worklist (Transaction: SWLT) allows you to correlate SQL runtime data with ABAP code analysis to plan optimizations using results from the new SQLMonitor and CodeInspector.

/wp-content/uploads/2014/01/swlt_369465.png

More details on the Performance Worklist Tool can soon be found in a detailed document here in SCN (The SQL Performance Worklist Tool ).

CDS Viewbuilding

CDS Viewbuilding is drastically improving the existing viewbuilding mechanisms in ABAP. It offers a broad variety of features you maybe know of the SQL92 Standard like all kind of join consitions, support of union, expressions, associations and much more. And also important we will continue to extended the feature set in the upcoming releases. CDS viewbuilding is completely syntax based and the design time with syntax checks, code completion and many more features is directly integrated in the ABAP Development Tools.

/wp-content/uploads/2014/01/cds_369466.png

More details on CDS Viewbuilding can be found in a detailed document here in SCN ( New Data Modeling Features in SAP NW ABAP 7.4 SP5 ) and in our brand new YouTube Channel: ABAP for SAP HANA – YouTube.

Extended OpenSQL

Open SQL has been enhanced with new features, especially a lot of limitations have been removed, the JOIN functionality has been enhances as have been arithmetical and string expressions. Moreover, a new Open SQL syntax has been presented with incorporates e.g. the escaping of host variables, comma separation of the field list and so on and so forth.

OSQL.png

ABAP managed Database Procedures (AMDP)

AMDPs enables you to create database procedures directly in ABAP using e.g. SQL Script and to seamlessly integrate it in modern ABAP development. An AMDP can be implemented using an ABAP method. Curious how this look like ? Here we go:

AMDP.png

As you can see in the picture above the choice if the method is classical ABAP or SQL Script is in the method implementation and not in the definition. Making it possible to redefine an existing method implemented in ABAP with SQL script and the other way around.

The Lifecycle-Management of an AMDP is exactly the same as any other ABAP method. The ABAP server will take completely care for the deployment and activation of the procedure on the database.

More details for AMDP will follow soon and can be found in a detailed document here in SCN ( ABAP Managed Database Procedures – Introduction ) and in our brand new YouTube Channel: ABAP for SAP HANA – YouTube.

Transparent Optimizations

  • Fast Data Access (new data exchange protocol)
  • optimized SELECT… INTO ITAB and SELECT SINGLE
  • optimized FOR ALL ENTRIES-clause

So that’s it – hope I made you excited. If you want to try it out, the new AS ABAP 7.4 SP5 Developer Edition will be available beginning of February – See here Developer & Trial Editions: SAP NetWeaver Application Server ABAP and SAP Business Warehouse powered by SAP HANA.  Please check back on this ABAP for SAP HANA Space. We will continuously deliver detailed information of the new features and how-to use them.

A short overview on general SP05 Features by Horst Keller can be found here ABAP Language News for Release 7.40, SP05.

Stay tuned & have fun with ABAP

Jens

Assigned Tags

      29 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Abdul Hakim
      Abdul Hakim

      Hi Jens - Thanks for sharing this wonderful info with the community...ABAP is evolving like never before and i don't wonder if SAP declares in the future that ABAP can also be used for HANA Native development(In addition to RDL / Java script XS)

      Thanks

      Hakim

      Author's profile photo Peter Inotai
      Peter Inotai

      Hi Jens,

      Really cool features!

      BTW are there demo-programs/classes for these new features available in the standard delivery?

      I have this problem. You mentioned:

      "More details for AMDP will follow soon and can be found in a detailed document here in SCN ( ABAP Managed Database Procedures )."

      Somehow I got this message when I try to access it:

      "Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here. "

      Can you check it?

      Thanks,

      Peter

      Author's profile photo Jasmin Gruschke
      Jasmin Gruschke

      Hi Peter,
      this is currently in "knowledge development" 🙂 . So you will have access once the colleague shares/publishes the documents. Stay tuned!

      Cheers,

        Jasmin

      Author's profile photo Peter Inotai
      Peter Inotai

      Hi Jasmin,

      Thanks for your quick reply. I'll definitely stay tuned 🙂

      Cheers,

      Peter

      Author's profile photo Peter Inotai
      Peter Inotai

      Now I see the highlighted "soon"-s. So I'll wait patiently 🙂

      Peter

      Author's profile photo Jens Weiler
      Jens Weiler
      Blog Post Author

      You won't need to wait very long - I promise.

      Author's profile photo Peter Inotai
      Peter Inotai

      Great! Thanks!

      Peter

      Author's profile photo Former Member
      Former Member

      Hello Jens,

      great stuff. The Extended OpenSQL section is the only section that does not have a link for more information. Can you update the post with a link to more in-depth info for this area please.

      Thanks

      Albrecht

      Author's profile photo Jens Weiler
      Jens Weiler
      Blog Post Author

      HI Albrecht,

      I will follow up also with OpenSQL, but first need to finish AMDP, SWLT and CDS.

      Cheers

      Jens

      Author's profile photo Former Member
      Former Member

      Hi Jens,

      Thanks for the article. Please can you also summarize for what versions of NW stack are the following tools avaiable.

      SQLM

      SWLT

      ATC

      what is the way out to do this analysis for customers on ECC 6.0 EhP 5 and 6?

      Regards

      Sudarshan

      Author's profile photo Jasmin Gruschke
      Jasmin Gruschke

      Hi Sudarshan,
      the availability matrix for the SQLM can be found in Optimizing Custom ABAP Code for SAP HANA – The New ABAP SQL Monitor.pdf. For the ATC, more information or better plans can be found in last years TechEd session CD262 "Tune Your Custom ABAP Code - Get Ready for SAP HANA!". If you have by chance access to the virtual hands on session, you can have a look at the presentation, I'm not quite sure, but IMHO no official release matrix exist - experts correct me if that's wrong!

      Cheers,

        Jasmin

      Author's profile photo Former Member
      Former Member

      Thank you Jasmin. Will check this out.

      Author's profile photo Peter Inotai
      Peter Inotai

      I think not much is available in ECC 6.0 EhP5, because Ehp6 was the first HANA compatible version.

      Probable only the Code Inspector HANA checks are available for code preparation.

      (This note I found quite useful: OSS Note 1912445 - ABAP customer code migration for SAP HANA - recommendations and Code Inspector variants for SAP HANA migration).

      Peter

      Author's profile photo Vivek Singh Bhoj
      Vivek Singh Bhoj

      Hi Jasmin,

      Very Nice document

      Thanks for sharing

      As we all know, now we can consume HANA Views in ABAP by creating a external View in Data Dictionary

      My question is if my HANA View has hierarchy then is that hierarchy also available in External View or is it ignored?

      Regards,

      Vivek

      Author's profile photo Jasmin Gruschke
      Jasmin Gruschke

      Hi Vivek,
      AFAIK this is not available in External Views. You need to go for Native SQL (like ADBC) if you like to access hierarchies.

      Cheers,

        Jasmin

      Author's profile photo Dinu Pavithran
      Dinu Pavithran

      Hi Vivek,

      Could you please explain what you were looking for when you asked "is (that) hierarchy also available in External View ".

      Regards,

      Dinu

      Author's profile photo Vivek Singh Bhoj
      Vivek Singh Bhoj

      Hi Dinu,

      In HANA, we can create Hierarchy in HANA Views and so I was asking If I consume my HANA View in ABAP then will the Hierarchy present in my HANA View be available in ABAP

      But as Jasmin already replied it is not available

      Regards,

      Vivek

      Author's profile photo Dinu Pavithran
      Dinu Pavithran

      Hi Vivek,

      I was wondering what would be needed for you to say hierarchy is available in ABAP.

      When Jasmin said that you would need native SQL to access hierarchies, is it clear what that is? Would that satisfy you if you were to ignore the caveat that you need to break away from open SQL?

      Regards,

      Dinu

      Author's profile photo Vivek Singh Bhoj
      Vivek Singh Bhoj

      Hi Dinu,

      I am already satisfied with the answer, I asked the question just out of curiosity

      I know using ADBC connection we can use Native SQL and access Hierarchies

      Regards,

      Vivek

      Author's profile photo Former Member
      Former Member

      VIvek,

      can can we write for all entries using  ADBC?

      my reuirement is read data from flat and compare that with HANA table using ADBC.

      Author's profile photo Thomas Gauweiler
      Thomas Gauweiler

      Dear Krishna C,

      "FOR ALL ENTRIES" is only available in Open SQL and not in ADBC.

      Best Regards, Thomas

      Author's profile photo Former Member
      Former Member

      Thanks Thomas. We build loop to fetch data from secondary DB for internal table values.

      Author's profile photo Trond Stroemme
      Trond Stroemme

      Nice document!

      Quick question: what are the authorization checks done on the SQLscript code inserted using AMDP? As the HANA server has its own identity store (as far as I know), does it mean a user could potentially insert "malicious" SQL, reading, say, sensitive HR data? Is there any documentation on how this is implemented?

      Regards,

      Trond

      Author's profile photo Thomas Gauweiler
      Thomas Gauweiler

      Hi Trond,

      you want a check against a "malicious" programmer? Even in ABAP that does not exist. If you are able to program you can do everything!

      Or do you want a check against the execution of some code? That you could do before calling the AMDP.

      Best Regards, Thomas

      Author's profile photo Trond Stroemme
      Trond Stroemme

      Well, in ABAP you have authorization checks, meaning you can limit access to certain tables based on authorization groups, for instance. In your ABAP, then, you execute checks on aithorization objects in order to limit whatever data the user can retrieve.

      My question was how this relates to SQLscript "snippets" in an AMDP context. You could, for instance, envision someone writing a piece of code that allows for inserting SQLscript dynamically, say, from a parameter retrieved at runtime. Or even reading from sensitive tables (HR, payroll...) using statically written SQLscript, which is presumably not caught by normal ABAP authority checks. I'm not even sure which user is used on the HANA side; is it a "generic" Netweaver user or the named user running the program? If the latter, how are the organizational authorizations "communicated" to the HANA level (which has it's own identity store, as far as i know)?

      I'll experiment on my AWS system, but would be good to get some info from SAP.

      Regards,

      Trond

      Author's profile photo Thomas Gauweiler
      Thomas Gauweiler

      Hi Trond,

      AMDPs are executed under the same generic user as all other statements from the ABAP. There is no sync of ABAP users or authorizations into the HANA users. When you want to apply ABAP authority checks, you have to do them in ABAP before you call the AMDP.

      Best regards, Thomas

      Author's profile photo Former Member
      Former Member

      Well, I've to thank you for this article. It explains clearly the features of the NW SP5 releasenote. But I hope that's not at all. What we additionally need are more ansi sql language features. I look forward for sql expressions in the WHERE and ON clause for example. Or the possibility to use a LIKE for joins.

      Best regards,

        Daniel Ridder

      Author's profile photo Former Member
      Former Member

      Hi Jens!

      Great Stuff!

      I would like to ask about how can i do to call a stored procedure created directly on the DB from a ABAP Report?

      Thank you very much!

      Greetings!

      Author's profile photo Jasmin Gruschke
      Jasmin Gruschke

      Hi Londoño,
      there are several options:
      1. If your DB procedure is an ABAP managed DB-procedure, it's just an ABAP method call (see http://scn.sap.com/community/abap/blog/2014/10/10/abap-news-for-740-sp08--abap-managed-database-procedures)
      2. Use native SQL (see e.g. report ADBC_DEMO_PROC_CALLS_HDB in a SAP_BASIS 7.4 SP5 or higher system)
      3. If you have a native HANA procedure and you would like to use the proxy approach, you can use "CALL DATABASE PROCEDURE" (see http://scn.sap.com/docs/DOC-41604).

      The preferred option is the AMDP approach, but there are things (like secondary DB connections to a secondary HANA database), which might necessitate to use the other ones.

      Cheers,
      Jasmin