How to figure out class of method parameter given a VariableElement?

Background:
I have a class that extends AbstractElementVisitor6<String, VisitorContext>
In visitExecutable() I do something like this...
try {
    // processingMethod is a member variable of the visitor
    processingMethod = true; 
    MyAnnotation foo = e.getAnnotation(MyAnnotation.class);
    if (foo != null) {
        List<? extends VariableElement> parameters = e.getParameters();
        for (Element enclosee : parameters) {
            enclosee.accept(this, context);
        // do other stuff
        return null;
    return null;
} finally {
    processingMethod = false;
}I then end up in visitVariable(VariableElement ve, P). Which is good.
However, I have been running in circles for at least a day now in the javadoc, trying to figure out how to get from a VariableElement to knowing what the class of the parameter is. I have figured out a way (correct or not) of knowing if it's a primitive type...
ve.asType() instanceof PrimitiveType But I'm stuck on figuring out what the class of the thing is. The closest thing I can see is if I can somehow turn the VariableElement into a TypeElement, I can use getQualifiedName(), but I'm haven't found that, and I'm not sure if that's the right answer either.
Here's the pseudocode of visitVariable...
public String visitVariable(VariableElement e, VisitorContext context) {
    if(processingMethod) {
        // if it's a primitive type - OK
        //  do the right thing
        // else
        //   figure out what the class of e is   HELP!
        //   do the right thing  
        return null;
}In summary...
How do I get the class of a method parameter from a VariableElement?
Thanks

When would this not be possible? Intersections types. See [JLS 3rd 4.9|http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.9] Specifically
"It is not possible to write an intersection type directly as part of a program; no syntax supports this."
Also, I'm curious about the string representation in the first place. I assume there's not direct handout of class objects because we're in the compiler and can't assume that a type is a valid "thing" yet? e.g. it may not have been compiled yetCorrect.
I was just thinking about how to represent the information, when it occurred to me that I probably ought to just reuse type mirrors and/or elements. Would you recommend this strategy? This is an interesting area of writing annotation processors. In order to apply any (what we call) extra-lingustic constraints and generate error messages when someone breaks the rules, you normally need the elements and types in order to make assertions about types being correct etc. I normally do this in the data collection phase, and don't collect any data for uses that are erroneous. I haven't tried doing the error checking after the collection phase.
When you are generating the source code, (after all the data is collected) all you need is CharSequences (normally Strings). In fact extracting those from elements and types at the point that is writing the source file can make the code more complex than it needs to be, so I prefer to just have everything in Strings at this point. It makes the code that is generating code a little easier to understand. I often build an inner class to hold all the strings (in fields or in collections as appropriate) which I have collected from each annotated element, so there is some structure there.
Are there any examples or other advice out there for doing this that you can point to?There are a few examples. Check out the [hickory project on java.net|https://hickory.dev.java.net/] You might find some useful tools there to assist writing your processor (such as prisms ) and [writing you unit tests|https://hickory.dev.java.net/nonav/apidocs/index.html?net/java/dev/hickory/testing/Compilation.html] . Hickory's unit tests include several examples of annotation processors, [this one|https://hickory.dev.java.net/source/browse/hickory/trunk/code/test/net/java/dev/hickory/incremental/ServiceProviderProcessor.java?rev=22&view=markup] illustrates the points I am making, and there are also some in code samples in the javadoc, for example [the same thing again |https://hickory.dev.java.net/nonav/apidocs/index.html?net/java/dev/hickory/incremental/StateSaver.html].
Bruce

Similar Messages

  • How do I access classes and methods defined in a wsdl file

    I have been provided a wsdl file I need to find out how do I access classes and methods defined in a wsdl file directly instead of doing a wsdl2java...

    Several comments :
    1- is there any reason to have blank chars inserted after the path ? Seems that you already have a problem there. If possible, try to solve the problem at the source
    2- the end of line char is usually CR (Carriage Return, aka ASCII char 13 = $0D = Control-D). But LF (Line Feed = 10 = $0A = control-A) is also used (platform dependent). In LV, you can use the "Concatenate strings" function to add/insert control chars (found in the String Control Palette). However, this will not solve your problem of unwanted added blank chars at the end of your string.
    3- you can use the Trim white space.vi (in the "Additionnal string functions" sub-palette) to remove ALL the spaces in your string
    4- you can build your own "end space remover" function. :
    reverse the string, wire to a "Match pattern" function, use " +" (space + "+") to search for any number of spaces, reverse again the "after substring".
    5- there is no point 5 :-)
    You may find interesting description of ASCII chars here
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to figure out the properties of field/object ??

    Hello
    I have field (say, its name is field_1) in my_form and  i am coloring yellow by using below code of initialization event:
    this.ui.oneOfChild.border.fill.color.value = "255,255,191"; (Actually, just for differentiating / tracing back purpose here  am assigning this yellow color to this field, you can suggest me any thing else that marks / tags this field (i can not populate a value, bcz its visible to user), so that in the  CHANGE event of this field, again i want to check/get/know that whether this field is tagged/marked or not)
    fine. But, because of some/below reason, i need to find out its color by using JavaScript, pls. let me know how to figure out its color is as yellow by using JavaScrit?
    Reason: If field_1's color is YELLOW (or you suggested any tag/mark as said in the above in red text), then i have to make HIDE the field_2
    Field_0's position is extreme left, Field_1's  position is middle and the Field_2's position is exterme right of the page.
    I guess, i hv only one option of finding out color, hence am looking forward for JavaScript to find out the color of a field in question
    (OR)
    Also, pls. let me know the JavaScript that How can i make HIDE a check box for that COMLETE session (i mean, starting from launching the form in the browser until he closes the window/browser/tab/form), i guess, this idea also workes for my requirement, ( i want to put this code in the docReady event) .....no matter/what ever code is existing there in any event of that field level
    Thank you

    Hi,
    If you want to give a visual indicator to the user, then colouring the field yellow is probably a good approach.
    However if you just want to keep track on the field, then you could test the field's value (.rawValue) and take appropriate action. In addition you can also attach a variable to an object using the <desc> element. It is a bit involved but you can find an example here: http://assure.ly/x1QObn.
    Hope that helps,
    Niall

  • How to figure out server has capacity to install OEM 10 Grid control

    How to figure out server has capacity to install OEM 10 Grid control
    Hi Experts
    I have HP_UX 11.11 server which has 1 instance on it with version 10.2.0.1.0.
    Now I would like to install Grid control with a separate instance for repository.
    I was told I would need 2 GB Ram for OMS and 2 GB Ram for instance.
    Now how do I figure out if my server has enough resources from Ram perspective
    Following is output from top and vmstat
    1. for top it says 3045556K free , now is this free memory virtual(real +swap) or real?
    2. as per top I only have free 3GB(3045556K) , so does that mean I can not have OMS & repository on
    this server ?
    3. In vmstat I see free memory as 762335
    in man it says free - Size of the free list
    what does this mean, how much is my free meemory ?
    4. For OMS I read - It is a J2EE application that is installed and deployed using Oracle
    Application Server
    Now when I look at top I see these processes
    0 ? 26521 oasadm 152 20 1517M 1141M run 3:49 2.53 2.52 java
    0 ? 3377 oasadm 152 20 1657M 1276M run 54:49 1.88 1.88 java
    Does oasadm user means Oracle application server ? If yes does it mean I will not
    need 2GB for OMS ?
    cov6817:plmbomdv $ vmstat 2 5
    procs memory page faults cpu
    r b w avm free re at pi po fr de sr in sy cs us sy id
    1 0 0 3348627 762335 69 11 0 0 0 0 0 1014 4916 671 12 1 87
    1 0 0 3348627 762284 17 0 0 0 0 0 0 1040 10514 886 1 0 99
    1 0 0 3330668 762284 10 0 0 0 0 0 0 1031 7820 872 0 0 100
    1 0 0 3330668 762284 9 0 0 0 0 0 0 1033 6173 873 0 0 100
    1 0 0 3330668 762284 5 0 0 0 0 0 0 1029 5468 891 1 0 98
    cov6817:plmbomdv $ top
    System: cov6817 Wed Jul 18 08:48:43 2007
    Load averages: 0.02, 0.04, 0.03
    267 processes: 215 sleeping, 51 running, 1 zombie
    Cpu states:
    CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
    0 0.03 0.0% 0.0% 0.2% 99.8% 0.0% 0.0% 0.0% 0.0%
    1 0.03 0.6% 0.0% 0.4% 99.0% 0.0% 0.0% 0.0% 0.0%
    2 0.02 0.6% 0.0% 0.2% 99.2% 0.0% 0.0% 0.0% 0.0%
    3 0.01 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
    avg 0.02 0.4% 0.0% 0.2% 99.4% 0.0% 0.0% 0.0% 0.0%
    Memory: 8733312K (7157492K) real, 15353696K (13382776K) virtual, 3045556K free Page# 1/10
    CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
    0 ? 26521 oasadm 152 20 1517M 1141M run 3:49 2.53 2.52 java
    0 ? 3377 oasadm 152 20 1657M 1276M run 54:49 1.88 1.88 java
    Thanks a lot
    New DBA

    how much is my free meemory ?Do you have kmeminfo command installed?
    4. For OMS I read - It is a J2EE application that is
    installed and deployed using Oracle Application Server
    s oasadm user means Oracle application server ? If
    yes does it mean I will not need 2GB for OMS ?Even if that java vm is an instance of Oracle AS (OC4J), the Grid Control installs a separate instance of AS. The choice to install OMS app to any existing AS home does not exist in any version I know.
    Find out what more is running on the box and how much resources (i.e. RAM) those apps are configured with.

  • How to figure out ORA_12203:TNS unable to connect to destination?

    OS: WSK
    I have installed oracle817 and form6i in different directory in a machine
    and defined two oracle home for them. I can access sqlplus through
    OEM of oracle817, but I can not do the same thing through form6i,
    the error showed me: ORA_12203:TNS unable to connect to destination.
    But after installation, I have copied tnsname.ora of oracle817(oracle_home/network/admin) to tnsname.ora of form6i
    (oracle_home_net80/admin). The same error slao showed me when I open
    From Builder, droped the menu FILE --> Connect: system/manager/oradb,
    TNS unable to connect to destination.
    How to figure out this promble? I think maybe listener configuration
    have some promble, but I am not sure how to do that?
    COuld some give me some ideas? Thanks

    Hi shay,
    I have not fixed my problem. I defined two homes respectively:
    Oracle817: Home_name: oraHome81
    Path: D:\oracle
    Form6i: home_name: orahome6i
    path: d:\Form6i
    But I'm wondering when I opened the ORACLE folder under
    HKEY_LOCAL_MACHINE, All_Homes just show one home name:
    oraHome81 or orahome6i, deponding on which I imported later.
    So I like to ask do I need make the export/import
    registery of ORACLE floder under HKEY_LOCAL_MACHINE
    when you install oralce and form6i together?
    By the way, let me attached the TNSNAMES.ora file which
    configured by Oracle during installation:
    # TNSNAMES.ORA Network Configuration File: D:\oracle817\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORADB =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = name3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = ORADB)
    INST1_HTTP =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = name3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = ORADB)
    (PRESENTATION = http://admin)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)

  • How to find out the description for the given field?

    Hi All,
    How to find out the description for the given field?
    I mean ETTYP  Desription is VTEXT. This we can find in TVEPT  Table. So, How canwe find this?
    Thanks in Advance
    Sri...

    Hi  Avi,
    If i want to disply the  fields like   AUART and 'Description of AUART',
    Suppose based on my query i will take AUART from T184 table. And the description of AUART is available in TVAKT table.
    my question is if i have given T184-AUART  and how do u find out AUART Description ?(How do u know which table is having Description of AUART)?
    Thanks in Advance
    Sri...

  • How to add push button in alv display with out class or method

    Hai,
    How to add push buttons in out put screen of ALV (tool bar) with out using classes or methods .I want to know using normal ALV .
    Thanks in advance .
    kiran

    You should post your question in the ABAP forum.
    ABAP Development

  • How to find out the public methods and public fields available

    Hi,
    I have a dll for which to use it, i need to know the methods and the fields available for public use. Is there anyway to find out that information using any tool. I dont have any literature about the dll. Only have that dll.
    Thanks in advance,
    -Madhuri.

    You can find an article about creating the methods on the Microsoft Developement Network call "How to Create 32-bit Import Libraries Without .OBJs or Source"
    However that is only part of the problem.
    Consider if you find that the dll has a function like this:
    InitApplication(char*, int, char, long);
    What do you put in for each of those parameters? The only way I know to do that it to use a debugger and step through the assembler code figuring it out as you go. Alternatively you buy or find a disassembler - C code would probably be easier to figure out.
    I would also seriously suggest finding some different lists/news groups than this one. The topic has nothing to do with java. So you are likely to get better help somewhere that is more specific - like one of the MS lists.

  • How to Figure out what checkboxes are selected upon a button click...

    If I have a panel with some JCheckBoxes and a JButton, how can I figure out what checkboxes are selected upon the button click? If I add an actionlistener to the button, inside actionPerformed, how would I know what checkboxes are selected? One caveat is that the name and number of these checkboxes are dymanically chaing based on a configuration file so I do not know what the names of these check boxes are.
    Any help/code sample would be appreciated.

    Here's one of several different ways to do it. It attaches an ItemListener to each checkBox. When the checkBox is clicked, it is either added or removed from a List of selected items. Clicking the button will show you the selected items.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class CheckBoxTest extends JFrame
      JCheckBox chkChoice1 = new JCheckBox("English");
      JCheckBox chkChoice2 = new JCheckBox("French");
      JCheckBox chkChoice3 = new JCheckBox("German");
      JCheckBox chkChoice4 = new JCheckBox("Italian");
      JTextArea txaDisplay = new JTextArea(5, 20);
      JButton btnShow = new JButton("Show Selected Items");
      ArrayList <JCheckBox>choices = new ArrayList<JCheckBox>();
      public CheckBoxTest()
        super("");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        chkChoice1.addItemListener(new CheckBoxListener(chkChoice1));
        chkChoice2.addItemListener(new CheckBoxListener(chkChoice2));
        chkChoice3.addItemListener(new CheckBoxListener(chkChoice3));
        chkChoice4.addItemListener(new CheckBoxListener(chkChoice4));
        btnShow.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent event)
            txaDisplay.setText("");
            for (JCheckBox jcb : choices)
              txaDisplay.append(jcb.getText() + "\n");
        JPanel buttonPanel = new JPanel(new FlowLayout());
        buttonPanel.add(chkChoice1);
        buttonPanel.add(chkChoice2);
        buttonPanel.add(chkChoice3);
        buttonPanel.add(chkChoice4);
        JScrollPane scroll = new JScrollPane(txaDisplay);
        scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        JPanel dataPanel = new JPanel();
        dataPanel.add(btnShow);
        dataPanel.add(scroll);
        Container c = getContentPane();
        c.setLayout(new BorderLayout());
        c.add(buttonPanel, BorderLayout.NORTH);
        c.add(dataPanel, BorderLayout.CENTER);
        pack();
      public static void main( String[] args )
        CheckBoxTest frame = new CheckBoxTest();
        frame.setVisible(true);
      class CheckBoxListener implements ItemListener
        JCheckBox checkBox;
        public CheckBoxListener(JCheckBox checkBox)
          this.checkBox = checkBox;
        public void itemStateChanged(ItemEvent event)
          if (checkBox.isSelected())
            choices.add(checkBox);
          else
            choices.remove(checkBox);
    }Or, you could just maintain all the checkboxes in a Collection ahead of time. When the Show button is selected, simple query isSelected() on each item.
    Again, there are several different ways.

  • How to figure out list of users registered to POOL?

    Hello ,
    We have a remote site and user registers to that remote site SBA/LYNC FE directly. Now i wanted to figure out if there is any way through which i can check how many users are registered to that remote FE ??
    Is there any command for the same?
    Thanks

    Hi,
    You can also run: Get-CsUser | Get-CsUserPoolInfo to receive user pool information.
    Best Regards,                               
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How to figure out which material documents should be deleted?

    Hi,
    I am creating a report that sums up material movement. But I meet a problem about reversal material documents.
    In my report, I collect all the documents and delete all the document with field SMBLN is not empty. Code is like below.
    MOVE it_mseg[] TO it_mseg2[].
      LOOP AT it_mseg WHERE smbln <> ''.
        LOOP AT it_mseg2 WHERE mblnr = it_mseg-smbln AND zeile = it_mseg-smblp.
          it_mseg-del = 'X'.
          MODIFY it_mseg.
          it_mseg2-del = 'X'.
          MODIFY it_mseg2.
        ENDLOOP.
      ENDLOOP.
      LOOP AT it_mseg2 WHERE del = 'X'.
        LOOP AT it_mseg WHERE mblnr = it_mseg2-mblnr AND zeile = it_mseg2-zeile.
          it_mseg-del = 'X'.
          MODIFY it_mseg.
        ENDLOOP.
      ENDLOOP.
      DELETE it_mseg WHERE del = 'X'.
    But sometimes users may cancel a material document, and later they may cancel the reversal document also.
    Then there are 3 documents. In my report, all these 3 documents will be deleted.
    Is there any method to only have the last document left and delete the others?
    Thank!
    Wesley

    Thanks Dzed, it seems the code works succesfully, and I also figure out another code like below, it also works~
      MOVE it_mseg[] TO it_mseg2[].
      LOOP AT it_mseg.
        LOOP AT it_mseg2 WHERE mblnr = it_mseg-mblnr AND zeile = it_mseg-zeile.
          IF it_mseg2-del = 'Y'. 
            it_mseg-del = 'X'.
            MODIFY it_mseg.
          ENDIF.
        ENDLOOP.
        IF it_mseg-del = 'X'.
          CONTINUE.
        ENDIF.
        LOOP AT it_mseg2 WHERE smbln = it_mseg-mblnr AND smblp = it_mseg-zeile.
          it_mseg-del = 'X'.
          MODIFY it_mseg.
          it_mseg2-del = 'Y'.  
          MODIFY it_mseg2.
        ENDLOOP.
      ENDLOOP.

  • How to pass an object as method parameter

    Hi Guys
    I was testing a simple program and was trying to pass an object to a method but it didnt seem to work and I couldnt find out WHY.
    I am posting the code so please let me know who can i make my method ADD_EMPLOYEE work so that when i pass an object of LCL_EMPLOYEE, it updates I_EMPLOYEE_LIST.
    *& Report:  ZOO_HR_SAMPLE_1
    *& Author:  Avinash Pandey
    *& Date:    25.03.2009
    *& Description: Concepts of OO in ABAP
    REPORT  zoo_hr_sample_1.
    *&       Class LCL_EMPLOYEE
           Local class
    CLASS lcl_employee DEFINITION.
    Public section
      PUBLIC SECTION.
    Data type
        TYPES:
          BEGIN OF t_employee,
            no  TYPE i,
            name TYPE string,
            wage TYPE i,
         END OF t_employee.
    Method
        METHODS:
          constructor
            IMPORTING im_employee_no TYPE i
                      im_employee_name TYPE string
                      im_wage TYPE i,
            add_employee
             IMPORTING im_employee TYPE REF TO lcl_employee,
           display_employee_list,
           display_employee,
           get_no EXPORTING ex_no TYPE i,
           get_name EXPORTING ex_name TYPE string,
           get_wage EXPORTING ex_wage TYPE i.
      Class methods are global for all instances
        CLASS-METHODS: display_no_of_employees.
    Protected section
      PROTECTED SECTION.
      Class data are global for all instances
        CLASS-DATA: g_no_of_employees TYPE i.
        CLASS-DATA: i_employee_list TYPE TABLE OF t_employee.
    Private section
      PRIVATE SECTION.
       CLASS-DATA: i_employee_list TYPE TABLE OF t_employee.
        DATA: g_employee TYPE t_employee.
    ENDCLASS.               "LCL_EMPLOYEE
    *&       Class (Implementation)  LCL_EMPLOYEE
           Text
    CLASS lcl_employee IMPLEMENTATION.
    Class constructor method
      METHOD constructor.
        g_employee-no = im_employee_no.
        g_employee-name = im_employee_name.
        g_employee-wage = im_wage.
        g_no_of_employees = g_no_of_employees + 1.
      ENDMETHOD.                    "constructor
    Method
      METHOD display_employee.
        WRITE:/ 'Employee', g_employee-no, g_employee-name.
      ENDMETHOD.                    "display_employee
    Method
      METHOD get_no.
        ex_no = g_employee-no.
      ENDMETHOD.                    "get_no
    Method
      METHOD get_name.
        ex_name = g_employee-name.
        WRITE: / 'Name is:' , ex_name.
      ENDMETHOD.                    "get_no
    Method
      METHOD get_wage.
        ex_wage = g_employee-wage.
      ENDMETHOD.                    "get_no
    Method
      METHOD add_employee.
      Adds a new employee to the list of employees
        DATA: l_employee TYPE t_employee.
        l_employee-no = im_employee->get_no.
        l_employee-name = im_employee->get_name.
        l_employee-wage = im_employee->get_wage.
        APPEND l_employee TO i_employee_list.
      ENDMETHOD.                    "add_employee
    Method
      METHOD display_employee_list.
      Displays all employees and there wage
        DATA: l_employee TYPE t_employee.
        WRITE: / 'List of Employees'.
        LOOP AT i_employee_list INTO l_employee.
          WRITE: / l_employee-no, l_employee-name, l_employee-wage.
        ENDLOOP.
      ENDMETHOD.                    "display_employee_list
    Class method
      METHOD display_no_of_employees.
        WRITE: / 'Number of employees is:', g_no_of_employees.
      ENDMETHOD.                    "display_no_of_employees
    ENDCLASS.               "LCL_EMPLOYEE
    REPORT
    DATA: g_employee1 TYPE REF TO lcl_employee,
          g_employee2 TYPE REF TO lcl_employee.
    START-OF-SELECTION.
    Create class instances
      CREATE OBJECT g_employee1
        EXPORTING
          im_employee_no   = 1
          im_employee_name = 'John Jones'
          im_wage          = 20000.
      CREATE OBJECT g_employee2
        EXPORTING
          im_employee_no   = 2
          im_employee_name = 'Sally Summer'
          im_wage          = 28000.
    Call methods
      CALL METHOD g_employee1->display_employee.
      CALL METHOD g_employee1->add_employee
        EXPORTING
          im_employee = g_employee1.
      CALL METHOD g_employee1->get_name.
      CALL METHOD g_employee2->display_employee.
      CALL METHOD g_employee2->display_no_of_employees.
    The error I am getting is:
    Field GET_NO/GET_NAME/GET_WAGE is unknown.
    Please help me out on this.
    Thanks a lot you people

    hi.
    The following parts of your program were changed.
    The result is OK?.
    *(1)change
    CLASS lcl_employee DEFINITION.
    Public section
    PUBLIC SECTION.
    display_employee,
    *get_no EXPORTING ex_no TYPE i,
    *get_name EXPORTING ex_name TYPE string,
    *get_wage EXPORTING ex_wage TYPE i.
    get_no returning value(ex_no) TYPE i,
    get_name returning value(ex_name) TYPE string,
    get_wage returning value(ex_wage) TYPE i.
    *(2)change
    CLASS lcl_employee IMPLEMENTATION.
    Method
    METHOD add_employee.
    Adds a new employee to the list of employees
    DATA: l_employee TYPE t_employee.
    *l_employee-no = im_employee->get_no.
    *l_employee-name = im_employee->get_name.
    *l_employee-wage = im_employee->get_wage.
    l_employee-no   = im_employee->get_no( ).
    l_employee-name = im_employee->get_name( ).
    l_employee-wage = im_employee->get_wage( ).
    APPEND l_employee TO i_employee_list.
    ENDMETHOD. "add_employee
    Result List
    Employee          1  John Jones
    Name is: John Jones
    Name is: John Jones
    Employee          2  Sally Summer
    Number of employees is:          2

  • How to figure out suitable Enhancement Option/point

    Hi All,
    I have to limit creation of vendor for a particularly one user based on Country Code.
    For ex
    if sy-uname eq 'XYZ'.
    IF LFA1-NAME1 NE 'US'.
    ERROR MESSAGE...
    ENDIF.
    ENDIF.
    I know how to do that user user exits and was trying to figure out how can i achieve this using enhancement frame work in ECC 6.0
    I found all below Explicit Enhancement Points/Sections when i searched in Pragram SAPMF02K (xk01)
    If you just post the relevant coe, it has a better chance of formatting.
    MY QUESTIONS ARE
    1) How should i figure out which enhancement point i should use for particular issue (When the user is going from Vendor Address to Vendor control Screen while creating the vendor. It should an error mess if the user is using wrong vendor code?
    Thanks in advance
    Venki
    Edited by: venki gundla on May 31, 2009 10:05 PM
    Edited by: venki gundla on May 31, 2009 10:16 PM
    Edited by: Rob Burbank on May 31, 2009 6:37 PM

    Hi All,
    For some reason ,every thing is continous. I know it sometimes irritating but i couldn't find a way to post it
    Line by line.
    Actually
    MY QUESTIONS ARE 1) How should i figure out which enhancement point i should use for particular issue (When the user is going from Vendor Address to Vendor control Screen while creating the vendor. It should throw an error mess if the user is using wrong vendor country name than he is authorized to?
    Thanks
    Venki

  • Tagging loops,how to figure out the key they're in ?

    I have a few loops that are not tagged and I want to use them but must figure out what key they are in,is there an app or program that will tell you the key and or bpm ?

    You can use Soundtrack loop utility to sample a small portion (like a measure or so) and determine the BMP, as for the key, my method would be to figure it out myself on my guitar or a keyboard.

  • OSB: how to figure out the execution time of OSB proxy

    Trying to figure out how to determine the execution time taken for any given OSB proxy. Seems like the OSB built-in alerting facilities can display the average response time of all calls to a proxy but not individually. Is there a way to dig this out from the monitoring data being collected?

    Service monitoring which comes OOTB is supposed to be aggregated because in usual scenarios you dont need to see the processing time of a specific request. From a performance monitoring perspective the useful data usually is average processing time and minimum or maximum processing time for any request within the aggregation interval which is provided by OSB OOTB.
    Now, in some cases the business might want to track each request individually. So, for example they can track how long did it take to process a specific order. OSB does not provide this feature OOTB. There are multiple ways to get this implemented. Two of the most common ways are:
    1. Add a start and end time capturing in Proxy Services. You can use logging/reporting/publish to a DB etc to achieve this. But this is indeed intrusive and you will need to do this for every Proxy which needs to be monitored at every instance level. This is also a slight overhead in processing in itself.
    2. Use monitoring products which can monitor the WS invocations externally. This will mean more investment but definitely a much better solution. You can consider using different products from Oracle and other vendors based on your requirements, features of products and costs. A few examples are OWSM, Oracle EM, CA Wily etc.

Maybe you are looking for