Single Transaction Analysis (ST12) getting started

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

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

 

原文地址:

https://blogs.sap.com/2009/09/08/single-transaction-analysis-st12-getting-started/

 

he Single Transaction Analysis was developed to promote the usage of ABAP trace inside SAP Support. It integrates the ABAP- (SE30) and the Performance (ST05) Trace into one transaction. This blog will show how to take a trace with ST12 in the so called “Current Mode” scenario. Further options for performning traces and analysis will be presented in future blogs.

Before you start:

ST12 is delivered as a part of the Service tools for Applications (ST-A/PI). SAP note 69455 describes how to get the latest version of the ST-A/PI. Note that the ST12 transaction is not officially documented / supported and only available in the English language. Although it is mainly intended for use by SAP or certified service consultants during SAP Service Sessions, you can use it for you own performance analysis. A description of ST12 is given in SAP note 755977 (ST12 “ABAP Trace for SAP EarlyWatch/GoingLive”).

ST12 main Screen:

The main screen of ST12 has three main parts as shown on figure 1.

Figure 1: main screen

Using ST12 with Current Mode:

In the “Current Mode” Scenario you are going to trace the execution of a program or transaction. Before you trace, it is recommended to execute your program or transaction several times to fill the buffer and caches, as filling the buffers and caches is something that can’t be optimized with ABAP or SQL tuning. Before you can start the trace you have to define the measurement scope. In ST12 this is done “on the fly”, no measurement variants are saved. After starting ST12 and clicking on “Current Mode” (see nr. 1 in figure 1) you will see a screen like figure 2.

图片

Figure 2: Current Mode

You can enter a comment to give a meaningful description for the trace. Enter your program or transaction in the corresponding field and set the appropriate radio button, see nr. 2 in figure 2. In the lower part of the screen you define the measurement scope. The left part is for the ABAP trace (SE30) and the right part for the Performance Trace (ST05), see nr. 3 in figure 2.

Note: Since ST12 uses the functionality of both transactions (SE30 and ST05) the options are similar or the same. ST12 hides some details to make the traces more easy to use.

For the ABAP trace the most important decision is if you want to trace “with internal tables”. It is recommended to switch this setting on. Other options like Particular units, Filters or “Further opt.” are only needed in exceptional cases and beyond the scope of this “getting started” blog.

If you click on “Further opt.” (see nr. 4 in figure 2) the following screen pops up:

图片

Figure 3: further Options

Increase the “Max. size of file” to 20 MB (see nr. 5 in figure 3) and the “Max. trace runtime” to 3600 seconds (see nr. 6 in figure 3) if you have long running programs. The aggregation is set to “by calling position” by default which is the recommended option. All other options only have to be changed in exceptional cases. For example, if you get strange or negative times in the ABAP traces, you should use the low resolution clock.

For the performance trace you can decide whether you want to take the SQL-, Enqueue- and / or RFC trace. In the above scenario only the SQL Trace is switched on. The SQL Trace is the most important performance trace.

This is all you have to do. You can start your program or transaction now by clicking “Execute / start trace” (see nr. 7 in figure 2). After your program or transaction has finished and you have returned to ST12 you will see your trace in the lower part of the screen.

The status column (see nr. 8 in figure 4) shows you whether your trace is ready for evaluation. There might be a red and white circle which means the ABAP trace is still being imported into the database. The yellow flash indicates a measurement error (e.g. time limit exceeded, file size to small, …). The green tick shows that the ABAP trace has been successfully imported to the database.

Note that ST12 imports the ABAP trace files into the database, in order to make them available in the whole system and keeps them for later analysis. In SE30 the trace files are application server specific and deleted after a certain number of days. The performance trace is not imported by ST12 and therefore is only available until the trace files are overwritten.

To evaluate the trace you can click on ABAP trace (see left arrow in figure 4) in order to display the imported ABAP trace. The list on figure 3 has been sorted descending by the Net column. This means the total times for each calling position is displayed in descending order.

In order to evaluate the performance traces just click the button Performance traces, see right arrow in figure 4. This will display the basic list of the performance trace. For the SQL trace it is recommended to start with the statement summary. Therefore in the basic list click menu Trace List -> Summary by SQL Statements. In figure 3 on the right bottom you can see an example of the SQL Trace Summary.

Note: Please refer to The SQL Trace (ST05) – Quick and Easy Blog (The SQL Trace (ST05) – Quick and Easy) for further details on ST05 analysis.

图片

Figure 4: Trace Analysis

Summary:

In order to take an ABAP and SQL Trace at the same time for a program you are going to execute the following steps:

  • 1.) Call ST12, click on CURRENT MODE (Nr. 1 in figure 1)

  • 2.) Fill in the program or transaction and a meaningful comment (Nr. 2 in figure 2)

  • 3.) Define the measurement variant:

  • a. switch on ABAP and SQL Trace and use internal tables (Nr. 3 in figure 3)

  • b. increase the file size and the duration (Nr. 4 in figure 2 and Nr. 5 and 6 in figure 3)

  • 4.) Execute your program (Nr. 7 in figure 2)

  • 5.) Evaluate the trace (figure 5)

This blog demonstrated how ST12 combines the ABAP and Performance trace and how easy it is to trace a program and measure both ABAP and SQL execution. Future blogs will show advanced topics for trace taking and analysis.

More information on ST12 can be found here:

ST12 WIKI:

http://wiki.sdn.sap.com/wiki/display/ABAP/Single+Transaction+Analysis

Blogs:

ST12 – The workprocess trace

Books:

http://www.sap-press.com/product.cfm?account=&product=H3060

http://www.sap-press.de/1821

 

推荐阅读:

记码农十周年(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

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

 

原文地址:

https://blogs.sap.com/2009/09/08/single-transaction-analysis-st12-getting-started/

 

he Single Transaction Analysis was developed to promote the usage of ABAP trace inside SAP Support. It integrates the ABAP- (SE30) and the Performance (ST05) Trace into one transaction. This blog will show how to take a trace with ST12 in the so called “Current Mode” scenario. Further options for performning traces and analysis will be presented in future blogs.

Before you start:

ST12 is delivered as a part of the Service tools for Applications (ST-A/PI). SAP note 69455 describes how to get the latest version of the ST-A/PI. Note that the ST12 transaction is not officially documented / supported and only available in the English language. Although it is mainly intended for use by SAP or certified service consultants during SAP Service Sessions, you can use it for you own performance analysis. A description of ST12 is given in SAP note 755977 (ST12 “ABAP Trace for SAP EarlyWatch/GoingLive”).

ST12 main Screen:

The main screen of ST12 has three main parts as shown on figure 1.

Figure 1: main screen

Using ST12 with Current Mode:

In the “Current Mode” Scenario you are going to trace the execution of a program or transaction. Before you trace, it is recommended to execute your program or transaction several times to fill the buffer and caches, as filling the buffers and caches is something that can’t be optimized with ABAP or SQL tuning. Before you can start the trace you have to define the measurement scope. In ST12 this is done “on the fly”, no measurement variants are saved. After starting ST12 and clicking on “Current Mode” (see nr. 1 in figure 1) you will see a screen like figure 2.

图片

Figure 2: Current Mode

You can enter a comment to give a meaningful description for the trace. Enter your program or transaction in the corresponding field and set the appropriate radio button, see nr. 2 in figure 2. In the lower part of the screen you define the measurement scope. The left part is for the ABAP trace (SE30) and the right part for the Performance Trace (ST05), see nr. 3 in figure 2.

Note: Since ST12 uses the functionality of both transactions (SE30 and ST05) the options are similar or the same. ST12 hides some details to make the traces more easy to use.

For the ABAP trace the most important decision is if you want to trace “with internal tables”. It is recommended to switch this setting on. Other options like Particular units, Filters or “Further opt.” are only needed in exceptional cases and beyond the scope of this “getting started” blog.

If you click on “Further opt.” (see nr. 4 in figure 2) the following screen pops up:

图片

Figure 3: further Options

Increase the “Max. size of file” to 20 MB (see nr. 5 in figure 3) and the “Max. trace runtime” to 3600 seconds (see nr. 6 in figure 3) if you have long running programs. The aggregation is set to “by calling position” by default which is the recommended option. All other options only have to be changed in exceptional cases. For example, if you get strange or negative times in the ABAP traces, you should use the low resolution clock.

For the performance trace you can decide whether you want to take the SQL-, Enqueue- and / or RFC trace. In the above scenario only the SQL Trace is switched on. The SQL Trace is the most important performance trace.

This is all you have to do. You can start your program or transaction now by clicking “Execute / start trace” (see nr. 7 in figure 2). After your program or transaction has finished and you have returned to ST12 you will see your trace in the lower part of the screen.

The status column (see nr. 8 in figure 4) shows you whether your trace is ready for evaluation. There might be a red and white circle which means the ABAP trace is still being imported into the database. The yellow flash indicates a measurement error (e.g. time limit exceeded, file size to small, …). The green tick shows that the ABAP trace has been successfully imported to the database.

Note that ST12 imports the ABAP trace files into the database, in order to make them available in the whole system and keeps them for later analysis. In SE30 the trace files are application server specific and deleted after a certain number of days. The performance trace is not imported by ST12 and therefore is only available until the trace files are overwritten.

To evaluate the trace you can click on ABAP trace (see left arrow in figure 4) in order to display the imported ABAP trace. The list on figure 3 has been sorted descending by the Net column. This means the total times for each calling position is displayed in descending order.

In order to evaluate the performance traces just click the button Performance traces, see right arrow in figure 4. This will display the basic list of the performance trace. For the SQL trace it is recommended to start with the statement summary. Therefore in the basic list click menu Trace List -> Summary by SQL Statements. In figure 3 on the right bottom you can see an example of the SQL Trace Summary.

Note: Please refer to The SQL Trace (ST05) – Quick and Easy Blog (The SQL Trace (ST05) – Quick and Easy) for further details on ST05 analysis.

图片

Figure 4: Trace Analysis

Summary:

In order to take an ABAP and SQL Trace at the same time for a program you are going to execute the following steps:

  • 1.) Call ST12, click on CURRENT MODE (Nr. 1 in figure 1)

  • 2.) Fill in the program or transaction and a meaningful comment (Nr. 2 in figure 2)

  • 3.) Define the measurement variant:

  • a. switch on ABAP and SQL Trace and use internal tables (Nr. 3 in figure 3)

  • b. increase the file size and the duration (Nr. 4 in figure 2 and Nr. 5 and 6 in figure 3)

  • 4.) Execute your program (Nr. 7 in figure 2)

  • 5.) Evaluate the trace (figure 5)

This blog demonstrated how ST12 combines the ABAP and Performance trace and how easy it is to trace a program and measure both ABAP and SQL execution. Future blogs will show advanced topics for trace taking and analysis.

More information on ST12 can be found here:

ST12 WIKI:

http://wiki.sdn.sap.com/wiki/display/ABAP/Single+Transaction+Analysis

Blogs:

ST12 – The workprocess trace

Books:

http://www.sap-press.com/product.cfm?account=&product=H3060

http://www.sap-press.de/1821

 

推荐阅读:

记码农十周年(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? 

 

 

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、付费专栏及课程。

余额充值