We’re reaching the of the DEV201@TechEd 2014 blog series which is compiling the demo-rich session DEV201 (Overview of ABAP 7.4 Development for SAP HANA) that was held at SAP TechEd && d-code 2014 in Las Vegas and Berlin. I’m also using this opportunity to refer you to some interesting blogs and documents available on the topic.
The blog series comprises three posts:
- DEV201@TechEd 2014 Part 1: Introduction to ABAP Development for SAP HANA
- DEV201@TechEd 2014 Part 2: Detect custom ABAP code to be adapted
- DEV201@TechEd 2014 Part 3: Optimize your custom ABAP code (current blog)
Please bear with me here, for the lengthy blog – It’s the last of the series… 🙂
Optimize your custom ABAP code
SAP NetWeaver 7.4 (and releases beyond) offers various programming capabilities that should be used to easily develop ABAP applications best leveraging the power of HANA, i.e., high performance and advanced native functions such as financials, text mining and predictive analysis. The majority of these new features works on all SAP supported databases (anyDB), but are optimized for in-memory databases such as SAP HANA. So just a few is solely supported on HANA.
Following capabilities were introduced and demoed during the session:
- SAP List Viewer with Integrated Data Access (ALV with IDA)
- Search Helps with type-ahead function and full-text search
- Enhanced Open SQL
- Advanced view building with ABAP Core Data Services (CDS)
- Easy access to native HANA capability with ABAP Managed Database Procedures (AMDP)
- Real-time eventing with ABAP Channels
Where in the world do I start? may be the question coming up to your mind when you think of writing ABAP code that is optimized for HANA.
Well, we strongly recommend to start with “low hanging fruits” (so-called Quick-Wins) and then to evolve naturally -as the requirement get’s more complexe- to the more advanced capabilities. This means check which features fits to your requirements and choose the one where you have the most skills.
Start with low hanging fruits
It’s all about first making use of well-known capabilities that have been enhanced or optimized for HANA. For example, the screenshot above shows a FPM application which makes use of the HANA-optimized ALV re-use component and the fault-tolerant search (aka Fuzzy Search) in the Search GUIBB.
The application runs in SAP NetWeaver Business Client with an analytical side panel (on the right side) using HANA capabilities which provides more insights to the transactional application.
SAP List Viewer with Integrated Data Access (ALV with IDA)
ALV with IDA (aka ALV on HANA) is a re-use component which offers the well-known functionality of the classical ALV optimized for in-memory DBs such as HANA. It is a good example for showcasing the implementation and the benefits of the Code-to-Data paradigm in ABAP.
The main changes are:
End-users can now navigate through millions of records in real-time thanks to the much faster data retrieval. There is no fear for data truncation as computations are always performed on the complete data set.
ALV with IDA can be integrated in classical Dynpro and WD4A/FPM applications. Read more…
Search Helps with type-ahead and fault-tolerant search
You now have the possibility to enhance the functionality of a search help object (F4 Help) with a type-ahead and fault-tolerant full-text search. The type-ahead (aka search-as-you-type) function allows a faster user interaction by showing possible search results from the standard F4 help already while typing in a drop-
The enhanced search help functionality is currently only supported in classical dynpros. Watch here …
Enhanced Open SQL
Open SQL is an abstraction layer defining a common syntax and semantics for all SAP certified databases. It has been enhanced and now offers a broader coverage of standard SQL features.
This enhancement allows a better support of the Code-to-Data paradigm by using extended joins support, sub-queries, SQL functions, expressions, aggregations and many more.
A new Open SQL syntax (with comma separated SELECT list and escaping of host variables with @) was necessary to achieve this. The old syntax is still supported, but the new one is mandatory for a given statement if it makes use of new features. Read more…
PS: In case you are already on ABAP 7.4 and are preparing your code for a HANA migration, then always first try to replace problematic native SQL statements (EXEC and ADBC) with Open SQL.
Advanced view building with ABAP Core Data Services (CDS)
CDS is SAP’s next generation of data definition and access for database-centric applications. It uses and extends SQL to capture the business intent. Its integration into the ABAP server provides a new DB abstraction layer simplifying and harmonizing the definition and consumption of semantically rich data models regardless of the application domains (e.g. transactions and analytics) across different SAP platforms.
Open SQL vs. ABAP CDS
In case you’re asking yourself whether ABAP CDS competes with Open SQL as both are DB abstractions, then the clear and short answer is NO. It’s like asking if there is a competition between Open SQL and the classical SE11 view building.
When to use What depends on the scenario requirements: When it comes to re-usability, large feature set and domain-specific consumption of data models, then you will go for ABAP CDS.
ABAP Managed Database Procedures (AMDP)
Database procedures are subroutines for processing application logic directly in the database. HANA offers procedures in SQLScript (an extension to SQL) which allow followings:
ABAP developers remain in their familiar development environment and can make use of well-known and robust ABAP concepts and techniques such as the Enhancement Framework and the standard transport mechanism (same by CDS). Read more…
Real-time eventing with ABAP Channels
This functionality is not HANA-specific and works on anyDB. I smuggled it into the session simply to let you know about this cool stuff. And since we’re talking about real-time processing, real-time eventing just fits in the context.
In short: ABAP Channels (ABAP Push Channels + ABAP Messaging Channels) enable the support of event-driven interactive and collaborative scenarios by providing an implementation of the WebSocket protocol in ABAP. So, stop polling and start real-time eventing! Read more…
Explore new opportunities
Scenarios and applications that weren’t possible in the past due to technical restrictions are now reality thanks to the breakthrough technology that is HANA. The possibility is now given to you to rethink both, the way you do business and the way your build applications!
With all these new programming capabilities (especially with AMDP) provided as of AS ABAP 7.4, you can fully and easily integrate the power of HANA in your existing business and e.g. support more agile processes with new innovative applications which were not possible before for performance reasons.
Check it out. SAP HANA: Simplify. Accelerate. Innovate.
That was it. You’ll find a comprehensive explanation of the different ABAP language features in the ABAP Keyword Documentation.
Stay tuned and get your hands dirty.