abap-metrics
An ABAP program that calculates software-engineering metrics for a class or a whole package, from lines of code and statements to complexity, coupling between objects and lack of cohesion.
A program, z_abap_metrics, run from SE38, SE80 or Eclipse ADT against a single class or a full package, for an automated measure of code complexity, maintainability and efficiency. It reports lines of code, comments, pragmas, statements and authors, alongside complexity of conditions, complexity weighted by decision depth, coupling between objects and lack of cohesion in methods; the level of calculation, the treatment of static method calls for the coupling figure and the aggregation type are chosen when it starts. The classes to analyse and their source come from an enhancement the installation creates in the local class cl_calc_code_metrics of SAP's own Code Metric Tool, /SDF/CD_CUSTOM_CODE_METRIC, at the end of its calc_code_metric_for_object method, which the maintainer calls a key functionality of the program. It is cloned with abapGitabapGitA Git client written in ABAP that runs inside the system, so objects are cloned, pulled and pushed without leaving it; with no package manager in ABAP, a cloned repository is how code is distributed.community org, abap and its objects activated afterwards, and it needs SAP NetWeaver 7.40 SP8 or higher.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1@kseretismaintainer
Before choosing this
Signals
ActivityQuietNo published releases; repository quiet for 43 months
It publishes no releases, and its repository has been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.
What it declares
Every artifact
- Type
- App
- Origin
- Independently maintained
As an app
- Where it runs
- Inside the system it serves
- Distributed through
- abapGit
Connections
Measuring size, complexity, coupling and cohesion of source code
Git client written in ABAP that runs inside the system
Download
README
quoted from kseretis/abap-metrics under Apache-2.0, readAbap Metrics Tool (abap-metrics)
This project contains a program written in SAP ABAP that calculates important metrics for software engineering projects. The purpose of the program is to provide a convenient and automated way to measure key aspects of software development, such as code complexity, maintainability, and efficiency.
Metrics
The program takes into account a variety of factors, such as:
- Lines of Code (LoC)
- Number of Comments (NoC)
- Number of Pragmas (NoP)
- Number of Statements (NoS)
- Number of Authors (Authors)
- Complexity of Condition (COM)
- Complexity Weighted by Decision Depth (Depth)
- Coupling Beetwen Objects (CBO)
- Lack of Cohesion in Methods (LCOM2)
Dependencies
- Since Version 1.00 - SAP NetWeaver 7.40 SP8 or higher
- abapGit
Instalation
- Clone repository using abapGit
- Activate the objects
Execution
- Look for
"z_abap_metrics"program inSE38/SE80/Eclipse ADT and execute - Analyse a single class or a full package
- Choose the level of calculation, static method calls for the CBO and the aggregation type
Good to know
Exept from the main program, the classes, some data elements and structures, an enhancement is being created in the local class "cl_calc_code_metrics" of the standard program "Code Metric Tool (/SDF/CD_CUSTOM_CODE_METRIC)", at the end of the method "calc_code_metric_for_object". The purpose of this enhancement is to extract a list of the classes for analysis and their source code. It's a key functionality of the program.
History
Others providing
Compare all 2 on the Code metrics page →- BenjaminWeisheit/ABAP-2-CODE-CHARTABenjaminWeisheit/ABAP-2-CODE-CHARTAConverts ABAP code metrics into a JSON file for import into Code Charta, a separate visualisation tool that draws the picture; the conversion is the whole of what it does.independent, abapConverts ABAP code metrics into Code Charta's JSON format
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
Flavors
“Since Version 1.00 - SAP NetWeaver 7.40 SP8 or higher” — kseretis/abap-metrics — README, Dependencies
History in the atlas
- First seen.
For your agent
- Ref
artifact:kseretis-abap-metrics- JSON
- /artifacts/kseretis-abap-metrics.json
- MCP
- Connecting an agent