Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 

See the UPDATES section below for change log

This blog would present to the great SCN community to the Code Exchange project  ABAPSloc.

Abap and SLOC… What SLOC means?

SLOC (Source lines of code) is a software metric used to measure the size of a software program by counting the number of lines in the text of the program's source code (Wikipedia).

The scope of the SLOC in ABAP (ABAPSloc) is to count the number of lines of custom code (Z*, Y*) in order to provide one of the most interesting indicators during a software assessment (a starting point to perform a software Assessment of your SAP ECC)

ABAPSloc Version 1.0

how many lines of custom ABAP code are inside your system? of the ABAPSloc, released at the beginning of 2009, counts the lines of custom ABAP sources in a SAP system and it is the brainchild of my colleague and good friend of mine sergio.ferrari2/blog. This release evaluates SLOC index only in Programs, Function Groups and Classes.

ABAPSloc Version 2.0

At the end of 2009, How many lines of custom ABAP code are inside your system? – Part2 of ABAPSloc was released. In this version the management of function groups and related objects it is completely revisited ; moreover it includes BSP source (ABAP only), Type Groups and Dynpro Flow Logic (Module Pools and Function Groups).

ABAPSloc Version 2.1

On January 2011, ABAPSloc moved to the new SAP Code Exchange platform. This was not only a change of platform, we also released a new version of the tool introducing several improvements such as a  new evaluation of module pools programs with the related INCLUDE sub-objects.

This version manages also the abap code located inside the print forms; in the SmartForms the lines of custom ABAP Code for Global Types, Form Routines and Initialization are included. In the AdobeForms, the lines of custom ABAP Code for Form Routines and Initialization are counted, as for the SmartForms.

ABAPSloc Version 2.2

Today we release the new version 2.2 which provides us the possibility to count the lines of ABAP code inside SmartForm “code nodes”. This release fixes also a bug that I discovered in the evaluation of the object type CLASS.

How it looks like

Selection Screen


The following objects are currently out of scope

  • Web Dynpro Components
  • SAPscript
  • Enhancement implementations (hook, class, etc. ...
  • XSLT

What comes next

We have an issue (Enhancement) in the Code Exchange in order introduce the possibility to count the lines of ABAP code in WDA; only controller methods and handler methods should be included.

Moreover the program has a strong need for restyling 😉

Supported releases

  • SAP ECC 6.0

Related Blogs


SLOC it's now available as Code Inspector check (SCI) and it's part of CloneFinder in SAP Custom Code Applications (Just start tcode /SDF/CD_CCA) and for this reasons is quite useless to continue the development of this tool.

However, given the number of requests received in SCN, I set up a repository in GitHub; you can download the ABAPSloc here: