Have you ever asked the question "Who uses all these Z* reports? Are they used at all?" Well, ST03N could give you the answer, but sometimes you might get the result in a more condensed format. So you implement your own report to utilize the aggregated statictical records of ST03N calculating your own metrics and reports.
With NetWeaver 2004s (SAP_BASIS 700) a new API is available. The function SWNC_COLLECTOR_GET_AGGREGATES provides all the tables used by ST03N. Implementing a small program you can read the data, and extract whatever you are interested in. The code snippet shows you the basic steps.
Let's have a short look at the interface of the function module. Before you can use this function you need to know the parameters. And you might read the documentation provided with the function in the ABAP workbench.
The parameter COMPONENT is used to specify the application server. Use the name TOTAL if you want to get the data of all application servers.
The Parameter ASSIGNDSYS is optional. Leave it empty, or specify the SYSID of your system.
PERIODTYPE specifies the type of the period you want to analyze. Valid values are D for days, W for weeks, and M for months.
PERIODSTRT is a date. Specify the day you are interested in.
The parameter SUMMARY_ONLY is optional. Specify an X if you just want to read the table TASKTYPE.
Parameter FACTOR is optional. The default value is 1000. This is used to scale all time metrics from microseconds to milliseconds. Leave it as it is.