How to count source code lines?

Hi guys!
I have a task to calculate total amount of lines of source code. The only way i have found out is to get report
with read report prog into itab statement and get number of lines with describe itab lines num_of_lines.
But in this way it is not possible to handle classes for example. Is it possible to count lines with SQL statement?

Hi,
try this report [https://wiki.sdn.sap.com/wiki/display/Snippets/SearchforStringsinABAPSourceCode].
For counting the lines you specify a search string of
The includes for classes can be specified by
ZCL_XY*
Best regards
Thomas
Edited by: Thomas Schulz on May 4, 2010 1:33 PM

Similar Messages

  • How to write source code in smart forms?

    hi friends,
    can anyone can help me in writing  sorcecode in smartforms r
    any materail link.
    if it is helpful points can b rewarded.Thanks in advance.

    Hi,
    Check this link for
    how to write source code in smart forms?
    http://****************/Tutorials/Smartforms/GettingStarted/SimpleText.htm
    You can write Source Code in smartforms By Choosing Program Lines.
    Check this link with Screen Shots
    http://****************/Tutorials/Smartforms/PO/page1.htm
    Reward All Helpfull Answers
    Regards
    Fareedas
    Edited by: Fareeda Tabassum S on May 21, 2008 3:09 PM

  • How to handle source code changes in apex

    hi all,
    can anybody help me plz...
    how to handle source code changes in apex.
    which development process is best suite for apex.
    Regards
    Alekh

    Thanks Andy, so as per the suggestion we have to handle the above snippet as individual if block statements as i had shown below.
    But in this case how we show the else part as NULL.
    correct me if my understanding is wrong.
    if  'Products' in (:P1_ENG_GRP1, :P1_ENG_GRP2, :P_ENG_GRP3) then
                    lv_to_email_id :='[email protected]';
    end if;
    if  'Materials' in (:P1_ENG_GRP1, :P1_ENG_GRP2, :P_ENG_GRP3) then
               lv_to_email_id :='[email protected]';
    end if;Thanks,
    Anoo..

  • How to include source code in web dynpro java deployment

    Hi,
    We dont have NWDI.
    We are creating ear files out of web dynpro applications packaging them as sca files and deploying them in server.
    But the source  code is not included in ear.
    How to include source code with your ear/sca , so that when anyone downloads the sca file later, they are build the Project in the studio.
    How would they typically download? Do they require NWDI ,
    Right now we dont have NWDI in place, but we want to do is parcel the applications such that the source code should be available at a later time for download.
    This is possible with .par files , but what about web dynpro?
    Thanks,
    Deb

    If you are not using NWDI use the _comp file.

  • How to display source code of a webpage in Safari 7.0?

    Hello. I'm unable to find how we used to once enable developing tools in Safari Preferences or simply CMD + ALT + A to display the source code of a webpage. Now I've no clue how to display source code of a webpage in Safari 7.0 on Mac OS X Mavericks. Help.

    Hi gss2,
    Make sure you are not under the Apple icon but under Safari>Preferences>Advanced. All the way at the bottom check the box that says: "Show Develop menu in menu bar."
    Now go back to the page you want to get the source code for, right click on it and choose Inspect Element. Hope this helps.
    Cheers,
    LURDS LLC

  • Where is View Source? How can the source code of a website be viewed?

    Where is View Source? How can the source code of a website be viewed?
    View Source used to be accessed via a drop-down menu, but no longer. Why?
    I'm using Firefox 24.0.

    1.)Get into Firefox.
    2.)open any page that you want to see the source code.
    3.)After complete opening of the page do"right click"then you can see view page source,click it to see Source of the page.
    Thank you.

  • How to obtain source code of weka and enable to modify it

    hello,
    how to obtain source code of weka and enable to modify it such i want to extract code of some process that I make

    Hi ENG,
    Since the issue regards to Weka. It is out of the support boundaries of our forum, I suggesT you post the question in the following forum:http://forums.pentaho.com/forumdisplay.php?81-Pentaho-Data-Mining-WEKA.
    It is appropriate and more experts will assist you.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to migrate source code from TFS 2010 to a new TFS 2010

    Hi,
    Please help me, How to migrate source code from TFS 2010 to a new TFS 2010. we are using SQL 2008 R2 for DB storage and we have Backup of TFS DB. First TFS 2010 is live environment and second TFS 2010 is test environment both OS and SQL version is same. 

    Hi Pankaj0439,
    In general, to move TFS from a hardware to another, you can follow the steps as below:
    1. Check your permissions
    2. Back up databases and install software
    3. Restore TFS databases to the new hardware
    4. Update the configuration of the new application-tier server
    5. Verify permissions, notify users, and configure backups
    And you can also refer to this
    article in MSDN for more details.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to copy source code without line numbers?

    Dear all,
    how can I easily copy source code from a post or thread. When I do it via the mark the text and CTRL-C I always have the line numbers also in the clipboard. It is anoying to remove 100+ line number to use the posted code from a thread in my IDE.
    Thank you, Time

    Do you mean how to copy text out of a forum post without the line numbers?
    If that is the case, then unlike the previous response I do think it is a forum issue and a browser incompatibilty. I noticed the same issue between Firefox and Safari under Mac OSX. While Firefox allows me to just select the text without the line numbers, Safari would not.
    Test:
    line 1
    line 2
    In fact, using Firefox verson 22 for instance, I cannot select the line numbers at all. Even when I select the whole page, line numbers are ignored.
    Perhaps you should try with another browser.

  • Mapping exceptions to source code lines

    From a JD-newbee: When an exception is thrown, it is always nice to get to know the exact line in the source code that caused the exception. I am currently unable to get such info, and suspect that this is due to JIT-compiling being active, but have been unable to figure out how to disable the JIT. Could anyone please let me know how to disable the JIT, or, if that's not the solution to my problem, tell me what I should do?

    Hi,
    try this report [https://wiki.sdn.sap.com/wiki/display/Snippets/SearchforStringsinABAPSourceCode].
    For counting the lines you specify a search string of
    The includes for classes can be specified by
    ZCL_XY*
    Best regards
    Thomas
    Edited by: Thomas Schulz on May 4, 2010 1:33 PM

  • Please let me know how to display source code

    Hi everyone.
    my name is Kazuma working in Japan.
    We have a problem with SE38.
    We transport one of executives program, which made from other development system, to our system.
    When we use SE38 and display botton, we encounter short dump like below and can't see source code.
    We want to know how we change BASIS or program.
    If somebody know similar situation, please let us know.
    >>ERROR MESSAGE
    The Import dataset has been destroyed
    What happened?
    The current ABAP/4 program "SAPLLOCAL_EDT1" had to be terminated because one of the statements could not be executed
    This is probably due to an error in the ABAP/4 program
    Error analysis
    The dataset could not be imported because it was in an unexpected format
    This is usually because the dataset has been destroyed as a result of directly manipulating the IMPORT/EXPORT data by other means (such as explicitly deleting parts of the dataset with SQL commands instead of using DELETE FROM DATABASE, u2026)
    In this case, the dataset header is already invalid
    In other words: The version ID of the dataset is invalid
    System environment
    SAP Release          4.6C
    Application server          sdax31
    Operating system          SunOS
    Release                    5.8
    Hardware type          sun4us
    Database server          sdax31
    Database type          ORACLE
    Database owner          SAPR3
    SAP kernel          46D
    Patch lebel          1646
    Patch text          ""
    Information of where termination occurred
    The termination occurred in the ABAP/4 program "SAPLLOCAL_EDT1" in "GET_MODIFICATION_INFORMATION"
    The main program was "RSABAPPROGRAM"
    The termination occurred in line 143 of the source code of program "LLOCAL_EDT1U36" (when calling the editor 1430)
    Edited by: kazuma mukai on Mar 3, 2009 6:34 PM

    Welcome to SCN
    Try to
    create the same program in your DEV client , by cut & paste the code from the other envionment , this will create a transport, activate the program and transport.
    This will be roundway solution
    Do you have any previous version to this program in the version management?

  • How to get source code in the video examples

    I'm wondering how to get the source code, which used in the
    video training. Thank you very much.

    I don't believe that the source code is available.... however
    you can do what I am going to do. On my 2nd round of going through
    this stuff I am going to try to re-create that system in the
    videos. So far it seems each step and every line of code is
    shown... though there may be some things I have to get creative
    with. :)
    Someone else posted a link to get a csv of the employees
    info, which can be used to create an xml file for the tutorials.

  • How to count no of line present in internal table depending on condtion.

    Hi,
    I want to count no of line present in one internal table.
    For example: I have an internal table with output tax line item
    lwa_gt_alv-ty_auste_ep consider this internal table having 100 lines
    depending on the condition copany code(BUKRS), Year(GJAHR), and Document number(BELNR).
    I want to count the number of line present for above mentioned condition in internal table lwa_gt_alv-ty_auste_ep.
    Kindly help as soon as possible.
    Thanks and best regards,
    Niteesh Rai

    Hello
    So, count into exist loop/endloop:
    data: counter type i.
    loop at itab.
    * do anything here ...
      if BUKRS = " condition for bukrs here
      and GJAHR = " condition for gjahr here
      and BELNR = " condition for belnr here
        counter = counter + 1.
      endif.
    * do anything here ...
    endloop.
    write counter.
    Also you may to try other way:
    data: counter type i.
    data: itab1 like itab occurs 0.
    itab1[] = itab[].
    delete itab1 where BUKRS NE " condition for bukrs here
                   and GJAHR NE " condition for gjahr here
                   and BELNR NE " condition for belnr here
    describe table itab1 lines counter.
    write counter.

  • How to use Source Code Control for Large Application?

    Hi, All!
    I would like to collect knowledge about "best practice" examples for using Source Code Control and project organization for relative large application (let's say approx 1000 SubVIs).
    Tools used:
    LabVIEW 8.0
    CVS Server
    PushOK CVS Proxy Client
    WinCVS
    With LabVIEW 8 we can organize large project pretty well. This described in article Managing Large Applications with the LabVIEW Project.
    I have read this article too: Using Source Control Software with LabVIEW In this Article Source Safe used, but with PushOK all looks nearby the same and works (some tricks for compare function are required).
    Example. Two developers working together on same project. Internally project is modular, so one developer will work with module "Analysis", and another one with "Configuration" without interferences. These modules placed into Subfolders as shown in example above.
    Scenario 1:
    Developer A started with modification of module "Analysis". Some files checked out. He would like to add some SubVIs here. So, he must also perform check out for the project file (*.lvproj), otherwise he cannot add anything into project structure.
    Developer B at the same time would like to add some new functions into module "Configuration". He also needed to check out project file, but this file already checked out by Developer A (and locked). So, he must wait until lvproj file will be checked in. Another way is mark *.lvproj files as text files in PushOK, but then one of developers will get conflict message by checking in and then merging will be necessary. This situation will coming very often, because in most cases *.lvproj file will be checked out all the time.
    Question: Which practice is better for such situation? Is Libraries better than folder for large project?
    Scenario 2:
    Developer C joined to the team. First, he must get complete project code for starting (or may be at least code of one Library, which assigned to him).
    Question: How it can be done within LabVIEW IDE? Or WinCVS (or other SCC UI) should be used for initial checkout?
    Scenario 3:
    Developer D is responcible for Build. Developers A,B,C have added lot of files into modules "Analysis", Configuration" and "FileIO". For building he need to get complete code. If our project splitted into folders, he should get latest *.lvproj first, then newly added SubVIs will appear in Project Explorer, then he should expand tree, select all SubVIs and get latest versions for all. If Project organized in Libraries, he must do the same for each library, isn't?.
    Question: Is this "normal way", or WinCVS should be used for this way? In WinCVS its possible with two mouseclicks, but I prefer to get all code from CVS within LabVIEW IDE recursively...
    That was a long post... So, if you already working with LabVIEW 8 with SCC used for large project, please post your knowledge here about project structure (Folders or Libraries) and best practices, its may be helpful and useful for all of us. Any examples/use cases/links etc are appreciated.
    Thank you,
    Andrey

    Regarding your scenarios:
    1. Using your example, let's say both developers checked out version 3
    of the project file. Assuming that there are only files under the
    directories in the example project, when Developer A checks in his
    version of the project, there will be new files in one section of the
    project separate from where Developer B is working. Developer B,
    notices that there is now a version 4 of the project. He needs to
    resolve the changes so will need to merge his changes to the latest
    version of project file. Since the project file is a text file, that is
    easy to do. Where an issue arrises is that after Developer B checks in
    his merged changes, there is a revision 5. When Developer A and B go to
    make another change, they get the latest version which will have the
    merged changes to the project file but not the referenced files from
    both Developer A and B. So when A opens version 5, he sees that he is
    missing the files that B checked in and visa versa. Here is where the
    developers will needs to manually use the source control client and,
    external to LabVIEW, get those new files.
    Where libraries help with the above scenario is that the library is a
    separate file from the project so changes made to it outside of the
    project do not require the project to be modified. So this time, the
    developers are using a single project again which time time references
    two libraries. The developers check out the libraries, make changes to
    the libraries, and then check those changes in. So when each developer
    opens the project file, since it references the project file, the
    changes to the library will be reflected. There is still the issue of
    the new files not automatically coming down when the latest version of
    the library is obtained. Again, the developers will needs to manually
    use the source control client and, external to LabVIEW, get those new
    files. In general, you should take advantage of the the modularity that
    libraries provide.
    2. As noted in the above scenario, there is no intrinsic mechanism to
    get all files referenced by a LabVIEW project. Files that are missing
    will be noted. The developer will then have to use the source control
    provider's IDE to get the initial contents of the project  (or library).
    3. See above scenarios.
    George M
    National Instruments

  • How to count number of lines in a file?

    I am using a BufferedReader to read my file, but I like to know how to count the number of lines in a file is there a way to do that in Buffered Reader or do I have to use FileInputLineStream?

    Well, if you know how to read one line with a Buffered reader, and you know how to keep reading lines until you run out, then all you have to to is initialize a counter to zero before you start reading, add 1 to it each time you read a line, and then examine its value when you're done.
    Try that, and post again if you get stuck.
    Just be careful how you construct your loop. "Off by one" errors are a common way to get bitten. It could happen if you count what you think is the last line, but you've actually already counted all the lines and you end up counting one extra for "there are no more lines".

Maybe you are looking for

  • Closing references YES or NO

    Hi all My program contains a cluster with 120 controls (string, Boolean and number). Is it too much? I need visibility or invisibly all controls during the program sometimes. In attachment is a simple example how it is work. Is using block "close ref

  • Wacom pen pressure sensitivity with PS elements 9

    I was just using the free trial with CS6 and was able to get  it to ignore the pen pressure sensitivity, so that it was the same size no matter how hard i pressed down. In elements I'm having a hard time in getting it to ignore the pressure sensitivi

  • How to set permissions on a file for a Mac without active Directory

    We don't have our Macs in the Active Directory, we are looking to share an external hard drive to only Macs and not the Windows PC's on the network with out using active directory. I have tested sharing the external hard drive from a PC to everyone a

  • Permissions / Uninstall Snafu on MacOS 10.9

    Preferences won't save claiming a permissions error.  Disk Utility found no problem.  Uninstall claimed need for Application Manager.  Application Manager installation failed, directed to download Application Support Advisor.  Application Support Adv

  • Fatal Plug-in Error / Yahoo Games

    I use Windows XP Home SP2. When attempting to sign into any Yahoo game room, I get the following: "JAVA (TM) Fatal Error. The Java Runtime Environment cannot be loaded." A second attempt to sign in results in "Several Java Virtual Machines running in