Count lines of code in WDA component

Is there a way to count the lines of own code (or otherwise measure the "size") in a WDA component on a 7.01 system? Please don't make me go through every single method one by one

If you load the Web Dynpro Component in SE80 and then choose Web Dynpro Component->Check->Generation Limits, this will give you the load size in bytes of the WD Component. It also has some breakdown liek the number of variables declared.  However nothing that gives you the exact lines of code.
The source code of all WD methods is stored in table WDY_CTLR_COMPO, so I supposed if if you really needed to you could write a small program to count the number of lines of code or the number of characters.

Similar Messages

  • Count lines of code present in methods of a class

    Hi Friends,
    Can anyone suggest how to count lines of abap code in methods of a class?I have used the function module  'SEO_CLASS_GET_INCLUDE_SOURCE' but this function module doesnt counts the code for methods of a class.
    Kindly help.
    Regards
    ST

    Hi siji,
    once try the below info.
    data: itab type table of string.
    data: w_lines type i.
    read report <reportname> into itab.
    describe table itab lines w_lines.
    write: / 'Report lines:', w_lines.
    It is however important to find the exact report name.
    For standard ABAP reports it is easy, it is the name of the report itself.
    For classes and function modules this is somewhat different.
    Correct report name for function modules can be found as follows :
    Use table TFDIR, field FUNCNAME is your function module.
    PNMAME contains the main program name of the function group, not of the function module.
    Function module report can be created as follows PNAME+3 concatenated with 'U' and field INCLUDE.
    Example for the function module RFC_PING this will be
    'LSRFC' + 'U' + 07 = report name LSRFCU07
    Also take a look at the function module FUNCTION_INCLUDE_CONCATENATE
    Hint: lines( ) is a built-in (system class) static function returning the number of lines in a given internal table. You will like it much better than old-fashioned DESCRIBE TABLE statement where you make us of a count variable an need one more statement for the summing up.
    Note:  If you dont want to count blank line and comments, try this code
         delete itab where table_line is initial or table_line(1) = '*'.
           add lines( itab ) to total_linecount.
    Regards,
    Ravi

  • Counting lines of code

    Does anyone know a way to count the lines code in a package
    excluding comments? The following are commenting styles:
    * comment1
    -- comment 2
    /* comment 3 */
    comment 4

    CREATE OR REPLACE PROCEDURE count_code(p VARCHAR2) Is
    CURSOR c1 IS SELECT * FROM user_source WHERE name=UPPER(P);
    l_count number :=0;
    l_tot_count number:=0;
    comment_flag boolean:=false;
    BEGIN
    for crec in c1 loop
    l_tot_count := l_tot_count+1;
    IF substr(trim(crec.text),1,2) not IN ('--','/*') and not
    comment_flag THEN
    l_count := l_count+1;
    ELSIF substr(trim(crec.text),1,2)='/*' THEN
    comment_flag := true;
    end if;
    IF comment_flag and instr(trim(crec.text),'*/')>0 THEN
    comment_flag:=false;
    end if;
    END LOOP;
    dbms_output.enable(100000);
    dbms_output.put_line('Object
    Name : '||p);
    dbms_output.put_line('Total number of lines
    Code : '||l_tot_count);
    dbms_output.put_line('Total number of lines Code with out
    comments : '||l_count);
    END;
    Suresh Vemulapalli

  • Problem in ECM involving HRECM00_PLANNING_OVERVIEW(standard WDA component)

    Hi Guys,
    I am currently working in HR module(ESS/MSS).Here we will have to use the standard WDA component HRECM00_PLANNING_OVERVIEW to implement the budget approver application.
    If you launch it in portal and select a budget owner that gets populated in the first screen and click on "Review Details" button it basically calls a java web dynpro application which shows all the employess under that particular budget approver.
    If you open  HRECM00_PLANNING_OVERVIEW in se80,and goto the method "onactionopen_planning"(method which gets fired when "Review Details"  button is clicked) you will see the last stament as-
    ELSE.
              wd_this->launch_planning_ui( ).
            ENDIF.
    Double click and go inside  aunch_planning_ui().
    method LAUNCH_PLANNING_UI .
      DATA fpm                  TYPE REF TO if_fpm.
      DATA navigation           TYPE REF TO if_fpm_navigation.
      DATA key                  TYPE fpm_s_navigation_key.
      DATA target_key           TYPE string.
      fpm = cl_fpm_factory=>get_instance( ).
      " Store table of pernrs in memory so that comp planning UI can read it
      wd_assist->write_memory_for_planning(
        EXPORTING
          crevi               = wd_this->selected_crevi
          planning_pernr_tab  = wd_this->planning_objec_tab ).
      " Navigate to Compensation Planning iView
      key-key1 = 'HRECM'.
      key-key2 = 'HRECM_LAUNCH_PLANNING'.
      navigation = fpm->get_navigation( is_key = key ).
      target_key = navigation->get_key_from_alias( iv_alias = 'ECM_WDJ_LAUNCH' ).
      navigation->navigate( iv_target_key = target_key ).
    endmethod.
    This is the standard code for the method.
    navigation = fpm->get_navigation( is_key = key ). In this line its callin get_navigation and getting all the navigation parameters for the java wd application i beleive. If you go inside method get_navigation you will find in the last line its assigning
      APPEND ro_navigation TO mt_navigation.
    in mt_navigation if you go deep inside the class attributes at debug mode and see the attibute mt_target you will get an attribute application_params inside which the portal path(in bold) is getting fetched.
    application_params
    LINK_TEXT |Review Details                                                 |
    OBLIGATORY|X                                                                  |
    APPLICATIO<POP                                                               |
    APPLICATIO<ECM_WDJ_LAUNCH                                                 |
    PATH_TO_PA<ROLES://portal_content/com.sap.pct/line_manager/com.sap.pct.erp<
    Parameter_<                                                               |
    disabled  |                                                               |
    invisible | 
    I want to know from where it is getting the portal path(path_to_pa)?Because i have to change the portal path for my use.
    Please help experts.
    Thank,
    Saikat.

    Oops....forgot to close the thread.
    solved this a long time back.It can be configured by the transaction lpd_cust.
    thnx,
    saikat.

  • Counting lines in a text/csv file.

    Can you advice me, how I can get the total number of lines in a text/csv file please using java code.
    I will get the text/csv file content in a string variable not as a file.
    EX: string var = "123\n234\n123\n3456\nsdfsd\n" here \n is in the new line.
    for this I have to get the total lines as 5.
    Please advice.
    Thanks.

    Kayaman wrote:
    user12679330 wrote:
    Oh ok.. ignore the last one, Any idea on this please.Count the newline characters like morgarl told you. You're being very difficult to help for such a simple problem.Thats because nobody has posted the code yet dude ;)
    I'm pretty sure that once the OP finally takes the hint and writes the two lines of code needed to solve this question, he'll come up with something that sometimes gives the correct answer and other times gives a count that is one-off.

  • Total number of lines of code in a  project

    Hi All,
    We had developed a project in oracle adf using jdeveloper Version 11.1.1.4.0.Is there any way to find how many lines of code we had wriiten in the entire project.
    Regards,
    Smaran

    Hi,
    NOS stands from Number Of Statements and is a bit different than nloc (line of codes) that is count the statements rather than lines, thus independent from coding styles. As for V(G), it's the cyclomatic complexity, also known as McCabe.
    Regards,
    ~ Simon

  • Count lines in table

    hallow
    i have internal table and i wont to count lines with key
    example
    data
    001
    001
    002
    003
    001
    i wont in some fiels to now how much number of 001 i have here 3
    regards

    Hi Shnya,
    first sort the internal table based on the field that u want to have count...
    Example: lets suppose that the field name itself is data and the internal table name is l_itab and it has the values that u have given in your post...
    Sample code:
    sort l_itab by data.
    loop at l_itab into wa_itab.
      lv_counter = lv_counter + 1.
      at end of data.
      Each time it triggers, lv_counter will be having the *   value for a particular value in data field.. for the *   first time it will be having counter for 001, second *   time 002 and so on...
      write code according to your requirement.. and then *   clear lv_counter...  
      endat.
    endloop.
    Hope this helps u...
    Regards,
    Phani.

  • Error highlighted no lines of code to be corrected just the error code

    When I run the macro I get this error:
    "The attempted operation failed.  An object could not be found."
    The error highlighted no lines of code to be corrected just the error code.
    Dim OLapp As New Outlook.Application
    Dim OLns As Outlook.NameSpace
    Dim Inbox As Outlook.MAPIFolder
    Dim Bills As Outlook.MAPIFolder
    Set OLns = OLapp.GetNamespace("MAPI")
    Set PersonalFolder = OLns.GetDefaultFolder(olPublicFoldersAllPublicFolders)
    Set Inbox = OLns.GetDefaultFolder(olFolderInbox)
    Set BillsFolder = PersonalFolder.Folders("Bills")
    If Inbox.Items.Count = 0 Then Exit Sub
    For iLoop = Inbox.Items.Count To 1 Step -1
    Set obj = Inbox.Items(iLoop)
    If obj.SenderEmailAddress = "[email protected]" Then obj.Move BillsFolder
    Set obj = Nothing
    Next iLoop
    Set BillsFolder = Nothing
    Set PersonalFolder = Nothing
    Set Inbox = Nothing
    Set OLns = Nothing

    Are you sure a folder named Bills exists in the PF store?
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • Counting lines problem. Please help!!

    Hi all,
    I just have a small problem i cannot resolve, here it is: I read through a file and i like to count the lines of the file there is before a special word.
    E.g
    My file contains:
    "hi
    how are you
    my name is john
    and i live
    britain"
    I'd like to count how much lines there are in the file before the word LIVE ==> result would be 4.
    I proceed with StreamTokenizer, but i don't knor how to specify the word. Here is my code:
         try {FileReader fr = new FileReader("test2.dat");
                   BufferedReader br = new BufferedReader(fr);
                   StreamTokenizer stk = new StreamTokenizer(br);
                   do {
                   n = stk.nextToken();
                   li = stk.lineno();
                   if (n == stk.TT_NUMBER) {
                        n = stk.nextToken();
                   if (n == stk.TT_EOL) {
                        li++;
                        n = stk.nextToken();
                   if (n == stk.TT_WORD) {
                        String str = stk.sval;
                        if ("entier".equals(str)) {
                             System.out.println(li);
                        else {
                             n = stk.nextToken();
                   while (??????????????);
    I want here to specify the word "entier" but how to do this??
    Thanks very much for your precious help....

A: Counting lines problem. Please help!!

Use LineNumberReader, which counts lines for you. Here's a complete program in 16 lines:
import java.io.*;
public class test4 {
  public static void main(String[] argv) {
    if (argv.length < 2) { System.err.println("no arg"); System.exit(0); }
    try {
      LineNumberReader in = new LineNumberReader(new FileReader(argv[1]));
      String line;
      while((line = in.readLine()) != null)
        if (line.indexOf(argv[0]) != -1)
          System.out.println("Found match at line " + in.getLineNumber());
    } catch (IOException e) {
      e.printStackTrace();
}If you want case insensitivity, you can make both lines lower-case before searching. Or you can use regular expressions.

Use LineNumberReader, which counts lines for you. Here's a complete program in 16 lines:
import java.io.*;
public class test4 {
  public static void main(String[] argv) {
    if (argv.length < 2) { System.err.println("no arg"); System.exit(0); }
    try {
      LineNumberReader in = new LineNumberReader(new FileReader(argv[1]));
      String line;
      while((line = in.readLine()) != null)
        if (line.indexOf(argv[0]) != -1)
          System.out.println("Found match at line " + in.getLineNumber());
    } catch (IOException e) {
      e.printStackTrace();
}If you want case insensitivity, you can make both lines lower-case before searching. Or you can use regular expressions.

  • Enhance the Standard WDA component method

    Hi All,
    Can we write the code in a method of the standard WDA component. I know that we can use post-exit but it will be triggered after the method. My requirement is lying in between the standard method.
    Please suggest if we can write the code mid of the standard method.
    Thanks
    Sanket sethi

    Done. Through overwrite method....

  • How to view the source code of JavaFx component ?

    Hi everybody,
    I just want to know if it's possible to view the source code of the component Button (from JavaFx) and how to do it ?
    In fact, I don't really understand if JavaFx is entirely open source ?
    Thanks.

    I lack time right now to experiment, but I think you can get your goal just with CSS.
    Here are the variables I found for Button:
    Button
    borderFill: class javafx.scene.paint.Paint = (null)
    button: class javafx.scene.control.Button = Button
    colorBrightness: Float = 0.8156863
    cornerRadius: Float = 7.0
    fill: class javafx.scene.paint.Paint = (null)
    focusFill: class javafx.scene.paint.Paint = javafx.scene.paint.Color[red=0,green=147,blue=255,opacity=1.0]
    focusSize: Float = 1.4
    highlightFill: class javafx.scene.paint.Paint = (null)
    label: class javafx.scene.control.Label = LabeledImpl [id=-Label]
    paddingBottom: Float = 4.0
    paddingLeft: Float = 10.0
    paddingRight: Float = 10.0
    paddingTop: Float = 4.0
    shadowFill: class javafx.scene.paint.Paint = (null)
    textFill: class javafx.scene.paint.Paint = (null)
    textFont: class javafx.scene.text.Font = Font[name=Verdana, family=Verdana, style=, size=11.0]Try changing cornerRadius and focusFill/highlightFill, etc. Note that some discovered properties are not affected by CSS... Perhaps that's why there isn't an official doc about CSS styling currently.

  • Trying to modify the code in a component

    Hi,
    I made a flash website with photo galleries using a component
    that I bought online.
    The component is loading the image in a thumbnail scroll bar
    via a XML file and the full size image display in a UILoader.
    So far nothing special.
    But when I reach a certain amount of pictures in the gallery,
    the scroll panel get stuck while loading and doesn't display the
    full size image. Then the thumbnails don't react at all.
    Here is the address where you can see the problem:
    Liquit.dk
    The gallery that has the problem is: "Commercials".
    If you navigate in the rest of the website and come back,
    then the gallery is working!???
    The problem appears only the first time you visit the
    website, or after you empty the cache.
    But the first time you visit a website is the most important
    one, isn't it?
    So of course I tried to get support where I bought the
    component. They pretend that they don't see any problem when
    checking the website online. That answer is just not acceptable
    when every single person who visited the site reported the exact
    same problem. So it seems like they are just not willing to help
    their customers once they sold their stuff.
    My theory is that the component is loading all the elements
    at the same time and I would like to be able to access the code of
    the component to change the method, so that the component will load
    the elements one by one.
    Is there a way to access the code when one buy a component?
    If you think I totally got it wrong and you found the reason
    why it's not working properly, please tell me ;-)
    I also provide all the files used to make that site at the
    following address:
    mmarauder/liquit_files
    Thanks in advance,
    Sebastien

    Hi,
    I'm back with the same problem. It's still not solved and
    I've been asking some questions to the team that is hosting the
    website.
    In order to verify if the issue could come from their server.
    They first thought about "packet loss". I ran some "ping" tests to
    verify and it is not a packet loss problem.
    Which leads to only few solutions:
    First - there is something wrong with my flash application
    that I haven't been able to see. When I check with the debuger in
    flash everything looks fine, but maybe I don't read the info
    correctly.
    I don't know if any of you guys actually used the files I
    provide at the end of my first email. As I provide everything
    includind the .fla file. So anybody with the flash application can
    open it and check if there are problems with what I've done.
    I've been very carefull, but I'm a real beginner since this
    website is my first flash experience.
    Somebody who has been a flash develloper for 6 years
    suggested that it could be a bug in flash.
    If that happens to be true, I'll have to rewrite the entire
    application in a different way, which will be a problem since I
    don't know how I can make this work in another way.
    So if somebody can help me or send me tips or tutorials on
    how to make that website that would work the same way. I'm ready to
    give it a try.
    Thanks in advance
    Sebastien

  • Typelag happens in big projects. AKA 38,325 lines of code.

    My machine runs very fast in all other applications, it is a gaming computer that runs Starcraft 2 smoothly on the highest settings.
    I'm writing a very big application in Flash.  It is well on its way to being a MMORPG.  I have hundreds of classes, but my biggest class has really off the charts type lag.  My biggest class is 38,325 lines of code.
    Now every time I type, it tries to highlight words in grey for some reason.  I think every letter I type, it searches the entire 38,325 lines of code for that word in order to highlight all cases of it.
    take a look at this picture and how "hud" is highlighted
    LINK: http://www.goodnewsjim.com/images/slowdown_FB4.png
    As I move the cursor around and edit, I often times get 1-5 seconds of slowdown, sometimes I even get 20 seconds of type lag where the Flash Builder temporarily says "Not Responding in the window bar".  This happens all of the results of me typing letters, moving arrow keys or pressing delete or backspace.
    For small edits, I can wait 20 seconds to edit one word, but when I work a lot on my code, I have to open an external editor like Scite, but the alt-tabbing consumes time, and there is a mouseclick to reload the .as file.  I would like to use Flash Builder 4 for editing my code, after all that is what an IDE should be able to do if anything.  An IDE should at the very least be no worse than a generic text editor.
    Please tell me how I can disable Flash Builder 4 from trying to highlight words in grey. I think this is what is causing my typelag.  I've turned off code hints.

    Anirudh,
    Thank you again for your quick response.
    1) I already disabled Code assist completely in Window -> Preferences -> Flash Builder -> Editors.
    2) Ok, I did toggle mark occurances off.
    The problem still persists.  I still have type lag. 
    ,Jim

  • Total number of lines of code in a class.

    Dear Experts,
    Given a class, I want to find out the total number of lines of code in all of its methods.  Following sub-parts are derived.
    1.  Find out all the methods of the class
    2.  Find out the number of lines for each of these methods and finally add the total number.
    Can you kindly let me know how I can do this?  Thanks a lot !
    Best Regards, Vikram

    Be aware that a 2D array is an array of arrays, which don't necessarily have to be the same length. e.g.int[][] a = new int[2][];
    a[0] = new int[10];
    a[1] = new int[20];
    /* a.length == 2
       a[0].length == 10
       a[1].length == 20*/

  • White lines of code on black background upon starting up

    I recently sent my Macbook in due to problems with the screen going dark for no reason. Upon recieving the laptop back, I noticed problems upon starting. When I restart my laptop, there are white lines of code on a black background. I called in to support, but my support expired and here I am searching for help. They told me that I needed to try and reset my drivers, or my HDD is bad. To reset my drivers they gave me a combination of keys to press upon restarting, but I don't remember the combination of keys. I have repaired my disk using the install CD, but still am having problems.
    It's crazy that I send my laptop in and get it back with other problems... Any help is appreciated becuase Apple surely isn't helping.
    Macbook   Mac OS X (10.4.8)   Core Duo w/ Bootcamp

    Turn the computer off. Wait one minute. Restart. If you are still booting into single-user mode (black screen with white print) then at the prompt enter:
    reboot
    Then press return. If this does not start you up into OS X then there's a system problem. You will need to reinstall OS X. You can do this using the Archive and Install option that does not require you to erase the hard drive. Your old system will be archived in a Previous System Folder at the root of the hard drive.
    Before performing the Archive and Install you should do the following:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. Then select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then quit DU and return to the installer. Now proceed with the OS X installation.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Maybe you are looking for

    • How can I create sharp screenshots in PDF format?

      I would like to create sharp screenshots in PDF format, but whenever I use Grab (Version 1.3(90)) for my screenshots the images turn out to be somewhat fuzzy. The shots that I want to take are of the whole screen, with the browser Safari open, showin

    • Billing Document Not getting released to accounts

      Hello experts, We are facing a problem after migration from 4.6 to ECC. When releasing a billing document to accounting we rae getting a error  "SYST: Tax jurisdiction code at lowest level not transferred". We found a note #971515 for the error which

    • Apple's iSync web up-2-date?

      Does anyone know if Apple has continued to keep their web page about compatible iSync devices up-to-date? I'm in the market for a new phone and wanted to make sure that the only options I have are off this web page: http://www.apple.com/macosx/featur

    • Rich Black removal from PDF

      Hi Team, The PDF which we are supplying to prointer is reporting issue of rich black color used. Is there any way we can remove rich black from PDFs using acrobat professional. Thanks in Advance!

    • Here's how to Install Omnipage Pro X in Snow Leopard

      Many users have reported having trouble installing Omnipage Pro X in Snow Leopard (usually only those who have done a "clean install" of Snow Leopard, or try to install Onmipage Pro X on a brand new Snow Leopard system).  Those who have done an "upgr