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

How to use the performance and call stack of SAP applications opened by SAT

2025-01-15 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 SAT to open SAP application performance and call stack", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to use SAT to open SAP application performance and call stack"!

Screenshot of SAT:

The most common way to use SAT is to enter the transaction code, ABAP report or Function Module name in the In Dialog area of the figure above, and then click the Execute button. In this way, the specified ABAP programs will run in SAT Trace mode and automatically generate information including execution performance and call stack, which can be viewed after exiting Trace mode at the end of the program.

Trace results generated by SAT show each call stack and performance data executed by ABAP program in tree structure, which is very useful for performance analysis or learning the execution logic of an unfamiliar code.

So here is a question, if you want to track or want to study the application, is opened through the browser, such as SAP S/4HANA Fiori application, SAP ABAP WebDynpro, WebClient UI, if you want to study an application in the browser click a button, what happens behind it, how to use SAT to track? This is also a question Jerry's colleagues used to ask me.

Although we could have done it with In Parel Session on the right side of the SAT interface, Jerry found the steps a bit cumbersome, which Jerry never used anyway. The detailed steps are detailed in this SAP community blog:

Next Generation ABAP Runtime Analysis (SAT) – How to analyze program flow

This article describes another method, which Jerry uses in his work.

Suppose you have an SAP Fiori application, clicking a button triggers an OData service call to fetch data from ABAP Netweaver servers. I have copied the url of this OData service in Chrome Developer Tools and maintained it in Postman, which can be invoked repeatedly at any time.

The idea behind this approach can be summarized as follows:

(1)Make a breakpoint at the beginning and end of the background code to be traced, assuming that the breakpoint at the beginning is 1 and the breakpoint at the end is 2.

(2)Start the application in a browser or other tool, trigger breakpoint 1, and turn on SAT Trace mode in the debugger.

(3)Press F8 directly in the debugger and the program will execute to breakpoint 2 and then stop. Turn off Trace mode for SAT in the debugger.

(4)End program execution, return to SAT, and view Trace results.

The key to this method is to locate breakpoint 1 and breakpoint 2. If you're tracking an application you know, it's not hard to find the right location; if you're tracking an application you're not familiar with, just set a breakpoint at the beginning and end of the framework.

Take the OData service above as an example, because the copied url fragment contains/sap/opu/odata/sap, which tells us where to set the breakpoint.

Open the transaction code SICF, enter OData and query. Double-click the OData node in the result list:

HTTP calls from the ABAP Netweaver background in the browser, as long as the url contains/sap/opu/odata, must be handled by the ABAP Handler class assigned to the odata node in the SICF transaction code.

Double-click to enter the HANDLE_REQUEST method of this class, set breakpoint 1 at the beginning of its method, and set breakpoint 2 at the last line of this method.

Now open the browser or execute Postman to trigger breakpoint 1, click the New Tool button in the debugger

In the pop-up window, click the Trace button in Special Tools.

Double-click this icon to activate SAT tracking mode:

The Status column shows a green light, indicating that it is currently in Trace mode:

F8 Go to the second breakpoint and double-click the icon in the blue area below to turn off SAT tracking mode. After closing, the green light in the Status column turns red, and a scroll icon appears in TraceFile, indicating that the SAT trace file has been generated.

Open SAT Transaction Code and see the successfully generated result file.

Tree-structured call stacks, each stack execution performance clearly listed.

You can compare this method to Jerry's blog post at the beginning and see which one you prefer.

At this point, I believe everyone has a deeper understanding of "how to use SAT to open SAP application performance and call stack," may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

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