SAP started a Customer Engagement Initiative “Trailblazer” to evaluate the programming model for ABAP on HANA. Sanjay Khanna wrote a great blog about it on SCN. What happened in “Trailblazer”? My colleague and SAP Mentor Thorsten Franz and I had the chance to join this activity and build a prototype on an ABAP system on top of HANA. Later I talked at DSAG Jahreskongress(DSAG is the German SAP user group) about our experience and now I want to share impressions with the Community – at least the parts that are not affected by NDA. By the way: if you want to see a screenshot of the prototype and more information I recommend to get the slides of my DSAG talk last week.
At first I want to thank the whole Trailblazer team at SAP for extraordinary dedication, especially Chris, Ingo, Jens, Thorsten and Welf. It was great to see that SAP has top talents who are working hard on that topic.
ABAP for HANA – Revolution or Evolution?
When taking part at CEI Trailblazer I learned that SAP tried out lots of different approaches to find the best programming model for ABAP applications on top of HANA. So we had to learn about the new toolset ABAP in Eclipse and many new ABAP frameworks and techniques – in fact all represented different approaches and programming paradigms. Some of those frameworks are revolutionary in the sense that they are powerful and sophisticated – but do they allow agile development and “taste” like SAP Business Suite? We tested very conservative techniques like Open SQL with HANA as primary persistence and it worked fine and often brings immediate success. I learned that other approaches fit perfectly to HANA like OData with its filter and paging techniques.
It seems to me that SAP tried many approaches to optimize ABAP for HANA. In the end SAP made a bunch of smart decisions:
- If you want to create HANA optimized applications you need a development environment “near” to HDB studio – and ABAP in Eclipse was an excellent choice.
- If you want to make it possible that ABAP for HANA applications can be ported back SAP Business Suite you have to keep the code lines compatible.
This may sound very conservative but if think this an evolutionary step towards a new business platform. With HANA SAP started a revolution and is now evolving the SAP Business Suite:
- Of course ABAP applications can profit from HANA right now but we need HANA optimized frameworks and techniques to build applications that use the full power of In-Memory technology. I think with ABAP and HANA we have the chance to build business applications that will give us an advantage in competition.
- There is already a lot of code in SAP Business Suite and Partner solutions, so we need a more conservative approach to tackle existing bottlenecks to take full advantage of HANA technology.
SAP knows that the only way to evaluate a new technical framework or programming paradigm is to confront it with reality: can we use it to build business applications? And this is why they worked quite close together with customers. It is absolutely necessary to create a proof of concept and discuss challenges from customer scenario like the following: How do you deploy the solution? How to deal with archived data?
Please let me summarize: ABAP on HANA will bring new features, paradigms, tools and will enable you to develop amazing applications. Be prepared to learn many new things – but please recognize that SAP started an evolutionary process and I will mention the most important aspects:
- The ABAP codeline optimized for HANA (NW 7.4) is compatible with AS ABAP 7.31.
- If you want to build a new application with NW 7.4, you can start with a side-by-side scenario. Later you can also deploy your application on the SAP Business Suite with HANA as primary persistence, since this will also use NW 7.4 (at the moment the SAP Business Suite does not yet support HANA as primary persistence, but SAP is working on this).
- The side-by-side scenario may a little bit painful and the side-by-side scenario has some restrictions but uses mature technology – in fact I blogged about good old SAP Landscape Transformation tool before so I recommend to read it when you want to learn more.
Let me picture three scenarios. The following picture shows the side-by-side approach with accelerators:
The following picture shows a side-by-side scenario with an additional AS ABAP (7.4) as platform for new application. This application server has HANA as primary persistence and can create own business objects and also start processes in SAP Business Suite. The AS ABAP has (readable) access to replicated data of SAP Business Suite (and of course other data stored in HANA).
In the future the big picture will be look much simpler: SAP products will run on HANA as primary persistence (like SAP BW already does) and we don’t need any replication and no AS ABAP 7.4. Our HANA optimized custom applications running on AS ABAP will be deployed and running in SAP Business Suite:
I mentioned above evolution of ABAP is a fast process but it is not disruptive as it could be. During Trailblazer we explored more “disruptive” features. I really like some of them and perhaps they will be available in the future but I’m sure SAP will find a way to introduce them smoothly. Evolution is a very promising strategy because it brings immediate help to existing pain points and allows feedback cycles. Perhaps I can summarize it in a few words: SAP speeds up but allows the Ecosystem to follow.
Let me mention some advantages. If you want to optimize existing programs on NW 7.4 you have both: the new HANA-optimized application and the non-optimized application. The latter is a fallback solution if the new program is not mature as you expected: the SAP user can still use the old transaction if a problem occurs. This is important because you have to learn a lot new concepts starting with administration, new programming paradigms and more. This will take some time and you will make mistakes. So I recommend the following:
- Start developing “simple” HANA-based applications that cure existing pain points. Take you time to learn new features of NW 7.4 and HANA “proprietary” languages. Of course you don’t have to use all new features of NW 7.4 – my recommendation is to start with good old Open SQL and use new features only when necessary.
- Then start to develop more sophisticated HANA optimized applications and integrate non-SAP data and get deeper into the topic operational reporting perhaps with integration of Crystal Report tools.
ABAP for HANA Roadmap
SAP communicated the ABAP for HANA Roadmap on SCN. Please let me sketch the most important features:
- Some products like BW are already HANA-ready with HANA as primary persistence (BW 7.3 and higher). SAP Business Suite on HANA will use NW 7.4 as platform.
- As long as HANA is not your primary persistence you can use a side-by-side scenario where operational data is replicated into HANA as secondary persistence. With SAP LT you can define a real time or periodic replication scenario. You can query those data using a secondary database connection using ADBC (or native SQL) from any AS ABAP system.
- With SAP HANA Application Accelerator you can configure SELECTs to HANA as secondary persistence without any modification. There are some restrictions like Kernel release for this non-invasive accelerator: It is available only for special customers, you need a special kernel release and you have to check carefully whether this is feasible. If an SAP standard program expects that a database update is written to the database so the next LUW can read the changed value then this scenario is not helpful. So SAP will help you to find out whether this scenario is feasible.
- SAP develops own accelerators (let me call them “programmatic” accelerators) like SAP CO-PA accelerator that pushes down calculations to the database. Those accelerators are deployed by means of Rapid Deployment Solutions (RDS). You can also develop “programmatic” accelerators for customer-specific programs.
- With AS ABAP 7.4 you can create HANA optimized applications running on an AS ABAP with HANA as primary persistence but working replicated data from a SAP Business Suite System.
So what is the advantage of an HANA optimized application? The development of an application is easier:
- We have better tool support: you can access HANA views as database views, calls of stored procedures is easy.
- There are HANA optimized frameworks: there is an HANA optimized ALV grid that allows paging – only visible data is loaded from the database.
- CTS can transport HANA artifacts together ABAP code.
The most important thing is that we can develop HANA optimized applications and get immediate value for HANA investments. Those investments are safe because we can deploy those apps on SAP Business Suite systems as soon as they have HANA as primary persistence and a side-by-side scenario is not necessary any more.
There is another reason for HANA optimized scenarios in a side-by-side approach: The non-HANA code is still there and working as fallback solution if you have trouble with HANA or the SAP LT replication scenario. To be honest I don’t expect such problems but for customers that don’t have much experience with administration of those tools, this could be a benefit: we can get more experience with administration of those tools, can make administration mistakes and still have high availability.
But the most important reason why you should build HANA optimized applications is, that they have amazing properties because they can benefit from the technology directly: they give you access to data in real time, you can navigate and calculate on huge data sets in real time, and you can visualize them in real time.
Some Rules of Thumb for HANA optimized ABAP code
I learned that SAP is working rapidly on that topic so many things will change but I tell you what I have learned:
- Many development guidelines stay the same, f.e. avoid selection of too much data (too many columns, too many rows), ARRAY FETCH is better then SELECT … ENDSELECT and so on.
- Start with Open SQL first and use HANA proprietary features if it is necessary.
- Learn SQL – and program set theoretic SQL with UNION and use JOINs.
- Learn HANA specific SQL features and SQL script.
- Enterprise Data as well as their models are a strategic asset for a successful enterprise IT. Avoid too generic data models for your enterprise data model. Generic data structures that can only be evaluated on the application server layer can’t benefit from HANA. Read my blog Don’t try to be smart – be smart.
- Push calculations to the database.
- Get inspired by AJAX-like techniques, develop paging-access to database tables, avoid processing in main memory and load data if it’s necessary.
And one last word: Don’t think that you are doing “In-Memory” all the time because as ABAP developer you know how to use internal tables. There are many differences and the most important is that HANA is an optimized platform for multi-core processing. So I recommend you to get familiar with the basic HANA features and programming languages. A good starting point is SCN:
BW on HANA is a topic that would deserve an own blog entry so I won’t cover it here. If you want to know more about our experiences with BW on HANA then you should read the slides of Udo Patzelt in his talk about the in-memory strategy of my company at DSAG Jahreskongress.
Learned Lessons from Trailblazer
A Customer Engagement Initiative is a good way to acquire new skills. But it requires time and good preparation pays off. Sometimes you are working with experimental prototypes so don’t be surprised when they are not stable and robust compared to products from SAP that are general available.
Even if the realization your prototype doesn’t cover all aspects I recommend to ensure that there are concepts for aspects you will be confronted in real life:
- UI integration especially in side-by-side scenarios,
- deployment and
- integration of tool chains especially in advanced scenarios (think of Crystal Reports integration).
When building the trailblazer prototype one of the reasons I chose D3 was to learn more about SAP UI5 and especially its openness. But in fact I prefer to use SAP’s BI tools instead for creating dashboards for operational data. If you want to learn how to do it you should watch out for VDL – the virtual data layer but this is a topic for another blog.
Creating a HANA optimized application with AS ABAP 7.4 is easy, but what about creating more than one? Now it gets interesting:
- What are best practices to guarantee that HANA optimized apps can be ported smoothly to SAP Business Suite when HANA becomes primary persistence?
- We have duplicate code – can we do automatic tests to the results of both against each other?
- How can we build them efficiently and support the new paradigm “code to data” better?
SAP is continuing the Customer Engagement Initiative and I hope many people will work together with SAP to find solutions for these and other challenges.
But the greatest challenge is knowledge transfer. When my talk at DSAG Jahreskongress came to Q&A I learned that people have many questions. Let me give you an example: I was asked whether one has to use ABAP in Eclipse or can still use good old SE80. The answer is simple: you can still use SE80 but I recommend to give ABAP in Eclipse a try (also because new features might only be made available in Eclipse).
Why are people asking such questions? In fact they are not sure whether ABAP on HANA means evolution or revolution. This is the most important question and I hope I could discuss some aspects in this blog.
But when you look at http://scn.sap.com/community/abap-for-hana site you will notice two things: there is not so much content yet but the contributors are people who take knowledge transfer seriously and did a great job before explaining how to use SAP technology. So I expect this will change soon and this SCN place will become the most valuable place for information exchange about ABAP and HANA.