ST12 Step by step instruction on how to use it for analysis

18 篇文章 13 订阅
18 篇文章 4 订阅

货铺QQ群号:834508274
微信群不能扫码进了,可以加我微信SAPliumeng拉进群,申请时请提供您哪个模块顾问,否则是一律不通过的。
进群统一修改群名片,例如BJ_ABAP_森林木。群内禁止发广告及其他一切无关链接,小程序等,进群看公告,谢谢配合
不修改昵称会被不定期踢除,谢谢配合。

 

原文地址

https://blogs.sap.com/2013/07/17/st12-trace-step-by-step-instruction-on-how-to-use-it-for-analysis/

 

 

Analysis using ST12 Trace

 

Illustration

The ST12 trace analysis will follow the below mentioned steps,

  • Selection of Trace Parameters

  • Start and Collect Trace

  • Analyzing the Collected Trace

Trace Parameters

The Trace parameters can be categorized as below,

·         Trace For

·         Type of Trace

 

Trace For

·       ST12 trace can be captured for “User/Tasks”, “Work Process”, “Current Mode” and “For a Schedule”

·       The User/Tasks allows the developer to select a User for whom the trace is to be captured and a task for which the trace is to be captured. Task can vary from Dialog, batch etc. Selecting * in Tasks indicate all the tasks will be captured.        

图片

·         The Workprocess allows to select the server for which the trace is to be captured. In general all the servers will be captured when not specified.

图片

·    The Current Mode option is used trace the flow of a Transaction or a Program

图片

·    The Schedule option is used to run the trace for a batch job for a varied selection criterion as Job name, User name, Program associated with the Job.

图片

Type of Trace          

ST12 trace can be initiated as an ABAP Trace or Performance trace or both. Setting the Size&Duration Parameter to MAX as highlighted will ensure that the whole trace is captured in case the trace extends to a long duration.

Start and Collect of Trace

            Let us assume that the trace is to be taken for flow associated with checking the Info type 0001 data of a user through PA20.

·         First set the required Trace parameters. Let us select User/Task option by giving the Comment, User Name, and Task type as *. And select Start Trace

图片

·         Now open the transaction PA20 and give in the Person number and the Info type and select on Overview button highlighted below

图片

·         Now Select End Trace in the ST12 trace screen, this will take us to the collect trace screen. Click on the execute button to collect the trace details. Make sure the highlighted check box is unchecked if the trace is to be used for future analysis.

图片

Analyzing the collected trace

Once the trace is collected the trace is ready for analysis. In the bottom pane as highlighted, select the Trace which is of concern to us.

图片

Then select either one of the 4 highlighted options for the analysis

 

ABAP Trace

·         The ABAP trace is one of the most useful analysis options available in ST12 trace. It provides a Top Down flow of any Hotspot/Program/Transaction and provides a Functional Time Distribution of a flow. It displays the hierarchical order in which the call statements are executed. So it can be used to identify the issues in the flow hierarchy.

图片

·         The above screenshot is a Per Call View of the ST12 trace. The view can be changed into a Modularized by selecting the Per Mod Unit button as highlighted above. This will give a modularized flow of the Code called inside a particular module.

·         The “Top Down Call Tree”(as highlighted below) option clicked when the cursor placed on a Modularization Unit Call(Method/Performs) displays all calls to the selected unit labeled as ‘0’,’1′ are statements inside this modularization units, ‘2’ the statements in modularization units one level below, and then iteratively down up to 30 levels. Letters are used to designate lower levels.

图片

·         Double clicking on any of the line navigates us to the source code. This can be used to identify the impact point.

·         ST12 trace captures the minute details of the flow such as the Loop statements performance, which can be used for a detailed analysis of the flow.

图片

·         As the ABAP trace captures the complete flow, this can be used as an effective tool to identify the Customer Modifications or User Exit.

Note: The call hierarchy considers the call on Forms, Methods, Functions, SQL statements, Loops, Call Screen to PBO, PAI Modules.

Comparison of ST12 with ST05 trace

ST12

ST05

Traces only a specific user context or a transaction

Traces every action of a user on a server

ST12 trace automatically turns off with a transaction

ST05 trace has to be manually turned off

Stores the trace into database and is permanent

Stores the trace into local files and overwritten regularly

Provides a Top-Down flow used to find performance hotspot, issues identified by which are usually solved by code changes.

Provides a bottom-up flow which is suitable for identifying DB bound performance issues, which are usually solved by Performance Tuning.

Performance Trace

Performance trace of ST12 is equivalent to the ST05 trace. It displays performance parameters of all the database statements executed in the flow.

图片

SQL Summary

SQL summary provides the details like Execution time, No. of records selected, Total duration, server details, etc. on a query on a database table. Double clicking on any record takes the flow to a screen which displays the list of programs which has queried on the table and the SELECT query as such.

图片

Statistical Records

The statistical records display the time related parameter of a particular transaction flow.

推荐阅读:

记码农十周年(20110214--20210214)

 

十年老码农搬砖习惯和技巧

我这个老码农是怎么debug标准程序的

我是怎样调试BAPI的,以F-02为例

《干货来袭:2020年公众号内容汇总》。

Debug 系列

DEBUG  系列一:Dump debug
DEBUG  系列二:Configure Debugger Layer
DEBUG系列三:使用  F9 和 watch point
DEBUG系列四:第三方接口debug
DEBUG系列五:Update  模式下的function debug
DEBUG系列六:后台JOB  debug
DEBUG系列七:保存测试参数
DEBUG系列八:Debug弹出框
debug系列九:SM13查看update更新报错
DEBUG系列十:Smartforms  debug
DEBUG系列十一:GGB1  debug
Debug系列十二:QRFC  队列 debug

表维护系列:

创建表维护视图DEMO(1):最常用操作 
表维护视图DEMO(2):动态控制显示列 
维护视图DEMO(3):添加   Status 按钮
表维护视图DEMO(4):单元格级别编辑 
维护视图DEMO(5):视图簇 
知道创建了SM30   维护,怎么找到对应的tcode? 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值