First Experience with ABAP for HANA – Evolution or Revolution?
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.
Thank you for this 'really exceptional' blog. I can't wait to see NW 7.4 on HANA in action 😉
P.S. More than often I see blogs rated 5 stars in SCN that I would rate average at maximum. There is no use in a rating system if all content is rated with the same result. But this one really earns the highest rating though (at least for me).
glad that you liked the blog. In fact most of was said at DSAG Jahreskongress last week in Bremen: It was Thorsten Scheider from SAP who announced NW 7.4 in out joint talk about ABAP for HANA. I talked about my experiences and discussed the work we did together at Trailblazer. And it was Jim Snabe who explained in his keynote that SAP wants a revolution in business and establishs that by an evolutionary approach (see the video below). Of course Jim didn't mentioned ABAP and he explained the general strategy (only in german):
[embed width="425" height="350"]https://www.youtube.com/embed/rfUlHwzvbL8[/embed]
During QA after our talk Iearned that all the people in the room (at it was really crowded) had so many questions that I decided to write everything down in my own words with focus on HANA because the SAP Ecosystem is hungry for information. And there are good news:
Some information are under NDA: at Customer Engagement Initiave "Trailblazer" a lot of people did joint work with SAP. They worked hard to give SAP input and those folks will be the first who will see code snippets of out prototype: OData-feeds, SAP UI5 best practices, sophisticated stored procedures... This is fair because it is a kind of reward for every participant who spent efforts in this topic in the last months.
At my company we have a very challenging in-memory project and I think it was a great investment to join "Trailblazer" CEI - but I think this is true for every customer engagement initiave.
Mind Blowing Blog... As a fan of HANA, am avidly looking forward for the NW 740 kick-off and a lot many blogs on this subject.
The evolution of HANA would create a revolution in SAP & Global IT Market.
Great Blog & Thanks for sharing your insights on this. 🙂
Glad you liked my blog. You already complained that I should write more blogs - I wish I could but must of the things I'm doing is under strict NDA. At my company we have a huge in-memory project and there's a lot of things to do and I'm learning a lot. I promise I'll keep SCN community informed. Thorsten and I have plans for SAP Inside Track Netherlands this year.
Thanks for sharing such a detailed blog. On a sidenote you managed to write such a detailed blog on HANA without using words like 'Innovative' 'Game Changer' etc. which more than often gets associated with HANA. 😉 . However, 'disruptive' still found its place in the blog. You associated two new attributes though - Evolutionary, Revoultionary 🙂 !!!
I think whether its evolutionary or revolutionary, disruption is the superclass of both of them!!!
Having got a chance to work on HANA studio and seeing the difference in speed myself was astonishing, but there were few pain points in HANA studio too which I have heard are gradually acknowledged. However I feel (I may be wrong) that there is more than enough confusion involved in moving existing developments to HANA based developments. I am waiting for a chance to get my hands on ABAP on HANA and probably then I can comment better. Thanks.
sorry for using the „disruptive“ – I know that there are people who threatened with killing small kittens when someone is using this buzzword 😉 And yes, there is still room for improvement of HDB Studio.
I agree with you when you say that there is confusion involved in moving existing developments to HANA based developments. As soon as they are mature they should be published within Guidelines for Best Built Apps in my opinion.
P.S.: Within the last days I had to think a lot about evolution. If I would do research on a topic of something like “software evolution” I would visit different SAP locations and try to find out whether you can compare evolution in biology with IT industry. In biological evolution there is competition on different levels, but let’s look at the level of the genotype: if an organism needs a new property, genes compete against each other how to create it. On a single place –a genetic locus– only one gene can exists and so are all alleles (competitive genes on the same place) are mortal enemies. Of course the analogy is too closely seized: there is no death match within SAP and evolution is a blind, statistical process and not result of conscious activities like architectural design or a Customer Engagement Initiative. But there are a lot of different “genes” in SAP software so competition is a natural approach and a Customer Engagement Initiative is one possibility to test the fitness of a certain property so it promotes the element of competition. Can evolution of a species “fail”? Yes, if the result is an evolutionarily stable strategy that is stable and not successful. The result is that a whole species can become extinct. Of course the analogy is too closely seized: I don’t see that SAP going to die, SAP has a “diverse gene pool” and I expect a flourishing future. So if I were a researcher working on software evolution I would try to find out under which conditions competition is useful and when it is harmful. Perhaps this could lead us to a better understanding how evolution in IT industry succeeds. I wonder whether there is some research on it.
Thank you for writing this truly exceptional blog, Tobias! I envy you and Thorsten for participating in this CEI but knew you would be the guys to spread your gained knowledge. Looking forward to your session at the SAP Inside Track Netherlands!
I can imagine you got a lot of questions. Everyone feels that ABAP on HANA will change the way we will write future applications and little information is out. Funny that you then get questions like "Will SE80 still work", but then again, change comes with pain. I am glad that SAP consolidated its development tools in an established developer platform like Eclipse. ABAP Developer Tools, HANA Studio, Sybase Unwired Workspace and all the existing Java tools in one platform (theoretically, I have not seen it all combined yet). Very powerful!
Your suggestion that Data Science (and dashboarding in general I presume?) will be something that developers will bring forward in the future is very interesting. I guess close collaboration with BI/BO consultants can help greatly with that. In any case I want to learn more about this Virtual Data Layer.
Getting the best out of HANA will require good understanding of SQL and the HANA platform, that much is certain. Looking forward to the ABAP on HANA sessions at TechEd!
You are absolutely right, HANA will change our way we will create ABAP applications – and I will tell you some of my thoughts.
We will start to optimize existing code and we start slowly and low-invasive like SAP does with its accelerator approach. Then we will start making data accessible: new search helps and new search features. Then we will start to browse through huge data sets. Then the aspect of visualization get’s more important – the SAP user will get smarter answers from the SAP system perhaps using dashboards.
Here we should start to look at it in more detail: using HANA we can access and “combine” data on different SAP systems and I give you campaign selection as an example: we can read business partner data on CRM and join them with ERP data which is very cool. But HANA can also contain non-SAP data so we will become more agile integrating them. And then it gets more and more interesting: we will start to add aspects of “data science” to our applications and then will do simulation on operational data.
To come to a conclusion: ABAP developers will start to unlock the potential of enterprise data in every dimension: cross system data as well as non-SAP data. Perhaps this could be an aspect Thorsten and I should discuss at SAP Inside Track Netherlands.
good blog nice way to share the knowledge 🙂
Thanks for the feedback. At the moment I'm writing a blog about analytic ABAP applications - I hope you'll like my follow-up blog, too.
It gives me great pleasure and sense of grattitude towards you for writing and sharing such an informative blog.As we all know that SAP's brain child HANA celeberating its first anniversary,i am very much excited to see its rapid growth in the market.Theres gonna be a revolution in the ERP industry in a couple of years and am sure sap competetiors will defenitely keep fingers in their lips and watch the game.Wishing u all success and say cheers.
Thanks for sharing this excellent blog and it is really informative.
When you say there is no replication and AS ABAP required in the future do you meant AS ABAP will be integrated into SAP HANA coz our ABAP code gets executed in AS ABAP? Can you please explain this in detail??
I meant the following: At the moment we have only scenarios with HANA as secondary persistence of SAP Business Suite and non-SAP data. Those data will be replicated into HANA and can be worked on with with an AS ABAP 7.4. This AS ABAP has HANA as primary persistence.
In the future this side-by-side scenario will not be necessary any more: HANA will be the primary persistence of SAP Business Suite Data .
Hope that helps & Best Regards,
Thanks a lot for the clarification. It really helps.
Only now I was able to catch up with this blog (among others) and I must say, it's really exceptional!
Thanks for sharing your many insights, and I can't wait to hear more at sitnl from you and Thorsten.
Thanks a lot for a wonderful blog.
When i am assuming that HANA is more useful for BW/BI, your article clarified that ABAPers has a lot to do with HANA.
Looking for an oppurtunity to work on HANA.
I am very new to HANA. I do not have any experience in eclipse as well. I am working as a developer and have written some legal reports in ABAP.
We have requirement to move some of these reports those are having performance issues, to HANA. These reports read documents posted for whole year, and do some analysis and give output in text format which goes to legal authorities. It takes 2-3 days to run these reports.
As a starting point, i have installed HANA studio in my machine. Could you please guide me from where i should start? Is there any study material which will help me in re-writing the codes to use HANA database? How ABAP in eclipse could be used?
It will be really helpful if you could guide me for above queries.
this question is difficult to answer for many reasons. A blog resp. blog comment is not the right place for a question so post it in the ABAP for HANA forum, please: http://scn.sap.com/community/abap-for-hana
When you post your question there you should do the following:
If you have any question on ABAP for HANA training material I recommend look at the ABAP for HANA forum. You’ll find many links to resources (SAP TechEd courses) there.
Good blog. Ties in with what I've stated earlier: the main focus area for the majority of ABAP'ers out there should be code push-down. Learn SQLscript, and leverage the performance potential of HANA.
I don't agree... I suggest to start with code push-down à la Open SQL... have a look at the large set of new features in OpenSQL which already help you to improve the performance of many queries ... and the best thing is... it's "open", so no need to think about database specific implementations in case you support several databases!
sorry, but I'm not sure I understand your comment. I was referring to replacing Open SQL code (in the ABAP developments) with calls to SQLscript or views in the HANA system. These are of course not database-specific (HANA is HANA, after all). The reason you would do this is to bring the code to the data, instead of the opposite, as with classical ABAP/OpenSQL.
Can you provide more info about the new features in OpenSQL that you mention? Are these NW7.4-specific? We're currently doing an ERP on HANA implementation, and SAP have not provided any input on such features in OpenSQL. On the contrary, they are suggesting improvements by replacing OpenSQL with HANA-specific code, done by implementing views or SQLscript stored procedures.
After migrating to HANA database, you do not perform an immediate replacing of existing openSQL codes with the HANA SQLscript.
You carry out the following steps as follows:
1(a). Adhering to 5 programming golden rules (Performance Guidelines for ABAP Development on the SAP HANA Database).
1(b) Use the enhanced or new ABAP tools to detect where codes can/should be improved (Transitioning Custom ABAP Code to SAP HANA - Be... | SAP HANA) appropriately
If performance is still unsatisfactory, then re-coding with SQLscript/HANA views will be the right next step to adopt. Of course it's not wrong to start immediately it though it is not really the recommended approach without first doing the openSQL optimization which is less costly in term of time and effort.
Thanks, good points. I am fully aware of these steps. My initial comment was meant as a direct advice to ABAP developers who may want to leverage the capabilities of HANA to build on their skill sets. As such, my comment remains valid: Learn SQLscript and view creation, and focus on how to bring the code to the data. This is the main purpose of HANA, after all.
I'm pretty sure any ABAP program built on OpenSQL can benefit from HANA code pushdown, and this is (again, in my opinion) where serious ABAP developers should focus their attention in order to provide new value to their clients and stay competitive.