Introduction to SAP ABAP on HANA
We have heard enough about SAP HANA, in-memory concept, software/hardware innovation etc. In this article, we do not want to beat around the theories. As an ABAP developer, we would like to know how we can view ABAP objects (programs/FMs/tables) in HANA Studio and how we can create/change those objects there. This is the first part in the series of posts which would specifically target our SAP Technical folks, our ABAPer community.
As an ABAPer, I had these queries. I am sure, many of my ABAPer friends would have similar if not same questions. Hope these answers would provide some light to your existing knowledge about ABAP on SAP HANA. At the end of the last question of this article, you will learn and create your first ABAP program from HANA Studio and also execute it successfully to view the output.
Let’s move on.
Questions:
- What is HANA Studio and what is the need of HANA Studio?
- What is ADT and what is the need of ADT?
- Seems ADT does the same thing like SE80 T-code. Then why do we really need ADT?
- What are perspective in HANA Studio?
- In which perspective can we create/change/display ABAP programs?
- How do we view ABAP programs in HANA Studio?
- Can we edit the same program in GUI and in HANA Studio?
- How can we write ABAP programs using ADT?
The below explanations are as per our understanding. We would like to appeal our experienced ABAPers to throw some more light to the below answers if they know more about it.
Q: What is HANA Studio and what is the need of HANA Studio?
1. HANA as a database has evolved manifold in the last few years. In order to keep pace with these hardware and software innovations, HANA Studio is introduced. HANA Studio provides the right environment for HANA administration, modeling and data provisioning.
Studio is needed so that the developers can create models, procedures etc using the Eclipse-based tool in HANA. Studio is also utilized to develop SQL Script which writes Application logic that would push down data-intensive queries and logic to HANA database and improves the overall performance of the system.
Studio also provides monitoring and other tracing facilities.
Also, the Studio gives freshness to developers who were bored with the blue GUI screen editor. (on a lighter note)
Q: What is ADT and what is the need of ADT?
2. ABAP Development Tool is the full form of ADT. ADT provides eclipse base ABAP Integrated Development Environment (IDE).
ADT does not come by default. It has to be installed as a plugin on Eclipse (in Studio -> Help -> Add New Software).
We need ADT because with ADT in Eclipse, the HANA Studio becomes super powerful. You can connect to different ABAP systems from single Eclipse User Interface. Isn’t it cool? With ABAP perspective in the studio, you can implement end-to-end in-memory solutions in Studio with the same UI.
One entry point and multiple benefits. Don’t you like it?
It is easy to create a testing Environment with a hosted Citrix XenDesktop from CloudDesktopOnline.com You can also go for Integrated SharePoint with SAP HANA with the help of SharePoint experts from Apps4Rent.
Q: Seems ADT does the same thing like SE80 T-code. Then why do we really need ADT?
3. You are right. Both ADT and SE80 have same source code repository and locking mechanism and thus both compliment each other. But ADT is more powerful than SE80. Some advanced features like creating external views for exposing HANA view to ABAP DDIC* (external views), creating Database proxy procedures* are available only when using ADT.
SE80 has been with SAP from birth. ADT is new and still has some enhanced features. SAP is continuously working on more exclusive features which would be possible only from ADT in future. So, ADT is the future
Q: What are perspective in HANA Studio?
4. In layman’s term, perspectives are predefined layouts for different roles. For example, we have ABAP perspective for ABAP developers. Java perspective for Java developers. Debug perspective for debugging. Modeler for modeling in SAP HANA. Administration console for Admin tasks etc. So, every member of the team would use the perspective as per his job role, responsibilities and activities they need to perform.
Q: In which perspective can we create/change/display ABAP programs?
5. You guessed it right!! ABAP perspective. So obvious, right? ?
Bonus question. Can we directly write and execute ABAP program in HANA studio?
No, it has to be connected to an ABAP system first. So, what helps Eclipse to connect to ABAP system? The answer is ABAP Project. Did you expect this answer? ABAP project helps to connect the Eclipse base IDE to ABAP backend system. The project provides eclipse based frameworks for creating, processing and testing development objects.
In short, ABAP project represents a system logon and contains all ABAP development objects of the related system.
Check this image below. Project S4H_800_SIMPLE3_SAPSPOT is our project which is connected to our S4H system.
Similarly, we can have multiple projects pointed to multiple systems from one HANA Studio UI.
Q: How do we view ABAP programs in HANA Studio?
6. Check there is an ABAP program YSAPSPOT in ABAP system (Left side). We can see the same program from our Project which is connected to the same ABAP system. Expand the System Library and go to your custom package and program.
Check, we can view the same program in GUI and HANA Studio.
Q: Can we edit the same program in GUI and in HANA Studio simultaneously?
7. No, we cannot edit the same program simultaneously. Both ADT and SE80 have same source code repository and locking mechanism (as mentioned in answer 3), therefore, we cannot interfere when other is editing it at the same time.
You get the below error in ADT if you try to edit the already opened program (in GUI).
Finally, the much-awaited question by the ABAPer..
Q. How can we write ABAP programs using ADT and execute it?
8. Select the Package where you want to save your program. Right-click on it and select ABAP Program.
Give the name and description of the program. Do not forget, the Z* or Y* naming convention holds good even while creating custom objects from ADT.
You need to choose the transport where you want to save your program.
Write your program and check the syntax and activate it. Most of the icon are similar to GUI. Done, your program is ready in Studio. Actually, you created the program just like in SE38/SE80, just the front end was different. You can go to your ABAP system and check, the new program exists there.
Execute the RUN icon in HANA studio and your program would show the output.
Congrats, you created your first program in SAP HANA and executed it successfully. Although this was a dummy program, in actual projects as well, the process remains the same.