In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use Eclipse for ABAP development", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use Eclipse for ABAP development" bar!
ABAP Development Tools was originally called ABAP in Eclipse internally in SAP. This tool SAP is referred to as ADT in many cases, and this abbreviation is also used later in this article.
In a nutshell, SAP extends Eclipse and develops plug-ins that allow developers to use Eclipse to complete some of the ABAP development work previously done in SAP GUI.
This article does not repeat the introduction of ADT on the Internet and SAP help documents, but introduces some of the original content of Jerry.
Jerry once wrote an article about SAP IDE that I used in those years, which also mentioned ADT. It is introduced in detail in this paper.
Article catalogue
1. How ADT works
2. The relationship between SAP GUI and ADT
3. Compared with SAP GUI, ADT has some unique features.
4. Some other small features worth mentioning in ADT
The following is the text.
1. How ADT works
After many friends who have done Java development from Eclipse transferred to ADT, the biggest unaccustomed thing is that ADT cannot be used offline. Even with SDK in the Neo programming environment of the SAP cloud platform, developers can publish it to the SAP cloud platform using the command line or the Eclipse Run As menu after local development. However, this usage does not work for ADT, which is still a client side in a Client / Server mode. In essence, the difference from SAP GUI lies only in the presentation and operation of development resources on the Netweaver server.
Because of this CS architecture, every time we manipulate ABAP resources on Netweaver in ADT, such as editing an ABAP class and saving it, it is actually done by consuming the Restful API exposed by the ABAP background.
This consumption behavior of Restful API can be observed by opening the ABAP Communication Log view in ADT. Click the Start logging button:
Make some random changes in the source code, such as adding a blank line, and observe that this modification triggers a lot of HTTP requests to the ABAP backend:
If you want to debug the specific implementation of these background operations, log in to the ABAP backend with SAP GUI and find the node / sap/bc/adt using the transaction code SICF:
You can debug by setting a breakpoint in the method HANDLE_REQUEST of the node processing class:
After the HTTP request is sent to the backend, the above method calls a unified entry function SADT_REST_RFC_ENDPOINT, which interacts with other processing logic of the ADT backend framework as shown in the following figure:
For details of these HTTP requests and responses, please refer to Jerry's blog:
An example to help you understand how does ADT work
Https://blogs.sap.com/2014/08/12/an-example-to-help-you-understand-how-does-adt-work/
For example, to check the syntax of the ABAP source code in ADT is actually to encode the whole code in Base64, and then send it to the background through HTTP Post, where the corresponding check function is executed, and the result is returned to the ADT front end through the HTTP response.
Accordingly, if you are interested in the foreground Java code of ADT, please move to the plugins folder under the ADT installation directory and decompile the jar package inside to read the source code.
2. The relationship between SAP GUI and ADT
Jerry's personal view is that the two complement each other.
On the one hand, developers have no choice but to use ADT for the development of many new features of S/4HANA, such as CDS view and AMDP (ABAP Managed Database Procedure), because SAP GUI does not support the development of these new features.
For example, even if you want to browse the content of CDS view in SAP GUI, you will receive a prompt:
Please use the ADT Tools in Eclipse to process DDL sources.
AMDP, a special ABAP class, can execute HANA's SQLScript or stored procedures in the ABAP method.
You can view the source code of AMDP in SAP GUI, but you can't do development. When you try to edit in SAP GUI, you will encounter the above prompt:
Class XX contains stored procedures which cannot be changed in SAP GUI
On the other hand, ADT does not support some of the more traditional developers in SAP GUI. Give me some examples.
For Screen development of traditional Dynpro programs, double-click Screen number, and you can open Screen Painter by clicking the Layout button, and then do WYSIWYG Screen layout development:
But what happens if you try to edit the Screen in ADT?
ADT opens a new tab that shows an embedded SAP GUI window, like Screen Painter and other traditional ABAP development, taking place in this embedded SAP GUI.
This is why Jerry mentions that SAP GUI and ADT complement each other in the title of this section: even if you use ADT, it doesn't mean you can say goodbye to SAP GUI-a lot of traditional ABAP development still needs to be done in SAP GUI, even as a window embedded in ADT.
Using SAP GUI as an ABAP consultant for development, you should understand the difference between the three session:
User Session
ABAP Session
Internal Session
Every time we log in to a system with SAP GUI, we generate a new User Session, and when we open a new transaction code with / o in each User Session, we open a new ABAP Session in that User Session. A User Session can open up to 6 ABAP Session by default, and the maximum number can be expanded to 16 by modifying system parameters.
So what is the type of Session that starts behind the tab with an embedded SAP GUI window that opens in ADT? After the Jerry test, the answer is User Session.
The following image shows the two tabs opened in ADT and their corresponding User Session, distinguished by different colors.
3. ADT has some unique features compared with SAP GUI.
Since it is an Eclipse-based IDE,ADT, there are still some unique features compared with SAP GUI.
(1) because ADT is based on Eclipse, a more modern IDE than SAP GUI, it is closer to Java/C++ programmers in terms of usage.
Take the ABAP class as an example, the information of various dimensions can be displayed on the same screen at the same time in ADT, and the information dimension displayed on one screen in SAP GUI is very single. If you want to see other dimension information, you can only jump by double-click, and then use the back button to return to the working interface after viewing.
For example, the ST22 information of all systems with attention can be monitored in one place, and Jerry no longer needs its own development tools to implement it:
(2) ADT provides a lot of code refactoring wizards (Assistant), Java and C++ developers must be familiar with the refactoring features of these classes.
Delete unused variables:
Quickly delete all defined but unused local variables in a method, which is very useful and is not supported by SAP GUI.
* * Extract Methods: * * if a piece of code occurs repeatedly, you can consider using the method in refactoring technology to extract it and encapsulate it into a method.
Of course, developers who are still using SAP GUI can also use the ABAP refactoring wizard, and the entry varies slightly depending on the version of SAP GUI.
In the SAP GUI 740th version of Jerry, the refactoring wizard is accessed through the Utilities menu.
In versions prior to 740, the refactoring wizard opened in much the same way:
(3) Native support for some common functions of SAP GUI
The so-called native support refers to the use of Eclipse native pages to provide functions previously implemented in SAP GUI.
For ABAP development consultants, the operation that is done in SAP GUI almost every day is debugging ABAP classes and reports.
After some friends who used to be engaged in Java development transferred to SAP GUI, they always felt awkward when they first started using SAP GUI's debugger. Once you use ADT's debugger, the familiar smell comes back. Debugging Java programs in ADT is exactly the same way as debugging Java programs in ABAP and Eclipse.
Unit test and branch / statement execution coverage in SAP GUI:
Native support for unit testing and various coverage reviews is also available in ADT:
Native support for transaction code SAT in SAP GUI in ADT:
It is used in the same way as in SAP GUI.
(4) convenient SQL console function.
In the past, when I was in SAP GUI, sometimes I wanted to write some simple SQL language for verification for testing purposes, and I had to create a report and write it in the report. In ADT, using SQL console directly saves unnecessary report creation:
(5) improved code version comparison function
In the previous official account article on Jerry, I mentioned the boring things I did with ABAP, and some friends thought that the code comparison tools included in SAP GUI were not very useful:
Now in ADT, ABAP developers can finally enjoy the convenient code version comparison capabilities provided by Eclipse, just like Java programmers:
4. Some other small features worth mentioning in ADT
(1) ADT Link
For example, any resource that can be viewed in ADT has a so-called ADT Link, which can be viewed through the menu Share Link:
The Link format is as follows:
Adt://AG3/sap/bc/adt/vit/wb/object_type/tabldt/object_name/ZORDER
Through the Open ADT Link menu, enter the above ADT Link, you can directly open the corresponding resources, instead of like SAP GUI, you need to run the correct transaction code first, enter the transaction code and then open the resource.
(2) Custom editor color
Jerry, like many programmers, can wear two T-shirts for a summer:
However, when it comes to IDE, which you use for eight to ten hours a day, you can't be ambiguous about its personalized look.
How can you make your IDE stand out from other programmers? One way is to personalize fonts and background colors. For example, Jerry's SAP GUI personalization is like this, the font must use the programmer's equal width open source font Inconsolata, which looks more professional.
The color personalization of SAP GUI is a bit troublesome, which needs to be set manually one by one. Because ADT is based on Eclipse, it is much easier to personalize the theme. If you think the following dark theme is not cool enough
By installing a plug-in called Eclipse Color Theme, you can use dozens of preset themes to really change one set 54 weeks a year. Programmers can dress casually, but IDE or code editors must not be casual.
Thank you for reading, the above is the content of "how to use Eclipse for ABAP development". After the study of this article, I believe you have a deeper understanding of how to use Eclipse for ABAP development, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.