The Code Watch App performs a custom code analysis based on transports, ChaRM change requests, named objects, development classes, or developers who have created or modified custom code. The App reports on rule violations in the ‘Run and Optimize’ quality scenario.
If a support pack or transport has not been applied to the Analysis system, it must be disassembled before it can be analyzed by the Code Watch App. This can be done in SAP by running the SAINT transaction and selecting ‘Disassemble OCS Package’ from the Utilities menu. Alternatively, the support pack or transport may be disassembled in LiveCompare using the Package Disassembler App.
This prerequisite does not apply if the App is used to analyze other items, for example, custom objects, development classes or developers.
Running the App
To run the Code Watch App, select the App from the Apps screen and create an App variant. Complete the variant screen as follows:
- The App is configured to use the ‘Run and Optimize’ quality scenario. Edit the ‘AAQ Select List’ parameter if required to specify the quality scenarios, categories and rules to be used in the analysis.
- Set the ‘Analysis System’ field to the RFC Destination for the system that contains the transports, named objects or developers to analyze.
- If required, edit the ‘Transports’ table to provide a list of transports to be analyzed on the Analysis system.
- If you wish to analyze one or more ChaRM change requests, set the ‘SAP Solution Manager System’ field to the RFC Destination for your Solution Manager system.
- If required, edit the ‘ChaRM Change Requests’ string list to provide a list of ChaRM change requests to be analyzed on the SAP Solution Manager system.
- If required, edit the ‘Objects’ table to provide a list of objects to be analyzed on the Analysis system.
- If required, edit the ‘Development Classes’ table to provide a list of development classes to be analyzed on the Analysis system. The wildcard character * may be used when specifying development classes.
- If required, edit the ‘Developers’ table to provide a list of developers to be analyzed on the Analysis system.
Click ‘Run’. When the variant has completed, its results may be accessed from the App Cockpit screen.
The Code Watch App generates a Dashboard report, which includes the following charts:
- The Quality Scorecard column chart displays the number of code objects in the good, bad and ugly complexity rankings for each of the analyzed rule categories.
- The Warning vs Error Summary pie chart summarizes the number of rule violations in the Error and Warning classes, excluding rules in the ^ ABOVE TRIGGERED BY ^ class.
- The Errors by Rule Type bar chart lists the top 10 violated rules in the Error class, displaying the number of code objects that triggered each rule.
The Dashboard report also includes links to the following reports:
Code Watch Details
This Excel report includes the following spreadsheets:
This spreadsheet includes the charts described above.
Help (Quality Scorecard Chart)
This spreadsheet lists descriptions for the quality scores used in each of the categories.
This spreadsheet provides a quality score for each custom object, in each of the analyzed categories.
Rule Break Summary
This spreadsheet provides a summary of the quality rules that were triggered for each custom object.
Rule Break Detail
This spreadsheet provides details for each custom object that triggered one or more quality rules. In this spreadsheet:
- The LINE_NUMBER column stores ABAP source code line number in which the violation was detected. For Web DYNPRO (WDYN) objects, methods are stored in include files, and the line number refers to the position of the source code line within its method. For other object types, if the INCLUDE column for the violation contains a value, the line number refers to a line in the INCLUDE file.
- The SEQ column stores the ABAP source code line number in which the violation was detected. For Web DYNPRO (WDYN) objects, this column refers to a line number in the object’s INCLUDE file. This column may be used when sorting the Rule Break Detail dataset to display the violations for each object ordered by line number.
Analysis Input Data
This Excel report contains a copy of the input parameters used to produce the App’s Dashboard report. The value of each input parameter is stored in a separate worksheet, which is named after the parameter whose value it contains.