Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the technique for viewing the static properties of a class in the ABAP debugger

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what is the skill of viewing the static properties of a class in the ABAP debugger". In daily operation, I believe that many people have doubts about the skills of viewing the static properties of a class in the ABAP debugger. I have consulted all kinds of materials and sorted out a simple and useful method of operation. I hope it will be helpful to answer the doubts of "what is the skill of viewing the static properties of a class in the ABAP debugger?" Next, please follow the editor to study!

We know that a static property like figure 1 is not owned by an instance of the class, so when debugging inside the method of this class, the value of the property can only be displayed in the debugger in the two ways shown in figure 2. Once debugged to the outside of this class method, static property values can usually only be displayed by "class name = > property name" (figure 3). In fact, there is another way, as shown in figures 4 and 5.

Figure 1: static properties of the ABAP class

Figure 2: how to view the static properties of a class in the ABAP debugger

Figure 3: how to view static properties after jumping out of a class method in the debugger

Figures 4 and 5 enter {C:ZCL_STATIC} manually in the debugger's Objects panel, where the ZCL_STATIC is replaced with other class names containing static attributes, which can be viewed by entering enter.

Some friends may find this tip useless. I used to use it when debugging a lot of framework code implemented in singleton pattern (Singleton). When you need to view multiple static properties of a class implemented in a singleton pattern, if you use the "class name = > attribute name" described in figure 3, you have to type a lot of characters repeatedly, and the time complexity of keystroke is o (n), where n is the number of static attributes. With the technique of Object panel, the time complexity of keystroke is reduced to o (1), and the efficiency of debugging is improved.

At this point, the study on "what is the skill of viewing the static properties of a class in the ABAP debugger" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report