Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
ManfredMensch
Product and Topic Expert
Product and Topic Expert
18,922
As a business application developer, you need to ensure that your apps run with optimal performance. While this holds for all types of applications, in this blog post I am specifically looking at web apps, and in particular I am focusing on SAP S/4HANA applications using web-based access.

Your app's users demand short end-to-end response times to work efficiently. For each user interaction of your web application, you can break down its end-to-end response time into three main contributors:

  1. Front end (web browser or native mobile)

  2. Network

  3. Back end (for SAP S/4HANA web applications this is further subdivided into the ABAP business logic and the SAP HANA database persistency)


You need reliable measurements on these components to assess a dialog step's duration. (Some user interactions may be handled exclusively on the front end. These front-end-only steps do not have any contributions from network and back end.) Most user interactions in Online Transaction Processing (OLTP) applications have their end-to-end response times dominated by the front end plus the network contributions.

Another relevant aspect of your web application's performance is its back-end resource consumption. Here the challenge is that one user interaction triggers an unpredictable number of HTTP roundtrips into the back end. They must be identified and aggregated to get dependable data on consumed hardware resources like CPU time or main memory.

In my previous blog post Measure your Application’s Performance and Resource Consumption: Evaluate Statistics Records with Tr... I have described the statistics records collected by the ABAP kernel and I have explained how you use my transaction STATS to display and interpret the relevant statistics records. I have also mentioned some limitations of the statistics records, especially that they focus on server response time and that they correspond to individual tasks executed in the ABAP back end.

In this blog post I explain how front-end statistics records fill these gaps and how my transaction STATS_FE gives you a complete end-to-end picture of the performance and scalability of your web application. You can use STATS_FE since SAP NetWeaver 7.56. I am continuously improving it and this blog post presents the tool’s state for SAP NetWeaver 7.57 as of late January 2022.

What are Front-End Statistics Records?


SAP's most important UI frameworks (SAP GUI for HTML, SAPUI5, and Web Dynpro ABAP) have been equipped to take performance-related measurements on front-end devices. Client-specific performance information is collected per user interaction. Even some---but not all---of the previously mentioned front-end-only steps (user interactions without associated HTTP requests) trigger the logging of front-end statistics. At the end of a user interaction the gathered data is assembled into a front-end statistics records which will subsequently be sent into the ABAP back end.

The available meta data

  • identify the application and the user interaction step,

  • indicate the front end's operating system, and the HTML browser with its version,

  • specify the UI framework,

  • establish the relation with the back-end statistics records that correspond to the HTTP requests.
    (In my blog post on STATS, they were simply called statistics records. From now on I will use the more precise terms back-end or main statistics record.)


Time durations are available for

  • end-to-end response time
    difference between the start and end times of the user interaction, as determined by the UI framework

  • client navigation time
    sum of all HTTP request’s navigation times, corrected for overlaps

  • client round trip time
    sum of all client-side HTTP request durations, corrected for overlaps

  • client processing time
    calculated as end-to-end response time – client navigation time – client round trip time

  • back-end request time
    sum of all client-side HTTP request durations, measured on the front end

  • server response time
    sum of all server-side HTTP request durations, measured on the back end and sent to the front end with the HTTP response

  • network time
    sum of all differences (client-side HTTP request durations – server-side HTTP request durations)


KPIs related to data transfer include

  • number of HTTP requests

  • amount of data sent

  • amount of data received

  • a flag to indicate whether HTTP requests were compressed


As I have stressed in my previous post the "value of your performance analysis depends on the quality of the underlying measurements. While the collection of data into the statistics records is performed autonomously by the SAP kernel, you need some preparation to ensure that the captured information accurately reflects the performance of the application." This continues to hold, and you should take the same preparatory steps as mentioned there.

How Do You Analyze Front-End Statistics Records?


To view the front-end statistics records related to an execution of your web application you run SAP GUI transaction STATS_FE in the ABAP system that acts as the back end for your web application's execution. On the start screen (Fig. 1) you specify criteria for the subset of front-end statistics records you want to analyze. The filter criteria are subdivided into four areas.

Figure 1: On the STATS_FE start screen, you define filter conditions for the subset of front-end statistics records you want to analyze, specify from where the records are retrieved, and select the layout of the data display.


You determine the Monitoring Interval in the topmost area. By default, it extends 10 minutes into the past and 1 minute into the future. Records written during this period are displayed if they fulfill the conditions specified in the other areas of the start screen. You want STATS_FE to show as few unrelated records as possible. Therefore, you adjust this interval based on the start and end times of your application's execution.

You define additional criteria that the records must meet in the Record Filter area. Be as specific and restrictive as possible, so that only records relevant for your investigation will be displayed. Particularly helpful are client and user. If you want to focus on expensive user interactions in your web application, you can specify lower thresholds for measurement data, such as end-to-end response time or number of network roundtrips. The other conditions support advanced analyses and comparisons.

By default, statistics records are read from all application server instances of the system. In the Configuration section, you can change this to the local instance, or to any subset of instances within the current system. Restricting the statistics records retrieval to the instance (or instances) where the application was executed shortens the runtime of STATS_FE. The option Include Statistics Records from Memory is selected by default, so that STATS_FE will also process records that have not yet been flushed from the memory buffer into the file system.

Under Display Layout, select how the associated subset of key performance indicators (KPIs)—the captured data—will be arranged in the tabular display of front-end statistics records. The pre-selected layout shows all KPIs from the front-end statistics records and the most important aggregated KPIs of the associated back-end statistics records.

What do You Learn from Front-End Statistics Records?


Fig. 2 shows the list of front-end statistics records based on the settings specified in the STATS_FE start screen (Fig. 1).

Figure 2: Front-end statistics records matching the criteria specified on the STATS_FE start screen (Fig. 1). The list shows front-end statistics records that correspond to the creation of a sales order with SAP S/4HANA application F3893.


The table displays the selected front-end statistics records in chronological order and contains their main KPIs. The header columns—shown with a blue background—uniquely link each record to the corresponding user interaction. The data columns contain the KPIs that indicate the performance of the user interactions. These columns are subdivided into two groups: Those with a gray background show the performance-related measurements taken on the front end. They are the true front-end statistics records. The columns with the yellow background cover the most important aggregated KPIs of the associated back-end statistics records.
Measurements for times and durations are given in milliseconds (ms). Memory consumptions and data transfers are measured in kilobytes (KB).

The table of statistics records is displayed within an ALV grid control and inherits all functions of this SAP GUI tool. To access them, expand the toolbar by clicking on the Show Standard ALV Functions button (the black triangle that points to the right).

The End-to-End Response Time is split into Client Navigation TimeClient Round Trip Time, and Client Processing Time. This breakdown tells you if a slow user interaction suffers from technical problems to start the first HTTP request, in which case Client Navigation Time would be high. A large Client Processing Time typically indicates that the interpretation or rendering of the HTTP requests takes too long. Slow HTTP requests show up as high Client Round Trip Time. This KPI takes into account if HTTP requests overlap. The related KPI Server Request Time does not apply such a correction, but simply adds the individual request's durations. HTTP requests can be slow because their processing in the back end takes too much time, or because the network communication is too slow. This latter case is indicated by a high Total Network Time.
For most dialog steps in SAP S/4HANA applications, users expect an End-to-End Response Time below 1 s. To reliably achieve this, Client Navigation Time plus Client Processing Time shall be below 300 ms, and Total Network Time in a wide area network must not exceed 350 ms. The remaining 350 ms are available for back-end processing.

Further data on the communication between front end and back end, are the Network Roundtrips, and the transferred amount of data, split into Sent Data and Received Data. The Compressed flag is blank if there is at least one uncompressed response body with size above 1 KB.
To achieve an End-to-End Response Time less than 1 s a user interaction must not trigger more than two non-overlapping synchronous roundtrips, and ideally does not transfer more than 10 kB of data.

For each front-end statistics record, STATS_FE finds the associated main statistics records and aggregates their most important KPIs: Durations are summed; for memory consumptions, the maximum is determined. The values (together with the number of detected main records in column Count of Main Records) are displayed with a yellow background. With these measurements you can assess the user interaction's overall resource consumption in the back end.
As a rule of thumb, a simple dialog step (expected End-to-End Response Time below 1 s) shall use less than 350 ms ABAP CPU Time and less than 150 ms HANA CPU Time.

You might expect that Network Roundtrips always equals Count of Main Records, but the front-end statistics may include requests that have been handled by the browser cache, or requests that were sent to other back ends than the one where you run STATS_FE, or requests that serve generic purposes not directly relevant to the application's business objective. On the other hand, the back end may internally trigger tasks (e.g., RFCs, UPDATEs) resulting in separate main statistics records. Therefore, deviations in both directions are possible. Front-end statistics for which Network Roundtrips equals zero indicate front-end-only steps.

Based on this list of front-end statistics records you identify and focus on user interactions that do not meet expectations---either because they are too slow or because they require too many resources.


Figure 3: Main statistics records associated with the seventh front-end statistics record from Fig. 2.


Double-clicking an entry in the list of front-end statistics records takes you to transaction STATS and there displays the main statistics records associated with the user interaction (Fig. 3). You analyze this set of back-end statistics records as describe in my STATS blog post to understand the back end performance and resource consumption of all activities that were triggered by the user interaction represented by the chosen front-end statistics record and that were handled by the ABAP system where you currently work with transactions STATS_FE and STATS.

Conclusions


Front-end statistics records contain performance-related data for user interactions on front-end devices. They are collected by SAP's most frequently used UI frameworks and then sent into the ABAP back end. There you can use the Front End Performance Monitor (transaction STATS_FE) to select, display, and analyze the front-end statistics records related to your application. As developer or operator, you use this tool to assess the contributions to the end-to-end response time of user interactions in web applications whose performance you want to ensure. The integration of the main statistics records and the coupling with transaction STATS enables the simultaneous evaluation of the resource consumption in the back end.

STATS_FE supports a holistic end-to-end view on the performance, resource consumption, and scalability of web applications. Starting with the set of front-end statistics records of a complete business process, you obtain the overall resource consumption, and you identify the critical user interactions. Focusing on them you understand which component (front end, network, or back end) is the bottle neck. If you conclude that this is the back end, a drill-down into the associated main statistics records will get you even closer to the root cause.

Disclaimer


The statistics records (front-end as well as back-end) constitute measurements and therefore can have neither absolute precision nor absolute accuracy. To improve reliability and confidence in the data, reduce the impact of variability with an increased sample size (i.e., take averages of multiple measurements), and detect conceivable bias by comparing with data from other tools.

References


You find an introduction to statistics records and transaction STATS in my blog post Measure your Application’s Performance and Resource Consumption: Evaluate Statistics Records with Tr....

I have published an SAPinsider article on transaction STATS:
Identifying Performance Problems in ABAP Applications
26 Comments
StephanHeinberg
Participant
0 Kudos
Dear Manfred,

thank you for the new transaction & this blog.
How do I get as a customer SAP NetWeaver 7.57?

Thanks,
Stephan
ManfredMensch
Product and Topic Expert
Product and Topic Expert

Hi Stephan,

what I am (still) referring to as SAP NetWeaver is now called the ABAP Platform. NetWeaver 7.56 is ABAP Platform 2021, and SAP NetWeaver 7.57 will be ABAP Platform 2022. These platforms are used by the corresponding SAP S/4HANA on-premise editions.

A compact overview of these and other relations is in the blog post ABAP Platform Releases and Consumers.

Kind regards,
Manfred.

LuisBenavidesA
Participant
0 Kudos
Great blog, give us an overview of how you can retrieve key performance information from each tier of our application such as front-end, network, and back-end.

Thanks 🙂
kevin_geiger
Explorer
0 Kudos
Hi Manfred, sorry this was not clear to me.  Does this work when using Fiori front-end?

Best Regards

Kevin G
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Kevin,

STATS_FE (and STATS as well) is an SAP GUI transaction. You run it either in your locally installed SAP GUI client software or in a web browser via SAP GUI for HTML. It is not a Fiori application.

Kind regards,
Manfred.
kevin_geiger
Explorer
0 Kudos
Sorry Manfred, I didn't ask my question correctly.  When Fiori is used for say reporting or maybe a Fiori app will this tcode/app capture the front-end Fiori activity.

 

Best Regards

Kevin G
ManfredMensch
Product and Topic Expert
Product and Topic Expert

Hello Kevin,

if the application you are interested in uses one of the supporting UI frameworks (SAP GUI for HTML, SAPUI5, and Web Dynpro ABAP) the involved framework will collect the front-end statistics and send them into the back end. Then the answer to your question is yes.

Best regards,
Manfred.

former_member611043
Discoverer
0 Kudos
Hi Manfred,

Great Blog!

Does STATS_FE support Transactional apps?

Also I don't see the statistics for Custom UI5 apps in STATS_FE. Can you please let me know if you've any idea on this.

Thanks and Regards,

Kunal Keswani

 

 

 
ManfredMensch
Product and Topic Expert
Product and Topic Expert
Hello Kunal,

I am glad that this blog post is meaningful for you.

STATS_FE is a display tool for statistics records recorded previously and autonomously (you do not have to explicitly activate the logging). Therefore it works for all types of applications that are capable of collecting front-end statistics and sending them into an ABAP back end. In particular, it works for applications that use the frameworks for SAP GUI for HTML, SAPUI5, or Web Dynpro ABAP. Whether it is a transactional or an analytical app is—in this context—of no relevance at all.

Best regards,
Manfed.
kevin_geiger
Explorer
0 Kudos
Hi Manfred, this is a great post.  I'm using STATS_FE for our Fiori system with I believe is written in SAPUI5.  I do no see any info in STATS_FE.  I do see lots of good information in STATS.  Is there something our Basis team has to config to get the front-end stats pushed back into the ABAP Layer?

 

Best Regards

Kevin Geiger
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Kevin,

do you have a standalone SAP Gateway instance? Then the frontend sends its requests and therefore also the front end statistics records there and you need to run transaction STATS_FE on this instance.

Kind regards,
Manfred.
kevin_geiger
Explorer
0 Kudos
Hi Manfred, I had to ask my Basis team about the standalone Gateway.  They told me  "it is a Gateway integrated into ASCS instance" and "We cannot directly logon to ASCS".  Does that help with understanding why the Front-end statistics do not appear to be getting to the backend server?

Best Regards

Kevin G
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Kevin,

unfortunately, the term gateway is used for two different concepts:

  1. The gateway carries out RFC services within the SAP world, which are based on TCP/IP. These services enable SAP Systems and external programs to communicate with one another.
  2. SAP Gateway Foundation offers development and generation tools to create OData services to a variety of client development tools. Put simply, it establishes a connection between application or SAP Business Suite data and target clients, platforms, and programming framework.

(Both descriptions are copied from corresponding entries in help.sap.com).

In the context of front end statistics records, the second concept is relevant. Your basis team was most likely thinking of the first concept.

The deployment options for the SAP Gateway Foundation are described here. I think that you have a central hub deployment.

Kind regards,
Manfred.

kevin_geiger
Explorer
0 Kudos
Thanks Manfred, my basis person told me for us it is inbuilt with Fiori.  Not sure if that helps with this discussion.  One other point is we are at 7.56 patch 00.  Any chance this may not be working due to our release level?  I know your blog references a more current release.

 

Best Regards

Kevin Geiger
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Kevin,

transaction STATS_FE is available from SAP_BASIS 7.56 onward.

Regards,
Manfred.
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Dear users of STATS_FE,

please be informed that you may have to install SAP note 3168075 "STATS_FE: Correct Time Zone Handling" into your system for STATS_FE to work correctly for all time zone settings.

Best regards,
Manfred.
vonglan
Active Participant
0 Kudos
Hi Manfred,

thanks for the description of the interesting new feature.

We just tried it with a Floorplan Manager Z application.

We found that the "FE processing time" in our case included the time where the front end waits for the user to click a button. The processing step consisted of 2 roundtrips.

Is this supposed to be like that? Or is this due to "incorrect" GUI programming on our side?

Best regards,

Edo
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Edo,

the main idea of the front-end statistics records is to measure one user interaction. The key metrics are end-to-end response time, client navigation time, and client round trip time; from which client processing time is calculated as end-to-end response time – client navigation time – client round trip time. A user interaction on the front end may trigger multiple requests into the back end. But it is always one single interaction, and not waiting for yet another button click. Therefore the answer to your question "Is this supposed to be like that?" is a clear No.

Kind regards,
Manfred.
vonglan
Active Participant
0 Kudos
Hello Manfred,

on which component should we open a ticket (if we have the time)? Performance Tools? FPM?

Best regards,

Edo
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Edo,

I am convinced that STATS and STATS_FE display the information they receive from the kernel via the statistics files without changes that go beyond formatting. Therefore the performance tools component will not be helpful. The FPM component sounds more reasonable. But I admit that I am not a frontend developer.

Kind regards,
Manfred.
ralf_scheurer2
Associate
Associate
0 Kudos
Hi Edo,
it would be helpful to find out which frontend framework is used:
SAP GUI for HTML, WebDynpro, ...
Then a message can be opened on the related component which contains a step by step description how to reproduce the issue.
Kind regards,
Ralf
vonglan
Active Participant
0 Kudos
468951 / 2022
dnyandevk007
Explorer
0 Kudos
Hi Manfred,

 

in ECC we used to have aggregated statistics for dialog transactions in ST03N. Is there any plan to have aggregated statistics for FESR in future in S4HANA?

Do we have any report to download FESR for long duration for a specific user. We are currently running S4HANA 2021.

 

Thanks,

Dnyandev Kondekar

 
ManfredMensch
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Dnyandev,

yes, I am aware of the Workload Monitor ST03 (or ST03N, which is the same tool in current releases) as a downstream aggregation of the individual, single statistics records. And I am very happy to confirm that a further Analysis View HTTP(S) User Interaction Steps is being implemented and will become available in the very near future with one of the upcoming releases of the ABAP platform.

Since the FE SRs are technically embedded in main statistics records, they are subject to the same mechanism that removes them after a certain number of hours (given by the value of profile parameter stat/max_files). A download for a longer duration must therefore be done in packages of corresponding size. A dedicated download report has not been released, but you can of course export the ALV content.

Kind regards,
Manfred.
jvanattenhoven
Participant
0 Kudos
I'm not finding any records. Do you need to enable this service? If so, how?
ManfredMensch
Product and Topic Expert
Product and Topic Expert
Hello Jeroen,

please verify that in your ABAP back end profile parameter icf/accept_front_end_statistic is set to 1.

Its docu says:
"Activate the evaluation of values for front end statistic
This parameter activates /deactivates the evaluation for front end statistic.
Set the value to 1 to activate the evaluation, set to 0 to deactivate it."

Best regards,
Manfred.