<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Program or Table for Lines of Code in a Program or TCode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891207#M1326432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Janagar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a list of 600 reports and 500 TCodes. I would like to know the no of liness of code in each of these objects. I do not want the source code, as tht would be very time consuming to count the lines in the source code for so many objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2009 04:49:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-14T04:49:23Z</dc:date>
    <item>
      <title>Program or Table for Lines of Code in a Program or TCode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891205#M1326430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a list of programmes and Transaction codes. We would like to know the number of lines of code in each object. Is there any standard program or table which can give us this data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 04:21:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891205#M1326430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T04:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Program or Table for Lines of Code in a Program or TCode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891206#M1326431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Mick,&lt;/P&gt;&lt;P&gt;i have written a code for downloading the source code in wiki&lt;/P&gt;&lt;P&gt;hope it will be usefull for you to identify the lines of code&lt;/P&gt;&lt;P&gt;this code is for downloading the source code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: TRDIR, TADIR.

DATA: BEGIN OF REPLIST OCCURS 200, NAME(40) TYPE C, END OF REPLIST.
DATA: BEGIN OF BUFFER OCCURS 0, LINE(72) TYPE C, END OF BUFFER.
DATA: FILENAME(128) TYPE C, FILELENGTH(40) TYPE C.

SELECT-OPTIONS : SO_NAME FOR TADIR-OBJ_NAME.
SELECT-OPTIONS : SO_DEVC FOR TADIR-DEVCLASS.

PARAMETERS : PATHNAME(40).
PARAMETERS: P_AUTHOR LIKE SY-UNAME DEFAULT SY-UNAME.

SELECT * FROM TADIR
 WHERE DEVCLASS IN SO_DEVC
   AND OBJECT = 'PROG'
   AND OBJ_NAME IN SO_NAME
   AND AUTHOR = P_AUTHOR.
 SELECT * FROM TRDIR
        WHERE NAME = TADIR-OBJ_NAME
          AND CNAM = P_AUTHOR.
   MOVE TRDIR-NAME TO REPLIST-NAME.
   APPEND REPLIST.

ENDSELECT.
ENDSELECT.

LOOP AT REPLIST.
 READ REPORT REPLIST-NAME INTO BUFFER.
 FILENAME = PATHNAME.
 FILENAME+40 = REPLIST-NAME.
 FILENAME+70 = '.'.
 FILENAME+71 = 'txt'. "helpful to replace with SY-SYSID
*  filename+51 = sy-sysid.
 CONDENSE FILENAME NO-GAPS.
 CALL FUNCTION 'WS_DOWNLOAD'
      EXPORTING
           FILENAME         = FILENAME
           FILETYPE         = 'ASC'
      IMPORTING
           FILELENGTH       = FILELENGTH
      TABLES
           DATA_TAB         = BUFFER
      EXCEPTIONS
           FILE_OPEN_ERROR  = 1
           FILE_WRITE_ERROR = 2.
 CASE SY-SUBRC.

WHEN 0.
   WHEN 1.
     WRITE : / 'did not download', FILENAME, 'error opening file.'.
   WHEN 2.
     WRITE : / 'did not download', FILENAME, 'error reading file.'.
   WHEN OTHERS.
 ENDCASE.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;so in this code the final table will be having the source code&lt;/P&gt;&lt;P&gt;so its table index gives you the lines of code&lt;/P&gt;&lt;P&gt;hope it will be useful for you&lt;/P&gt;&lt;P&gt;The link to the above code is here&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/Snippets/To" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/Snippets/To&lt;/A&gt;&lt;EM&gt;download&lt;/EM&gt;ABAP&lt;EM&gt;source&lt;/EM&gt;code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;S.Janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 04:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891206#M1326431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T04:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Program or Table for Lines of Code in a Program or TCode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891207#M1326432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Janagar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a list of 600 reports and 500 TCodes. I would like to know the no of liness of code in each of these objects. I do not want the source code, as tht would be very time consuming to count the lines in the source code for so many objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 04:49:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891207#M1326432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T04:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Program or Table for Lines of Code in a Program or TCode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891208#M1326433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mick,&lt;/P&gt;&lt;P&gt;u can use the same code for this purpose,&lt;/P&gt;&lt;P&gt;just neglect the last function module part and final internal table named Buffer is there right..&lt;/P&gt;&lt;P&gt;put describe statement on that gives you the total lines of your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is more than enough i guess.&lt;/P&gt;&lt;P&gt;any guidance please get back to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;s.janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 05:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891208#M1326433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T05:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Program or Table for Lines of Code in a Program or TCode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891209#M1326434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marking this as answered as there are no more answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 04:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-or-table-for-lines-of-code-in-a-program-or-tcode/m-p/5891209#M1326434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-06T04:29:52Z</dc:date>
    </item>
  </channel>
</rss>

