SlideShare a Scribd company logo
Troubleshooting Your ABAP
 Programs: Using Coverage
 Analyzer




Applies to:
Web AS 6.10 and above versions. For more information, visit the ABAP homepage.

Summary
This tutorial helps you understand the usage of Coverage Analyzer; to analyze and monitor processing
blocks such as reports, subroutines, function-modules and methods. This succinctly demonstrates the
features of Coverage Analyzer, which facilitate developer to enter the number of calls separately according
to periods, users and functional areas.
Author:      Tanveer Zahaque
Company: YASH Technologies
Created on: 26 August 2009

Author Bio
            Tanveer Zahaque earned a Bachelor of Engineering in Computer Science Engineering from
            Osmania University, India. Currently he works as SAP ABAP Consultant at YASH
            Technologies.




SAP COMMUNITY NETWORK                                    SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                    1
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Table of Contents
Start of Navigation .............................................................................................................................................. 6 
Administration Settings ....................................................................................................................................... 6 
   Settings ........................................................................................................................................................... 7 
   Switching On/Off ............................................................................................................................................. 9 
   Creation of Test-Groups................................................................................................................................ 10 
   Resetting previous analyses ......................................................................................................................... 12 
   Checking Consistencies ................................................................................................................................ 13 
Global Display ................................................................................................................................................... 14 
      Unicode: ..................................................................................................................................................................... 16 
Details Display .................................................................................................................................................. 18 
Related Content ................................................................................................................................................ 21 
Disclaimer and Liability Notice .......................................................................................................................... 22 




SAP COMMUNITY NETWORK                                                                         SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                                                         2
Troubleshooting Your ABAP Programs: Using Coverage Analyzer


Concept
Coverage Analyzer is a very powerful runtime analysis tool provided by SAP that enables an ABAP
developer to monitor processing blocks such as reports, subroutines, function-modules and methods.
Powerful filtering system in Coverage Analyzer facilitates developer to enter the number of calls separately
according to periods, users and functional areas.
In a nut-shell; Coverage Analyzer is a function for monitoring the system-wide execution of ABAP programs;
It enables the success of test activities to be assessed for quality checks.
It also provides an overview of the use of programs for development purposes.
Developer can use this tool to trace programs for development purpose and Quality Manager can use this
tool to check system performance for quality assurance.
It helps carry out a range of Administration Settings and the Monitoring Activity. Moreover it helps get
summarized information of number of program executions, number of runtime errors, number of program
resets. Fascinatingly, the results can be formatted separately according to user-group; each user-group can
contain any number of users under one test key.
Broadly, functions of Coverage Analyzer are classified into two;
1. Administration Settings
      • On/Off.
      • Test Groups.
      • Registrations.
      • Reset.
      • Settings.
      • Monitor.
      • Consistency Checks.
2. Display
      • Global.
      • Detail.
A simple exercise will help us easily understand Coverage Analyzer, rather simply going through
documentation.
In order to make use of Coverage Analyzer, user has to have an appropriate role. To check user
authorization;
Call up transaction SUIM (User Information System).
Expand Authorizations node.
Choose By Object and execute it (press F8).




SAP COMMUNITY NETWORK                                      SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                      3
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Check the presence of authorization object S_COV_ADM in the system.




SAP COMMUNITY NETWORK                                SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                4
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Confirm the where-used list for profiles using      icon or
Ctrl+Shift+F11.




Once user authorization is checked to have absolute access to SCOV (Coverage Analyzer) transaction; user
can proceed further. If a role is not assigned to a user, Basis consultant has to be consulted in this regards.
In fact, a tip to be remembered is that Coverage Analyzer tool should be used on weekends or in the
evening, when all users and packages are on loose ends. Since backup server collects data from all the
servers including local and remote; system needs all packages and users to be in the passive mode.




SAP COMMUNITY NETWORK                                     SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                     5
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Start of Navigation
Let’s start up with a simple example to understand Coverage Analyzer in a better way:
Call up the transaction SCOV or navigate through SAP Easy Access->SAP Menu->Tools->ABAP
Workbench->Test->SCOV (Coverage Analyzer).




Administration Settings
General Status of the system is shown on the right hand pane of the window;




Coverage Analyzer administration includes all of the functions required for carrying out settings and checks.




SAP COMMUNITY NETWORK                                    SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                    6
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Administration and Display nodes are shown on the left pane of the window.
Before the Coverage Analyzer being switched on, settings have to be maintained for backup server and
filters are to be set. Having not made settings for backup server, if Coverage Analyzer is started, it simply
throws out an information message to maintain background server for data collection.




So, Administration settings are to be done before starting up the Coverage Analyzer.

Settings
Expand Administration node, select Settings;
Settings function is used to set the parameters for the Global and Detail views, and to filter the programs to
be checked via the package.
In order to make settings, switch settings to Change Mode (Cntrl+F1).
Tip to remember: A program is regarded as tested if the following conditions are fulfilled;
Count1 Absolute Value >          0.
Count2 Absolute Value >          0.
RABAX2 Absolute Value            =        0.
Unicode Check            =       1.




SAP COMMUNITY NETWORK                                      SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                      7
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Count1 and RABAX1 indicate the number of programs executed and runtime errors since the Coverage
Analyzer was started.
Count2 and RABAX2 indicate the number of programs executed and runtime errors since the last reset.
Further, assign package to be used during analysis. When a package is pre-selected, the evaluation for the
Global view is only performed for this package. If this restriction is not applied, all of the programs are
included together with those from local packages ($*) and programs generated locally without packages ( ).




If ABAP programs with a set Unicode flag are only to be traced by the Coverage Analyzer, then select
Unicode checkbox. Checking Unicode is to mark it as ‘X’, else leave it unattended.




It’s optional to set the lights; lights provide a visual means of representing the status of the results for the
degree of coverage in the Global and Detail views.
Lights are set by default, which can be set according to developer’s way of analysis.
RED              0 LT 33 %
YELLOW       33 LT 66 %
GREEN        66 LE 100%




Further, Monitor Settings have to be done, which includes setting Trace Level and Maximum Entries Log and
Maximum Entries Data Monitor.
There are 4 different trace levels (1-4), the higher the trace level, the more information is drawn for
debugging.




SAP COMMUNITY NETWORK                                        SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                        8
Troubleshooting Your ABAP Programs: Using Coverage Analyzer


Tip: The values for Maximum Entries Log and Maximum Entries Data Monitor limit the lines displayed for the
General Log and Monitor Data Volumes in the monitor function.
The defaulted lines for log file are 100 and for data volume are 200.
Background server has to be specified, where precisely data is to be collected. Moreover, the period for
which background job has to be repeated is also to be specified.
The defaulted value for Data Collection: Period (Min) is 30 mins, which can be modified based on
developer’s way of analysis. In this case, current server is specified as Background server.




Further, Summarization function facilitates checking the same processing blocks in several systems
simultaneously.
Tip to remember: The results from the individual systems are local and those from the remote systems are
summarized.
Local Degree of coverage                 LE      100%.
Summarized degree of coverage            LE       100%.
Local Degree of coverage GE Summarized degree of coverage.
To determine RFC connection with current server, call up transaction SM59->RFC Destinations->R/3
Connections->E6SCLNT900.
Desired RFC connections in Summarize coverage results can be specified; moreover period and start time
for summarize data can also be specified.




Finally, save the Settings.

Switching On/Off
Choose On/Off, Status in the Administration node and start up the Coverage Analyzer.
Switch Coverage Analyzer On/Off: This displays the number of programs that have been initialized.
Switch Automatic Recordings On/Off: This displays the automatic recording period and the version number
for the Global view.
Switch Data Aggregations from Different Remote Systems: This displays background server and all of the
other systems whose results are used for Data-aggregation.




SAP COMMUNITY NETWORK                                     SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                     9
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




If the server is in switched-off mode exception shows RED signal, GREEN signifies server to be in switched-
on mode and YELLOW represents either RFC problem or database and shared memory inconsistency.
In this case, we’ll proceed without switching on Switch Automatic Recording On/Off.




The servers which are actually running are shown as flagged up.

Creation of Test-Groups
Test-Groups are made to summarize and display the results of the Coverage Analyzer for a particular set of
users under one generic key/heading.
Tip to remember: Test-groups should not be created more than 10. Moreover, only users assigned a role
with the authorization object S_COV_ADM are allowed to define group.
Two pre-defined Test-groups are always available;
ALL   – Coverage results summarized for all test groups on the local system.
COND – Coverage results on the local system as well as remote system.
In this case, we create a test-group.




SAP COMMUNITY NETWORK                                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                   10
Troubleshooting Your ABAP Programs: Using Coverage Analyzer


To create a test-group; switch on the Change Mode, click Append Row icon provided in the application tool-
bar.




Define a Test-group following Y/Z naming convention; then save it.




SAP COMMUNITY NETWORK                                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                   11
Troubleshooting Your ABAP Programs: Using Coverage Analyzer



Assigning Users to Test-group
Next step is to assign users to the just-made test-group.
To assign Users to a test-group; switch on the Change Mode, click Append Row icon provided in the
application tool-bar.




Select desired test-group for which users have to be assigned; in this case we assign SAPDEV02 as user to
test-group ZTST.




Tip: A test-group can contain any number of users, for example, all HR developers in one group. That makes
filtering pretty easy. Moreover, comparison of performance of test-groups can be done in Global view.

Resetting previous analyses
An optional function to be done is Reset; explicitly this function is intended for situations in which the results
of the previous analyses are no longer required. It resets all the counters of the Coverage Analyzer to 0 for
all the programs of a selected group.




Further more, implicit reset is carried out automatically as soon as the flow or the data of a program changes.
After successful reset, an information message is popped-up;




SAP COMMUNITY NETWORK                                       SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                       12
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Checking Consistencies
Consistency check has to be done for all the servers including remote ones, before proceeding to actual
analysis;




Check Status of All Servers checks whether the status in the shared memory matches the status in the
database.
Check Status of Background Jobs checks whether all the batch jobs of the Coverage Analyzer are activated.
If this is not the case, the batch jobs are all rescheduled by means of the Repair function.
Check Table Consistency (Long Runtime) may become inconsistent if the Coverage Analyzer fails on an
application server due to system error.
Repair function also bridges the gap between activating and generating a program.
So, in order to check inconsistencies, check the types of inconsistencies accordingly and Execute Checks,
and then choose monitor to check for the inconsistency messages,
GREEN indicates Information message, YELLOW indicates Warning message and RED indicates Error
message.




In the present case; no inconsistencies have been found while starting All Servers. In case, there arise any
warning or error messages, those problems are to be fixed and then select particular row of the warning/error
message and click Completed.
General Log gives general information, while Monitor Volume gives detailed information of started server.




SAP COMMUNITY NETWORK                                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                   13
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Once the warning is attended, select the row and hit Completed, which will going to turn yellow signal to
green signal.




Tip: Every time inconsistencies are checked; General Log should be refreshed.
To select more than 1 message, keep Cntrl key pressed.

Global Display
Global display; gives coverage results at author or package level according to criteria you select under
Settings. Global Display gives high-level view.
Views can be based on Author or Package. ALL signifies all the authors on local system based on view given
and the COND (y/z test groups) signifies all the authors on both local and remote systems based on view
given. If ‘Other view’ is selected as Package, then selection is done accordingly.




SAP COMMUNITY NETWORK                                    SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                    14
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Note: Since Automatic Recordings were not switched on; percentage-based progress display over time cannot be seen
      for selected SAPDEV02 author.


Normally, Global display view gives Quality Managers to view the system, the following way;




SAP COMMUNITY NETWORK                                      SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                      15
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Unicode:
This value indicates how many percent of the processing blocks have the Unicode flag set (the flag itself is
set per program)
Capacity Utilization:
This value is computed as the ratio of used processing blocks to loaded processing blocks to loaded
processing blocks.
Accumulated Executions (Percent)
This value indicates in percent how many processing blocks have been executed since the start of the
Coverage Analyzer.
Tested processing blocks (Percent)
This value indicates in percent how many processing blocks have been executed in the actual version
without runtime errors.
In the example above you can see that currently 98% of the processing blocks in the system belong to a
program that has the Unicode flag set, 26% have been executed since start of the coverage analyzer, 9%
have been executed in the active version without errors and the capacity utilization is 29%.
Exact Value Table can be viewed for author SAPDEV02; which displays number processing blocks for
author SAPDEV02 on timely manner.




SAP COMMUNITY NETWORK                                    SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                    16
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Graphical view of the selected row can be seen using      icon; that displays graphical view of the individual
date and all dates when no row is selected.
All rows selected for graphical analysis;




Individual selection for graphical analysis;




SAP COMMUNITY NETWORK                                  SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                  17
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Tip: Moreover, previous saved history can also be viewed for the specific user.

Details Display
Details display view; gives summarized and detailed results. Details display gives low-level view.
Strong filtering options allow user to select on what conditions results are to be displayed.




Conditions can be set for range of test-groups, packages and authors pertaining to those test-groups.




SAP COMMUNITY NETWORK                                      SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                      18
Troubleshooting Your ABAP Programs: Using Coverage Analyzer


In the present example; test-group ZTST and Author SAPDEV02 is taken as single-value selection, which
gives results pertaining to specified criteria. Moreover, other filters can also be set and settings should be
done defining access via Package Object, Package and Author. Defaulted access-via is Program Object.




Hitting Standard Settings is going to reset all the values.
Once settings are done; hit execute button, that is going to get detailed information, including number of calls
made to that particular object, number of processing blocks, load size in Kilo byte. Besides all the
information given; double-clicking the object name will navigate to the particular program or executing block
where exactly error has been found.




SAP COMMUNITY NETWORK                                         SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                         19
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Note: Current Executions = Program units currently used / Total no. of Program units.
Capacity Utilization = No. of Program units currently used / Loaded Program units.
Conclusion: Likewise, many such program executions, runtime errors and program resets can be easily
traced using this powerful ABAP runtime analysis tool; Coverage Analyzer.




SAP COMMUNITY NETWORK                                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                   20
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Related Content
For more information, visit the ABAP homepage.




SAP COMMUNITY NETWORK                            SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                            21
Troubleshooting Your ABAP Programs: Using Coverage Analyzer




Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.




SAP COMMUNITY NETWORK                                                    SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                                    22
Ad

More Related Content

Similar to Troubleshooting Your ABAP Programs Using Coverage Analyzer (20)

SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis OverviewSAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP Technology
 
sap
sap sap
sap
Sivaprasadreddy Kandukuri
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
Kranthi Kumar
 
Version management of abap programs
Version management of abap programsVersion management of abap programs
Version management of abap programs
icatalysts buddy
 
Pmo slides jun2010
Pmo slides jun2010Pmo slides jun2010
Pmo slides jun2010
Steve Turner
 
Abap fundamentals-training-course-document
Abap fundamentals-training-course-documentAbap fundamentals-training-course-document
Abap fundamentals-training-course-document
johnbryan26
 
ABAP_STD.pptx
ABAP_STD.pptxABAP_STD.pptx
ABAP_STD.pptx
JAYA216630
 
Session on API auto scaling, monitoring and Log management
Session on API auto scaling, monitoring and Log managementSession on API auto scaling, monitoring and Log management
Session on API auto scaling, monitoring and Log management
pqrs1234
 
Maintaining aggregates
Maintaining aggregatesMaintaining aggregates
Maintaining aggregates
Sirisha Kumari
 
Zone_Based_Cycle Count in Oracle e business suite
Zone_Based_Cycle Count in Oracle e business suiteZone_Based_Cycle Count in Oracle e business suite
Zone_Based_Cycle Count in Oracle e business suite
shridharsvk
 
SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)
Imran M Arab
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
Milind Patil
 
Abap for sd consultatnt
Abap for sd consultatntAbap for sd consultatnt
Abap for sd consultatnt
Sukumar Manickam
 
Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16
Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16
Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16
AppDynamics
 
BC404_EN_Col18.pdf
BC404_EN_Col18.pdfBC404_EN_Col18.pdf
BC404_EN_Col18.pdf
khadrimohammed1
 
Test Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptxTest Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptx
SreeGe1
 
sum-week1.pdf
sum-week1.pdfsum-week1.pdf
sum-week1.pdf
Adrian914304
 
How to find_information_on_sap_eam
How to find_information_on_sap_eamHow to find_information_on_sap_eam
How to find_information_on_sap_eam
Nguyen Hai
 
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - ConfigurationSolution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Linh Nguyen
 
SAP Overview and Architecture
SAP Overview and ArchitectureSAP Overview and Architecture
SAP Overview and Architecture
Ankit Sharma
 
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis OverviewSAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP Technology
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
Kranthi Kumar
 
Version management of abap programs
Version management of abap programsVersion management of abap programs
Version management of abap programs
icatalysts buddy
 
Pmo slides jun2010
Pmo slides jun2010Pmo slides jun2010
Pmo slides jun2010
Steve Turner
 
Abap fundamentals-training-course-document
Abap fundamentals-training-course-documentAbap fundamentals-training-course-document
Abap fundamentals-training-course-document
johnbryan26
 
Session on API auto scaling, monitoring and Log management
Session on API auto scaling, monitoring and Log managementSession on API auto scaling, monitoring and Log management
Session on API auto scaling, monitoring and Log management
pqrs1234
 
Maintaining aggregates
Maintaining aggregatesMaintaining aggregates
Maintaining aggregates
Sirisha Kumari
 
Zone_Based_Cycle Count in Oracle e business suite
Zone_Based_Cycle Count in Oracle e business suiteZone_Based_Cycle Count in Oracle e business suite
Zone_Based_Cycle Count in Oracle e business suite
shridharsvk
 
SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)SAP Adding fields to dynamic selection for fbln transactions (2)
SAP Adding fields to dynamic selection for fbln transactions (2)
Imran M Arab
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
Milind Patil
 
Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16
Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16
Accelerating Your Mastery of APM Through Skills Self-Analysis - AppSphere16
AppDynamics
 
Test Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptxTest Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptx
SreeGe1
 
How to find_information_on_sap_eam
How to find_information_on_sap_eamHow to find_information_on_sap_eam
How to find_information_on_sap_eam
Nguyen Hai
 
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - ConfigurationSolution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Solution Manager 7.2 SAP Monitoring - Part 2 - Configuration
Linh Nguyen
 
SAP Overview and Architecture
SAP Overview and ArchitectureSAP Overview and Architecture
SAP Overview and Architecture
Ankit Sharma
 

Troubleshooting Your ABAP Programs Using Coverage Analyzer

  • 1. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Applies to: Web AS 6.10 and above versions. For more information, visit the ABAP homepage. Summary This tutorial helps you understand the usage of Coverage Analyzer; to analyze and monitor processing blocks such as reports, subroutines, function-modules and methods. This succinctly demonstrates the features of Coverage Analyzer, which facilitate developer to enter the number of calls separately according to periods, users and functional areas. Author: Tanveer Zahaque Company: YASH Technologies Created on: 26 August 2009 Author Bio Tanveer Zahaque earned a Bachelor of Engineering in Computer Science Engineering from Osmania University, India. Currently he works as SAP ABAP Consultant at YASH Technologies. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1
  • 2. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Table of Contents Start of Navigation .............................................................................................................................................. 6  Administration Settings ....................................................................................................................................... 6  Settings ........................................................................................................................................................... 7  Switching On/Off ............................................................................................................................................. 9  Creation of Test-Groups................................................................................................................................ 10  Resetting previous analyses ......................................................................................................................... 12  Checking Consistencies ................................................................................................................................ 13  Global Display ................................................................................................................................................... 14  Unicode: ..................................................................................................................................................................... 16  Details Display .................................................................................................................................................. 18  Related Content ................................................................................................................................................ 21  Disclaimer and Liability Notice .......................................................................................................................... 22  SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 2
  • 3. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Concept Coverage Analyzer is a very powerful runtime analysis tool provided by SAP that enables an ABAP developer to monitor processing blocks such as reports, subroutines, function-modules and methods. Powerful filtering system in Coverage Analyzer facilitates developer to enter the number of calls separately according to periods, users and functional areas. In a nut-shell; Coverage Analyzer is a function for monitoring the system-wide execution of ABAP programs; It enables the success of test activities to be assessed for quality checks. It also provides an overview of the use of programs for development purposes. Developer can use this tool to trace programs for development purpose and Quality Manager can use this tool to check system performance for quality assurance. It helps carry out a range of Administration Settings and the Monitoring Activity. Moreover it helps get summarized information of number of program executions, number of runtime errors, number of program resets. Fascinatingly, the results can be formatted separately according to user-group; each user-group can contain any number of users under one test key. Broadly, functions of Coverage Analyzer are classified into two; 1. Administration Settings • On/Off. • Test Groups. • Registrations. • Reset. • Settings. • Monitor. • Consistency Checks. 2. Display • Global. • Detail. A simple exercise will help us easily understand Coverage Analyzer, rather simply going through documentation. In order to make use of Coverage Analyzer, user has to have an appropriate role. To check user authorization; Call up transaction SUIM (User Information System). Expand Authorizations node. Choose By Object and execute it (press F8). SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 3
  • 4. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Check the presence of authorization object S_COV_ADM in the system. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 4
  • 5. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Confirm the where-used list for profiles using icon or Ctrl+Shift+F11. Once user authorization is checked to have absolute access to SCOV (Coverage Analyzer) transaction; user can proceed further. If a role is not assigned to a user, Basis consultant has to be consulted in this regards. In fact, a tip to be remembered is that Coverage Analyzer tool should be used on weekends or in the evening, when all users and packages are on loose ends. Since backup server collects data from all the servers including local and remote; system needs all packages and users to be in the passive mode. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 5
  • 6. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Start of Navigation Let’s start up with a simple example to understand Coverage Analyzer in a better way: Call up the transaction SCOV or navigate through SAP Easy Access->SAP Menu->Tools->ABAP Workbench->Test->SCOV (Coverage Analyzer). Administration Settings General Status of the system is shown on the right hand pane of the window; Coverage Analyzer administration includes all of the functions required for carrying out settings and checks. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 6
  • 7. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Administration and Display nodes are shown on the left pane of the window. Before the Coverage Analyzer being switched on, settings have to be maintained for backup server and filters are to be set. Having not made settings for backup server, if Coverage Analyzer is started, it simply throws out an information message to maintain background server for data collection. So, Administration settings are to be done before starting up the Coverage Analyzer. Settings Expand Administration node, select Settings; Settings function is used to set the parameters for the Global and Detail views, and to filter the programs to be checked via the package. In order to make settings, switch settings to Change Mode (Cntrl+F1). Tip to remember: A program is regarded as tested if the following conditions are fulfilled; Count1 Absolute Value > 0. Count2 Absolute Value > 0. RABAX2 Absolute Value = 0. Unicode Check = 1. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 7
  • 8. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Count1 and RABAX1 indicate the number of programs executed and runtime errors since the Coverage Analyzer was started. Count2 and RABAX2 indicate the number of programs executed and runtime errors since the last reset. Further, assign package to be used during analysis. When a package is pre-selected, the evaluation for the Global view is only performed for this package. If this restriction is not applied, all of the programs are included together with those from local packages ($*) and programs generated locally without packages ( ). If ABAP programs with a set Unicode flag are only to be traced by the Coverage Analyzer, then select Unicode checkbox. Checking Unicode is to mark it as ‘X’, else leave it unattended. It’s optional to set the lights; lights provide a visual means of representing the status of the results for the degree of coverage in the Global and Detail views. Lights are set by default, which can be set according to developer’s way of analysis. RED 0 LT 33 % YELLOW 33 LT 66 % GREEN 66 LE 100% Further, Monitor Settings have to be done, which includes setting Trace Level and Maximum Entries Log and Maximum Entries Data Monitor. There are 4 different trace levels (1-4), the higher the trace level, the more information is drawn for debugging. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 8
  • 9. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Tip: The values for Maximum Entries Log and Maximum Entries Data Monitor limit the lines displayed for the General Log and Monitor Data Volumes in the monitor function. The defaulted lines for log file are 100 and for data volume are 200. Background server has to be specified, where precisely data is to be collected. Moreover, the period for which background job has to be repeated is also to be specified. The defaulted value for Data Collection: Period (Min) is 30 mins, which can be modified based on developer’s way of analysis. In this case, current server is specified as Background server. Further, Summarization function facilitates checking the same processing blocks in several systems simultaneously. Tip to remember: The results from the individual systems are local and those from the remote systems are summarized. Local Degree of coverage LE 100%. Summarized degree of coverage LE 100%. Local Degree of coverage GE Summarized degree of coverage. To determine RFC connection with current server, call up transaction SM59->RFC Destinations->R/3 Connections->E6SCLNT900. Desired RFC connections in Summarize coverage results can be specified; moreover period and start time for summarize data can also be specified. Finally, save the Settings. Switching On/Off Choose On/Off, Status in the Administration node and start up the Coverage Analyzer. Switch Coverage Analyzer On/Off: This displays the number of programs that have been initialized. Switch Automatic Recordings On/Off: This displays the automatic recording period and the version number for the Global view. Switch Data Aggregations from Different Remote Systems: This displays background server and all of the other systems whose results are used for Data-aggregation. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 9
  • 10. Troubleshooting Your ABAP Programs: Using Coverage Analyzer If the server is in switched-off mode exception shows RED signal, GREEN signifies server to be in switched- on mode and YELLOW represents either RFC problem or database and shared memory inconsistency. In this case, we’ll proceed without switching on Switch Automatic Recording On/Off. The servers which are actually running are shown as flagged up. Creation of Test-Groups Test-Groups are made to summarize and display the results of the Coverage Analyzer for a particular set of users under one generic key/heading. Tip to remember: Test-groups should not be created more than 10. Moreover, only users assigned a role with the authorization object S_COV_ADM are allowed to define group. Two pre-defined Test-groups are always available; ALL – Coverage results summarized for all test groups on the local system. COND – Coverage results on the local system as well as remote system. In this case, we create a test-group. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 10
  • 11. Troubleshooting Your ABAP Programs: Using Coverage Analyzer To create a test-group; switch on the Change Mode, click Append Row icon provided in the application tool- bar. Define a Test-group following Y/Z naming convention; then save it. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 11
  • 12. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Assigning Users to Test-group Next step is to assign users to the just-made test-group. To assign Users to a test-group; switch on the Change Mode, click Append Row icon provided in the application tool-bar. Select desired test-group for which users have to be assigned; in this case we assign SAPDEV02 as user to test-group ZTST. Tip: A test-group can contain any number of users, for example, all HR developers in one group. That makes filtering pretty easy. Moreover, comparison of performance of test-groups can be done in Global view. Resetting previous analyses An optional function to be done is Reset; explicitly this function is intended for situations in which the results of the previous analyses are no longer required. It resets all the counters of the Coverage Analyzer to 0 for all the programs of a selected group. Further more, implicit reset is carried out automatically as soon as the flow or the data of a program changes. After successful reset, an information message is popped-up; SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 12
  • 13. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Checking Consistencies Consistency check has to be done for all the servers including remote ones, before proceeding to actual analysis; Check Status of All Servers checks whether the status in the shared memory matches the status in the database. Check Status of Background Jobs checks whether all the batch jobs of the Coverage Analyzer are activated. If this is not the case, the batch jobs are all rescheduled by means of the Repair function. Check Table Consistency (Long Runtime) may become inconsistent if the Coverage Analyzer fails on an application server due to system error. Repair function also bridges the gap between activating and generating a program. So, in order to check inconsistencies, check the types of inconsistencies accordingly and Execute Checks, and then choose monitor to check for the inconsistency messages, GREEN indicates Information message, YELLOW indicates Warning message and RED indicates Error message. In the present case; no inconsistencies have been found while starting All Servers. In case, there arise any warning or error messages, those problems are to be fixed and then select particular row of the warning/error message and click Completed. General Log gives general information, while Monitor Volume gives detailed information of started server. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 13
  • 14. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Once the warning is attended, select the row and hit Completed, which will going to turn yellow signal to green signal. Tip: Every time inconsistencies are checked; General Log should be refreshed. To select more than 1 message, keep Cntrl key pressed. Global Display Global display; gives coverage results at author or package level according to criteria you select under Settings. Global Display gives high-level view. Views can be based on Author or Package. ALL signifies all the authors on local system based on view given and the COND (y/z test groups) signifies all the authors on both local and remote systems based on view given. If ‘Other view’ is selected as Package, then selection is done accordingly. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 14
  • 15. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Note: Since Automatic Recordings were not switched on; percentage-based progress display over time cannot be seen for selected SAPDEV02 author. Normally, Global display view gives Quality Managers to view the system, the following way; SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 15
  • 16. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Unicode: This value indicates how many percent of the processing blocks have the Unicode flag set (the flag itself is set per program) Capacity Utilization: This value is computed as the ratio of used processing blocks to loaded processing blocks to loaded processing blocks. Accumulated Executions (Percent) This value indicates in percent how many processing blocks have been executed since the start of the Coverage Analyzer. Tested processing blocks (Percent) This value indicates in percent how many processing blocks have been executed in the actual version without runtime errors. In the example above you can see that currently 98% of the processing blocks in the system belong to a program that has the Unicode flag set, 26% have been executed since start of the coverage analyzer, 9% have been executed in the active version without errors and the capacity utilization is 29%. Exact Value Table can be viewed for author SAPDEV02; which displays number processing blocks for author SAPDEV02 on timely manner. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 16
  • 17. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Graphical view of the selected row can be seen using icon; that displays graphical view of the individual date and all dates when no row is selected. All rows selected for graphical analysis; Individual selection for graphical analysis; SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 17
  • 18. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Tip: Moreover, previous saved history can also be viewed for the specific user. Details Display Details display view; gives summarized and detailed results. Details display gives low-level view. Strong filtering options allow user to select on what conditions results are to be displayed. Conditions can be set for range of test-groups, packages and authors pertaining to those test-groups. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 18
  • 19. Troubleshooting Your ABAP Programs: Using Coverage Analyzer In the present example; test-group ZTST and Author SAPDEV02 is taken as single-value selection, which gives results pertaining to specified criteria. Moreover, other filters can also be set and settings should be done defining access via Package Object, Package and Author. Defaulted access-via is Program Object. Hitting Standard Settings is going to reset all the values. Once settings are done; hit execute button, that is going to get detailed information, including number of calls made to that particular object, number of processing blocks, load size in Kilo byte. Besides all the information given; double-clicking the object name will navigate to the particular program or executing block where exactly error has been found. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 19
  • 20. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Note: Current Executions = Program units currently used / Total no. of Program units. Capacity Utilization = No. of Program units currently used / Loaded Program units. Conclusion: Likewise, many such program executions, runtime errors and program resets can be easily traced using this powerful ABAP runtime analysis tool; Coverage Analyzer. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 20
  • 21. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Related Content For more information, visit the ABAP homepage. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 21
  • 22. Troubleshooting Your ABAP Programs: Using Coverage Analyzer Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 22
  翻译: