Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to count the whole coding of a package

Former Member
0 Kudos

Hi all!

I want to write a short report which counts the whole coding of a package (reports, classes, functions, includes, ...).

Therefore I count the lines of a table which was filled with

READ REPORT rep_name INTO itab.

Now I have a result (e.g. PTIM 693.602 lines)

Is there a possibility to check this result with the "real" amount of coding.

Thanks for your help,

Timo

5 REPLIES 5

former_member589029
Active Contributor
0 Kudos

Hello Timo,

Try transaction 'CODE_SCANNER' and search for '.'

This will not give you the exact number (because it won't count multi line abap statements and comment lines) but it will give you a pretty good idea where your numbers are.

Just put in the package name(s) and search for the period '.'

Hope that helps,

Michael

Former Member
0 Kudos

Hey Michael,

thank you very much!

With this method I get 322.102 lines

I don't know how to interpret my result. Perhaps I counted lines twice?

Regards,

Timo

0 Kudos

hi Timo,

#1 one line:

SELECT * FROM xxx INTO TABLE yyy.

#1 two lines:

SELECT * FROM xxx

INTO TABLE yyy.

#3 three lines:

SELECT *

FROM xxx

INTO TABLE yyy.

With dot counting you always get one as result, while all three statements is one and the same statement in fact and do exactly the same.

hope this helps

ec

0 Kudos

Hi Eric,

yes I think that's exactly the problem. So, with this point and the thing that you have comments at the beginning of every report,function module, subroutines, classes etc. it's possible to have this high number, right?

Thanks for help!

0 Kudos

you are right, comments and even empty lines modify the number. So if you count the dots only, than you possibly closest to the right solution.