首页 > 其他分享 >Single Transaction Analysis (ST12) getting started

Single Transaction Analysis (ST12) getting started

时间:2022-10-12 19:38:45浏览次数:100  
标签:Transaction trace figure getting started see ABAP program ST12


 

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.

Single Transaction Analysis (ST12) getting started_ST12

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:

Single Transaction Analysis (ST12) getting started_sapliumeng_02

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 eval(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 eval(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 eval(ST05) – Quick and Easy Blog (The SQL Trace (ST05) – Quick and Easy) for further details on ST05 analysis.

Single Transaction Analysis (ST12) getting started_性能_03

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​

 


标签:Transaction,trace,figure,getting,started,see,ABAP,program,ST12
From: https://blog.51cto.com/u_15680210/5751331

相关文章