Skip to Content

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 Ferrari. 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

Results

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

Updates

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:

https://github.com/OlivieriAndrea/ABAPSloc/releases

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. Dharni Lakshmi Narayanan

    Hello Andrea,

    I am currently working on a Project for which we are kind of looking for estimating the Number of Lines of Code in ABAP.

    I had come across the blogs about the abapSLOC project, but when I try to access the links for the source code it reaches to the ‘Code Exchange’ page which mentions about the official close of the page.

    Could you please help me out in how we could access the Utility for our purpose.

    Thanks, Dharni.

    (0) 
      1. Andrea Olivieri Post author

        Hi Bruno,

        unfortunately I didn’t have the time to migrate the project to another platform.

        If you provide me your email address I can send you the SAPlink file.

        Best,

        Andrea

        (0) 
        1. Sandy Singh

          Hi Andrea,

          Could you please send me the SAPLink nugget for abapSLOC. I am not sure if I can share my email ID in this space.

          Is it possible for you to upload it to some site or provide a link in this blog.

          Thanks

          Regards

          Sandy

          (0) 
        2. Jay Rachfal

          Hello Andrea,

          Could you please send me a copy too?   It isn’t clear how to provide you with an email address without publicly posting it….

          Thanks!

          – Jay

          (0) 
  2. Andrea Olivieri Post author

    Dear All,

    ABAPSloc is 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, I set up a repository in GitHub; you can download the ABAPSloc here.

    Best,

    Andrea

    (0) 

Leave a Reply