Skip to Content
Author's profile photo Andreas Vogel

How to read ST03N datasets from DB

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.

Table USERTCODE

This table has four key fields: TASKTYPE, ACCOUNT, MANDT, and ENTRY_ID. TASKTYPE is a byte which can be decoded using CL_SWNC_COLLECTOR_INFO=>TRANSLATE_TASKTYPE, and ENTRY_ID contains the transaction code or a report name. The code snippet shows how this can be decoded. As data fields the table contains metrics like response time, cpu time and many others.

Authorization

The ST03N data contains user names. You will need the profile S_TOOLS_EX to see all the user names, otherwise the user names will be encrypted.

Related Weblogs

[1]Code snippet: Which Z* reports are used?

[2] Statistical Records Part 1: Inside STAD

[3] Statistical Records Part 2: RFC Statistics

[4] NW2004s Workload Statistics Collector: Implementing a BAdI as user exit

Assigned Tags

      65 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Andreas,

      I'm looking at the difference between swnc_collector_get_aggregates (described here) and swnc_get_aggregates_frame.

      It looks like swnc_collector_get_aggregates gets the ST03N information for the *current* SAP system. Whereas swnc_get_aggregates_frame can get the information for a *given* SAP system, and that system can be at a differerent release level.

      Is this true?

      Thanks.
      --
      Tim

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Tim,
      you are right. SWNC_COLLECTOR_GET_AGGREGATES reads from the local DB only. The other function can be used to retrieve data from remote systems. If the remote system is a different release (SAP_BASIS) then we map the data (if possible).
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,
                  Your series of blogs on statistical records has been very helpful. Thanks for the blogs.

      I was wondering if any extra information can be introduced in the statistical record by an external application or from within the SAP application to help diagnose performance problems. For example is it feasible to add another parameter(like perf_count=nnn) in the main record or sub records generated in the statistical record.

      -Adi

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Adi,
      no, unfortunately this is not possible today. The structures of the statistical records are fixed, and can't be extended by an application. From time to time SAP introduces a new type of subrecord to include new content into the statistical records.
      Kind Regards, Andreas
      Author's profile photo Former Member
      Former Member
      Thanks for your prompt response 🙂
      Author's profile photo Kimmo Sirpoma
      Kimmo Sirpoma
      Thanks for this blog. It is helpful.
      But this blog's hints are utilizing an API available only in NW04s. I have heard and seen, that it would be possible to get statistics on used and unused programs and tcode also on previous versions like 4.6c. This process would be important during Upgrade projects in order to avoid migrating programs that are no longer in use. I have even seen nice Excel listing of used and unused programs/tcodes. I guess somehow this info is available through ST03, but did not fully understand how. I read your previous blogs I and II.

      Br: Kimmo

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Kimmo,
      yes, the interfaces in NW04 and previous releases is slightly different. I guess I will have to re-write the example for those functions. In advance here are the names of the functions: SAPWL_WORKLOAD_GET_STATISTICS and SAPWL_WORKLOAD_GET_SUMMARY for the statistical data, and SAPWL_WORKLOAD_GET_DIRECTORY for the table of content.
      Kind Regards,
      Andreas
      Author's profile photo Kimmo Sirpoma
      Kimmo Sirpoma
      But to get results I have mentioned, I need to write my own reports, is that so? So nothing similar with standard ST03/ST03N functions? If there would be some standard functions, would it be possible that you would write some instructions how to get it with ST03/ST03N? Sorry, but I am not familiar with ST03.

      br: Kimmo

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Well, ST03N can list only reports and tcodes which have been actually used. You may compare these with the list of all reports and tcodes (from table TADIR), and for this task you would need to write your own report. ST03N can't help you here.
      Best Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,
      I have read all the three blogs.
      These are really nice.
      To a query of Kimmo on this subject, you have mentioned that the code for lower versions of SAP, does not exist.
      Are you in the process of providing such code ?
      We really wish to have such code for mySAP ERP 2004.

      -Nandu More

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Nandu,
      check out the following code snippet. I have adopted the example for NW2004. I hope this helps.
      Kind Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,
      I came across your Blogs while researcing my problem, I hope you can help?
      We recently upgraded to ERP 2005 SAP_BASIS 700. The workload reports that security was using no longer work. I created a report using SWNC_COLLECTOR_GET_AGGREGATES. The data matches what is retrived using tcode ST03N. The problem is that there are missing tcodes and reports from both.
      The following transactions were used as a test:
      AL11
      PA20
      FM2G
      SM04
      SQ01
      S_BCE_68001439
      Z_SE_001
      SU01
      SBWP
      FM5S
      Z_FM_ZFMFINCOD

      ST03N and my report using both monthly total and daily for the individual servers only showed:
      task type  tcode
      01         AL11
      01         PA20
      01         SU01
      01         SBWP
      FE         SBWP

      I spoke to BASIS and they are not setting any parms or doing anything different with the COLLECTOR_FOR_PERFORMANCEMONITOR(RSCOLL00) since the upgrade/support packs.

      I did notice that table TCOLL containing the reports run by RSCOLL00 changed significantly after the upgrade and support packs.
      TCOLL before upgrade/support packs
      RSCUECRM     1     C          X     X
      RSDBPREV     1     C          XXXXXXX     X X X X X XXX X X X X X
      RSDB_PAR     1     C          XXXXXXX     X    X     X
      RSDB_TDB     1     C          XXXXXXX     X            X
      RSDB_WDB     1     C          X     X
      RSHOSTDB     1     *          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSHOSTDC     1     C          XXXXXXX     X X X X X X X X X X X X
      RSHOSTPH     1     *          XXXXXXX     X  X      X
      RSORA811     1     C          XXXXXXX     X      X
      RSORACOL     1     C          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSORAHCL     1     C               XXXXXXXXXXXXXXXXXXXXXXXX
      RSRFCDLT     1     C          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSRFCDMN     1     *          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSSDBDLY     1     C          XXXXXXX     X
      RSSTAT60     1     C          XXXXXXX     X  X  X X  X X  X  X
      RSSTAT83     1     C          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSSTAT87     1     C          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSSTAT90     1     *          XXXXXXX     X     X
      RSSTAT98     1     *          XXXXXXX     X  X  X  X  X  X
      RSSTATPH     1     *          XXXXXXX     X  X     X
      RSTUNE80     1     *          XXXXXXX     X    X        X
      RSXRPM     1     C          X     X
      TCOLL after upgrade/support pack
      RSAMON40     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSCUECRM     1     S          X     X
      RSDBPREV     1     S          XXXXXXX     X X X X X XXX X X X X X
      RSDB_PAR     1     S          XXXXXXX     X    X     X
      RSDB_TDB     1     S          XXXXXXX     X            X
      RSDB_WDB     1     S          X     X
      RSHOSTDB     1     H          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSHOSTDC     1     S          XXXXXXX     X X X X X X X X X X X X
      RSHOSTPH     1     H          XXXXXXX     X  X      X
      RSICFDLT     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSICFDMN     1     A          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSICFJOB     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSORA811     1     S          XXXXXXX     X      X
      RSORACOL     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSORAHCL     1     S               XXXXXXXXXXXXXXXXXXXXXXXX
      RSORASSC     1     S               
      RSORAVSH     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSRFCDLT                         
      RSRFCDMN     1     A          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSSDBDLY     1     S          XXXXXXX     X
      RSSTAT61     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      RSSTAT62     1     S          XXXXXXX     X
      RSSTAT90     1     A          XXXXXXX     X     X
      RSSTAT98     1     A          XXXXXXX     X  X  X  X  X  X
      RSSTATPH     1     A          XXXXXXX     X  X     X
      RSTUNE80     1     A          XXXXXXX     X    X        X
      RSXRPM     1     S          X     X
      SWNCCOLL     1     S          XXXXXXX     XXXXXXXXXXXXXXXXXXXXXXXX
      SWNCREORG     1     S          XXXXXXX     X
      SWNCTOTAL     1     S          XXXXXXX     X  X  X  X  X  X  X
      Could there be a report missing? I have not found a OSS note addressing this problem. Do you have any ideas or suggestions?
      Thnaks for your time. Roger                          

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Roger,
      TCOLL looks fine, but you may check SAP note 966306 for TCOLL in SAP_BASIS 700.
      I checked my development system, and executed transaction SM04 and SU01. Later on ST03N showed entries for SM04 and SU01, executed by me. Really, I don't see any reason why certain transactions do not show up in ST03N. You might check if the correct application server is analyzed, and if the time interval is correct.
      For testing you can use the function "Detaild Analysis -> Last Minutes Load" of ST03N. This is a convenient way to show aggregated data for an arbitrary period of time, e. g. the last 15 minutes. I use this feature frequently when performing such tests.
      Regards,
      Andreas
      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Roger,
      TCOLL looks fine, but you may check SAP note 966306 for TCOLL in SAP_BASIS 700.
      I checked my development system, and executed transaction SM04 and SU01. Later on ST03N showed entries for SM04 and SU01, executed by me. Really, I don't see any reason why certain transactions do not show up in ST03N. You might check if the correct application server is analyzed, and if the time interval is correct.
      For testing you can use the function "Detaild Analysis -> Last Minutes Load" of ST03N. This is a convenient way to show aggregated data for an arbitrary period of time, e. g. the last 15 minutes. I use this feature frequently when performing such tests.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,

      Suppose there is a transaction step that starts in one hour and ends in another. How are these metrics accumulated into ST03 intervals?

      # Steps - Is the step counted in the starting hour or the ending hour?

      CPU Time - Is the step CPU time added to the starting hour or the ending hour? Or is it divided and added to both hours?

      Response Time - same question on response time.

      Thanks.
      --
      Tim

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Tim,
      we count this step for the ending hour. And all metrics (CPU time, DB time, response time, etc) are counted for the ending hour as well.
      Kind Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas and thanks for this blog,

      i must pull  ST03 data and injected them in the database of another extern soft (Vantage agenteless for performance, extension .sqd)

      whit SWNC_COLLECTOR_GET_AGGREGATES for extract data, what is the extensions of ST03 data extracted? or it's possible to choice the extension

      thanks and i'm sorry for my english

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      I'm not sure what you mean with "extension". Are you referring to the internal data format of a file, like *.doc or *.xls? Sorry, if I didn't get the point.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi,
      not exactly, i'm referring to extension (.xls, .csv, .doc...) of external data, once extracted out from differents datatables.

      perhaps that my question is not clear, so please, do you have auther documents about swnc_collector_get_aggregates and steps to extract data out to SAP

      thanks

      wassim

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Sorry, but the interface described in this blog is an internal interface. You can write an ABAP program to read the data from this interface. This doesn't answer the question how the data can be imported to your target DB.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      thank you very much Andreas for your answer

      Author's profile photo Former Member
      Former Member
      Hi, Andreas

      I see that SAP NetWeaver BI can pull and store ST03 data from other SAP systems. Can I get that information out of BI, say by calling an RFM or calling a custom query definition?

      Any pointers are appreciated. Thanks.
      --
      Tim

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Tim,
      yes, we have a reporting in BI for the statistical records. Follow this link Performance Reporting in BW
      to get more information about CCMSBI. And this one https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40948571-1144-2a10-dc90-c7c07b333842 points to an interesting PDF file. I hope this helps.
      Best Regards,
      Andreas
      Author's profile photo Henry Curtis
      Henry Curtis
      Hi Andreas

      Thank you for your blog - function module SAPWL_WORKLOAD_GET_STATISTICS seems useful.
      How can I get the number of times each user accessed each transaction?
      (Apologies if this message is duplicated - I was disconnected when attempting to send previously).

      Thanks, Henry

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo Henry,
      what exactely is your intention? What is "the number of times each user accessed each transaction" ? Is it the number of dialog steps a user performs inside a particular transaction?
      Regards,
      Andreas
      Author's profile photo Henry Curtis
      Henry Curtis
      Hi Andreas

      My intention is to see how many times the user executes a transaction. So this would be the number of times, for example, the user types the transaction into the command bar. Or if it is a report / program that can be executed via SA38 / SE38, the number of times the user executes the program (e.g. with function F8).
      If I was to program it in an executable program, the check would occur once in, say, the load-of-program or initialization events.
      This would then give a good representation of how much the transaction is used, and where training, documentation, upgrade etc effort should be applied.

      Thanks, Henry

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo Henry,
      the table USERTCODE of function SWNC_COLLECTOR_GET_AGGREGATES contains the field LUW_COUNT. This field is used to count the number of transaction calls (/nTCODE). The field DCOUNT counts the number of dialog steps for a particular T-code. I hope this helps.
      Best Regards,
      Andreas
      Author's profile photo Henry Curtis
      Henry Curtis
      Hi Andreas
      Thanks you, this does help. However, only from SAP_BASIS 700.
      Prior to that release, with the functional module SAPWL_WORKLOAD_GET_STATISTIC for example, it seems there is no way to get the number of transaction calls?
      Thanks, Henry
      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo Henry,
      for SAP_BASIS 6.40 and previous releases you can use the table APPLICATION_STATISTICS of function SAPWL_WORKLOAD_GET_STATISTICS. It contains a field LUW_COUNT. This field is used to count the number of transaction calls (/nTCODE). The field DCOUNT counts the number of dialog steps for a particular T-code.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Interesting, Andreas.

      Is a LUW associated with a business transaction? Is there a 1:1 relationship between an LUW and a business transaction GUID?

      If you divide DCOUNT/LUW_COUNT, do you get the number of dialog steps per business transaction?

      Is this the interpretation of the other counts:
      DCOUNT - number of dialog steps
      BCOUNT - number of background steps
      UCOUNT - number of update steps
      SCOUNT - number of spool steps
      ECOUNT - number of enqueue steps

      Thanks.
      --
      Tim

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Tim,
      yes, each time a business transaction is completed a new business transaction GUID is generated. And the LUW count is just counting the number of different GUID.
      DCOUNT/LUW_COUNT gives you the average number of dialog steps for a business transaction.
      Your interpretation of D/B/U/S/ECOUNT is correct. Each of these is associated with a particular type of work process (DIA/BTC/UPD/UPD2/SPO/ENQ)
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      I am writing a report using SWNC_COLLECTOR_GET_AGGREGATES function . Through Application_Statistics can i able to see the transactions  executed by each user?.

      Regards,
      kavitha

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo,
      the function SWNC_COLLECTOR_GET_AGGREGATES has a parameter USERTCODE. From there you can see the tcodes used by a user.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hello Andreas,

        Thanks. I have a program which gives the data from USERTCODE structure using SWNC_COLLECTOR_GET_AGGREGATES and another one from Application Statistics structure.  It looks both of the structure is giving same data. When i try to compare the output , the USERTCODE output is not showing all the entry_id . What is the difference between usertcode and application structure.?
         In ST03N , analysis view is it possible to see luw_count value?.  For some transactions or report the luw_count is 0?. Why it is showing as 0.

      Regards,
      kavitha jude

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo Kavitha,
      sorry, from where do you get Application Statistics structure? It's not a parameter of SWNC_COLLECTOR_GET_AGGREGATES - which function are you using?
      LUW_COUNT: counting the LUW of an application (or Tcode) is tricky, and it isn't possible to count the LUW correctly in all cases. Therefore the LUW count is not as precise as the number of dialog steps.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hello Andreas,

         In my program i am using SAPWL_WORKLOAD_GET_STATISTIC function. This function in turns calls the SWNC_COLLECTOR_GET_AGGREGATES  function.  In SAPWL_WORKLOAD_GET_STATISTIC function i am using SWNCAGGAPPSTAT to get the luw_count.  This program i am going to execute it in 620 release systems and above.

         Why i need luw_count is to find the number of time a particular transaction is executed by each user.?
         If the luw_count data is not precise then how can i find the number of times the transaction got executed in the system for each user.?

      Regards,
      kavitha

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo Kavitha,
      the function SAPWL_WORKLOAD_GET_STATISTIC is available with SAP_BASIS 640 and previous releases. The function itself might exist in later releases, but it is not recommended to use them.
      Instead SWNC_COLLECTOR_GET_AGGREGATES is available with SAP_BASIS 700 and later releases, and it is a replacement for SAPWL_WORKLOAD_GET_STATISTIC. We highly recommend to use SWNC_COLLECTOR_GET_AGGREGATES.

      Regarding luw_count: there is no way to get the exact number of executions of a transaction. You just get the number of transaction steps (aka dialog steps). The luw_count is just an approximate value, sorry.
      Best Regards,
      Andreas

      Author's profile photo Former Member
      Former Member
      Hello Andreas,

        Do you have any other idea to find the exact number of executions of a transaction ?

         Can i do this way to calculate the exact number of executions of a transaction? 

      Take DStep  =  dcount/luw_count get the number of dialog steps per transaction . Then  DStep * Dcount i can get how many time the transaction is executed. Is this correct?.

      Regards,
      kavitha

      Author's profile photo Former Member
      Former Member
      Hello Andreas,

        Thanks. I have a program which gives the data from USERTCODE structure using SWNC_COLLECTOR_GET_AGGREGATES and another one from Application Statistics structure.  It looks both of the structure is giving same data. When i try to compare the output , the USERTCODE output is not showing all the entry_id . What is the difference between usertcode and application structure.?
         In ST03N , analysis view is it possible to see luw_count value?.  For some transactions or report the luw_count is 0?. Why it is showing as 0.

      Regards,
      kavitha jude

      Author's profile photo Former Member
      Former Member
      Hello Andreas,

        In st03n analysis view can i able to see the LUW_COUNT field value for each transaction.

      Regards,
      kavitha

      Author's profile photo Former Member
      Former Member
      Hello Andreas,

        In st03n analysis view is it possible to where see the LUW_COUNT field value for each transaction.

      Regards,
      kavitha

      Author's profile photo Former Member
      Former Member
      How is ACCOUNT different from USERNAME?

      In my data, they look the same, but when both are reported in the same table, ACCOUNT is blank.

      Thanks.
      --
      Tim

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Tim,
      you're right, USERNAME and ACCOUNT are synonyms in most cases. And table USERWORKLOAD contains both fields, where ACCOUNT is empty always. There have been plans to include an account value from users master data, but these plans have been dropped.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,
      to my understanding, since the update process is pretty asynchronous, the average duration of the "logical" db update is not exactly the same as the "real" duration at the DB level. Is there any chance to "substract" the latter from the ST03N/transactional view or time profile in respect of a specific trx./program/diag.step?
      Thanks in advance.
      Regards, Dmitry
      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi,
      the metrics of the DB statistics are measured by the SAP DB interface. This is pretty low-level, and covers the DB operations like read/update/insert/delete. There isn't any possibility to determine the "real" duration on DB level, sorry.
      Regards, Andreas
      Author's profile photo Former Member
      Former Member
      Can't we approximate the time for a physical DB access?

      We have
      - the total time for all DB accesses
      - the number of logical DB accesses
      - the number of those that required an actual physical DB access

      ST03 reports the average time for a logical access as:

      Total DB time / number of logical DB accesses.

      Can't we approximate (upper bound) the average time for a physical access as:

      Total DB time / number of physical DB accesses

      I'm using 'logical' and 'physical' access as in standard DB terminology: All accesses to data are logical. Some can be answered from data in cache (cache hit). Others cannot (cache miss) and require a physical access. Number of logical accesses >= number of physical accesses.

      --
      Tim

      Author's profile photo Former Member
      Former Member
      Hi Andreas,
      thanks a lot for ur blog, it has been very useful. I have a doubt about the field "TA - tasktype" in table USESRTCODE, could you tell me what "FE" or "01" value means?
      Thanks a lot.
      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi,
      these hex values are codes for the task types.
      FE(hex)= 254 (dec). You can look up the values in class CL_SWNC_CONSTANTS. There are many attributes like TT_RFC = 254 (which is Task type 'RFC') or TT_DIA = 1 (task type 'Dialog').
      Regards, Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,

      You've got quite a useful set of blogs, I wouldn't know where to start on my statistical info quest without you!

      I have quite a complex question for you:

      In my system, when I go to STAD, it can't find something older than 3 days, yet in ST03N I can see data older than that. I don't know what happened, yet I think the statistical files were deleted due to a restart or sorts.

      Anyway, that's not the main question. The main thing is, can I rely on this FM to bring me everything that happened in the system, say, over a period of one month or so? Because using the FMs from STAD is incredibly time consuming and I don't really need all that info for my task, I just need the names of the users that logged on in a specified time period, for each day.

      Thanks in advance and best regards,

      George

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi George,
      the stat files will be reorganized periodically. Usually STAD can access data of the last 48 hours.
      There is a hourly job which reads all statistical records and aggregates the data for ST03N. This aggregated data of ST03N is available for 7 days (daily data), 4 weeks (weekly data), and 2 month (monthly data). These values can be customized. Yes, you can rely on this data.
      Set the correct value for PERIODTYPE when using the function "swnc_collector_get_aggregates" ('D', 'W', 'M'). Use function "SWNC_COLLECTOR_GET_DIRECTORY" first to fetch a directory of all available datasets, then read the appropriate dataset using "swnc_collector_get_aggregates".
      Best Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,

      If you could also tell me from where I can customize those values, I'm buying you a beer if you're from or coming in Berlin this year.

      Best regards,

      George

      P.S. : Sorry if the question is offtopic, to me it does look like it's connected to the subject.

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi George,
      no sweat, this is still on-topic.
      Start Tx ST03N. On the left hand side you'll find a tree. Follow the path: "Collector and Performance DB" -> "Performance DB" -> "Workload Collector Database" -> "Reorganization" -> "Control". For each aggregation (e. g. "User Profile", Area "WN") you can specify the reorg parameter. Daily aggregates will be kept for 7 days, weekly data for 4 weeks, and monthly data for 2 month by default.
      Example: today, November, 19th, you have access to monthly datasets from October and September (and November, of course). The data from August has been reorganized already.
      Best Regards,
      Andreas
      (thanks for the beer:-)
      Author's profile photo Former Member
      Former Member
      Hi Andreas,

      Again, thanks for your blog, it's been really helpful, contact me if you happen to be in Berlin to get that beer.

      I'm in the testing phase with my report which, based on this FM call, returns who logged on to the Portal and what did they do there. I noticed a few interesting things: Although STAD and ST03N are very precise in telling me how many times I ran SE16 and STAD itself, it's quite unreliable in the portal. Here, if I run some applications, I get only a lot of RFC things happening in STAD and only when I create and save some objects I do get some HTTP / HTTPS transactions like CRM_ACCOUNT (not every object type being saved returns a worthwhile transaction). My understanding was that, if I run an application like Activities in the portal, I can see it almost right away in STAD, assumption which I'm now finding out it's not true.

      I found out this note:
      Note 1259820 - Does SPM (Firefighter) Support the Logging of Portal Actions

      It relates more to SPM (Firefighter) ,whatever that is, but it says an important thing:

      "This is to clarify that the Firefighter only supports ABAP Based Transactions and specifically those captured by the Standard SAP Transaction Monitoring on the STAT/STAD file. Therefore we do not support the monitoring of the Portal actions as of now."

      So, I believe the answer is a negative one, I just wanted to check if you have some "inside information" worth sharing.

      Best regards,
      George

      Author's profile photo Former Member
      Former Member
      We have mulitple clients on our SAP instance.  We created a report that get the total counts of a transaction for the user.  Now we need to know how many times the transaction was run on each client.  How do I get this information?

      Thanks,
      Sherry

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hallo Sherry,
      you could use the structure SWNCAGGUSERTCODE from the function SWNC_COLLECTOR_GET_AGGREGATES. This structure contain the client (MANDT) and the Tcode (ENTRY_ID). Hope this helps.
      Best regards,
      Andres
      Author's profile photo Former Member
      Former Member
      Hello Andreas,

      I am a little bit confused regarding the ranking lists. The rubric headings are called “Top Response Time of Dialog Steps “and “Top DB Accesses of Dialog Steps“, but the query shows background processes (RFC’s, etc.) as well. I only expected dialog processes. What is the right meaning of the two queries?

      I am looking for a method to get the top n response time of background processes for a given period (for example the last day). Do have any ideas?

      Thank you very much in advance,
      Dennis

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Dennis,
      the ranking lists are not restricted to tasktype DIALOG. You'll find all tasktypes in these lists, including BATCH (Tasktype = 4). I hope this helps.
      Kind regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas, thanks for your quick response. Is there a way to identify the job name and job count, too? Actually I want to have the top n batch jobs.

      Cheers,
      Dennis

      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Dennis,
      this should be easy, the job name BTCJOBNAME and the step number BTCSTEPNR are included in the structures.
      Regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas, both fields aren't populated in the structure.
      Regards, Dennis
      Author's profile photo Andreas Vogel
      Andreas Vogel
      Blog Post Author
      Hi Dennis,
      you're right, the fields are empty, because ST03N doesn't make use of them anyway. If you really need this then please open a support ticket on component BC-CCM-MON-TUN.
      Kind regards,
      Andreas
      Author's profile photo Former Member
      Former Member
      Hi Andreas,

      as I mentioned before the two fields (BTCJOBNAME and BTCSTEPNR) are always empty. Therefore I need another approach. Is it possible to reference from the statistical record - showing in ‘STAD’ - to the exact job?

      Thanks for taking the time.

      Regards,
      Dennis

      Author's profile photo Former Member
      Former Member
      You help will be gratefully recieved ! Thanks
      Author's profile photo Former Member
      Former Member
      Hi Andreas ,

      Thank you very much for your excellent blog!

      To elaborate my questions, I am hoping to convert response time distribution including GUI time cnt00x (x=1,2,3...9) under tasktype into response time distribution without GUI time.

      Thank you very much in advance

      Patrick

      Author's profile photo Devisha Bhavik
      Devisha Bhavik

      Hi Adreas,

       

      I have been using FM -

      SWNC_COLLECTOR_GET_AGGREGATES based on your blog and lot of very helpful comments! IT IS very helpful.

       

      I was wondering what does it mean by UPDATE Steps count which is UCOUNT field in the USERTCODE table result.

       

      We had seen that for some users this count is way higher compared to DCOUNT which is dialog count.

       

      So, wanted to understand what Update Steps means.

       

      -Bhavik