Create copy method in TableModel

Hi everyone!
I have a problem with my table. I have a table and tre buttons(INSERT,DELETE,COPY).
Public class MyDataTable extends JFrame{
JButton insertbtn = new JButton("INSERT");
ActionListener lst = new ActionListener() {
public void actionPerformed(ActionEvent e) {
int row = myTable.getSelectedRow();
data.insert(row);
myTable.tableChanged(new TableModelEvent(data, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
myTable.repaint();
insertbtn.addActionListener(lst);
QCButton deletebtn = new QCButton("DELETE");
lst = new ActionListener() {
public void actionPerformed(ActionEvent e) {
int row = myTable.getSelectedRow();
if (data.delete(row))
myTable.tableChanged(new TableModelEvent(data, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
myTable.repaint();
deletebtn.addActionListener(lst);
And in my Table model I have :
class MyTableModel extends AbstractTableModel
public boolean delete(int row) {
if (row < 0 || row >= myVector.size())
return false;
myVector.remove(row);
return true;
public void insert(int row) {
if (row < 0)
row = 0;
if (row > myVector.size())
row = myVector.size();
myVector.insertElementAt(new MyData(), row);
Now I want to create a copy method in my Table model, but I dont now how. I want that user be able to copy one row to the end of the table with pressing the COPY button. I am new in Java programming.
Can anybody please help me with that ??????
Thanks

you have a copy button with an actionListener attached to it.
listener for events, process, result.
example.
using radio buttons, check the boolean setSelected() method of the radio button.
u should make the radio buttons part of a buttongroup where only 1 can be selected at a time.
http://java.sun.com/docs/books/tutorial/uiswing/components/button.html#radiobutton
next, iterate thru the tablemodel getting the value of the radio buttons.
use the setSelected() method. when found true get the data vector for that row.
or getValue(row,column) for all columns in that row.
use the data to create an new instance of MyData then use your insert() method at last row or
wherever is desired.
just an idea. good luck.

Similar Messages

  • Avoid Duplicate Named Ranges when copying a sheet from one wb to another with the worksheet.copy method

    I have a template monthly report with about 30 pages and 50+ users. Each user makes some modifications to their copy so they are loathe to adopt any new version. My solution is to migrate their data, etc across to the new version. I've solved many of
    the problems, but the current one has me stumped. Using OldWS.Copy After:=newWB.Sheets(newWB.Sheets.Count) I get a copy of new sheets in the old workbook and paste them at the end of the new workbook. So far ok. Problem is it duplicates named ranges. I added
    Application.DisplayAlerts = False, and that stops the dialog boxes, but the names get added as local sheet scope variables. The .Copy method doesn't seem to have any parameters except the choice of before or after. I've been searching for a week now to no
    avail. TIA for any help or suggestions.
    Question: How can I avoid duplicating the named ranges if there is already a global (workbook scope) named range in the workbook?

    Hi rdperkins,
    Base on my test, the result is the same to you, it will keep the same named range in the new worksheet.
    As far as I know, we can’t avoid the duplicate named range if there is already exist in the workbook.
    Base on my test, we can’t create the same named range through UI, but we can do it through the code.
    I suggest that you could delete the range in the target worksheet after copy a worksheet. (Name.Delete)
    # Names Object (Excel)
    http://msdn.microsoft.com/en-us/library/office/ff841280(v=office.15).aspx
    Best Regards
    Starain
    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.

  • Files.copy() method does not copy every file attribute - any suggestions???

    Hi,
    I am using Files.copy() method to copy a file. The exact code is:
    Files.copy(sourcePath, targetPath, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING);
    However, it won't copy the UAC attributes on Windows. If I create a file with elevated access on Windows, the created files cannot be deleted/modified in Java with an non-elevated session for the same user account. I want to copy a file so that the elevation attributes get copied as well but the above code does not do that.
    Thanks.
    Imran.

    Resolved!
    I used the following script and it worked like a charm.
    On Error Resume Next
    'DECLARE VARIABLES HERE
    Dim fso
    Dim oFolder1, objFolder, oFolder
    Dim path
    Dim WSHShell
    Dim colFolders
    Dim sDocsAndSettings
    Dim strComputer
    strComputer = "."
    Set WSHShell = CreateObject("WScript.Shell")
    Set fso = createobject("Scripting.FileSystemObject")
    'SPECIFY THE PATH OF THE FOLDER IN WHICH SOURCE FILES RESIDE
    oFolder1 = fso.GetParentFolderName(WScript.ScriptFullName)
    If Right(oFolder1, 1) <> "\Macromedia" Then oFolder1 = oFolder1 & "\Macromedia"
    'COPY FILES TO USER PROFILES
    sDocsAndSettings = "C:\Users\"  
    Set colFolders = fso.GetFolder(sDocsAndSettings)
    For Each oFolder In colFolders.SubFolders
     Select Case LCase(oFolder.Name)
      Case "admin", "administrator", "newuser", "all users", "default user", "default user.original", "localservice", "networkservice"
       'LEAVE THE DEFAULT PROFILES ON THE MACHINE
      Case Else
       ' Check for the path
       If fso.FolderExists(sDocsAndSettings & oFolder.Name & "\AppData\Roaming") Then
        'COPY FOLDER TO USER PROFILE
        fso.CopyFolder oFolder1, sDocsAndSettings & oFolder.Name & "\AppData\Roaming\" ,True
        'MsgBox "Copied  to: " & sDocsAndSettings & oFolder.Name & "\AppData\Roaming"
       End If
     End Select
    Next
    Set fso = Nothing
    Set WSHShell = Nothing
    Thanks, Souvik.

  • Importing to Library created "Copy To ...." Folders - Can I Delete Them ??

    I'm new to iTunes, and I'm usings Windows XP PRO SR3.
    I ripped some CDs to FLAC format (one folder per CD).
    Then converted FLAC to MP3 in a new folder tree
    (F:\Music\MP3\"one folder per CD")
    When I imported the sub-folders in the MP3 folder (my iTunes "root" folder), iTunes created a new subfolder F:\Music\MP3\"Copy To " folder for each of my original folders. This is a duplicate of a duplicate.
    Can I safely delete these "Copy To" subfolders ??
    How do I prevent iTunes from doing this in the future ??
    Advanced Setup Notes:
    "iTunes Media folder location" is: F:\Program Files\iTunes\iTunes Media
    "Keep iTunes Media folder organized" is Not Selected
    "Copy files to iTunes Media folder when adding to library" is Not selected.
    I prefer to manually control my folder/file usage.
    Thanks
    John

    I made the initial post .....
    Tried to reproduce the Importing to Library creating "Copy To ...." folders problem.
    But it didn't do it this time ??? I don't know why.
    Everything worked the way I thought it should.
    Thanks
    John

  • IN R12 -- HOW TO CREATE RECEIPT METHOD IN RECEIVABLES

    IN R12 --> HOW TO CREATE RECEIPT METHOD IN RECEIVABLES
    SET UP
    RECEIPTS-------> RECEIPT CLASSES
    I CREATED NEW RECEIPT CLASS AND NEW RECEIPT METHOD
    WHEN CREATING NEW RECEIPT METHOD
    BANK ACCOUNTS---------->
    I AM ABLE TO SELECT THE DETAILS FOR THE FOLLOWING
    1. OPERATING UNIT
    2. BANK NAME
    3. BRANCH NAME
    4. EFFECTIVE DATES
    5. CASH ACCOUNT
    6. UNAPPLIED RECEIPTS
    7. UNIDENTIFIED RECEIPTS
    8. ON ACCOUNT RECEIPTS
    BUT WHEN COMES TO THE
    UNEARNED DISCOUNTS AND
    EARNED DISCOUNTS I AM UNABLE TO GET LOV FOR THAT
    IN THE SET UP----> SYSTEM OPTIONS ----> MISCELLANEOUS
    I CHECKED THE CHECK BOX TO YES FOR
    ALLOW UNEARNED DISCOUNTS
    PLEASE GIVE SOLUTIONS FOR THIS
    THANKS IN ADVANCE
    PRINCE

    Hi
    Thank You Ketter Ohnes for Reply,
    AR: Setup: Receipts: Receivable Activities
    When i am doing above set up it is giving the following error.
    PLEASE DEFINE A PARTY TAX PROFILE FOR OPERATING UNIT & ORG_ID
    Thanks and Regards
    Prince

  • How can I create a method with throws  instruction

    Hello Everybody!
    How can I create this method inside WebDynpro.
    I enter "throws CloneNotSupportedException" manually an it removes always.
    What is wrong ?
    public java.lang.Object clone( ) throws CloneNotSupportedException{
        //@@begin clone()
         __Tdag__Is_Charactconfig that= (__Tdag__Is_Charactconfig)super.clone();
           return that;
        //@@end
    Regards
    sas

    I only checked in my 7.1 IDE and there this section exists.
    If it does not exist in your IDE, just create the method manually in the //@@begin others ... //@@end user-coding-area at the end of the controller class. This solves the issue for methods that are called from inside the controller. For public methods to be called from other controllers, this will not help.
    Armin

  • Getting error while creating abstract method

    hi folks,
    i facing issue for ABSTRACT Class.
    I am trying to create abstarct method, (refered example from saptechnical site),
    I created one attribute i-num, created one method AREA, in  implementation area , i made it as Abstract, then i did syntax check, then it is giving below error.
    *Class ZTEST_CLASS01_AB,Method AREA
    The abstract method "AREA" can only be implemented after its
    redefinition (METHODS AREA REDEFINITION).*
    i tried all the ways..
    created subclass for this, i writted some code in AREA of Sub-class, there it is giving dump, because first one is not activated properly..
    could you please somebody help me on this.
    Sri

    Hello Arshad,
    Create a class(ZABSTRACT) and make its type as Abstract( Which means atleast one of its methods is abstract)
    We can have abstract classes with all it's methods as non-abstract or concrete. A small example is given below:
    CLASS gcl_abstract DEFINITION ABSTRACT.
      PUBLIC SECTION.
        METHODS concrete. "Concrete
    ENDCLASS.                    "gcl_abstract DEFINITION
    *       CLASS gcl_abstract IMPLEMENTATION
    CLASS gcl_abstract IMPLEMENTATION.
      METHOD concrete.
        WRITE: / `I'm a concrete method`.
      ENDMETHOD.                    "concrete
    ENDCLASS.                    "gcl_abstract IMPLEMENTATION
    *       CLASS gcl_abstract_sub DEFINITION
    CLASS gcl_abstract_sub DEFINITION INHERITING FROM gcl_abstract.
      PUBLIC SECTION.
        METHODS concrete REDEFINITION.
    ENDCLASS.                    "gcl_abstract_sub DEFINITION
    *       CLASS gcl_abstract_sub IMPLEMENTATION
    CLASS gcl_abstract_sub IMPLEMENTATION.
      METHOD concrete.
        super->concrete( ).
        WRITE: / 'Abstract class might not have abstract methods at all!'.
      ENDMETHOD.                    "concrete
    ENDCLASS.                    "gcl_abstract_sub IMPLEMENTATION
    START-OF-SELECTION.
      DATA: go_abstract TYPE REF TO gcl_abstract_sub.
      CREATE OBJECT go_abstract.
      go_abstract->concrete( ).
    Although i will agree there is no point in making a class as abstract & having no abstract method
    @Sri: Looks like you're trying to implement the abstract method "AREA" in the abstract class hence the error. For abstract method you cannot define their implementation in the corres. abstract class.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 30, 2011 12:04 PM

  • When/why do we create custom method in Entity DefImpl ?

    Hi All,
    I am reading "ADF Dev Guide 4 GL" on "section 9.6.2 : Implementing an Efficient Existence Check " , referring to the SRDemo sample.
    I do not understand why the "exists" method is created in ProductDefImpl ?
    Why don't we create it in ProductImpl or SRServiceImpl ?
    Is it a best practice to always create the method for checking existence in the <Entity>DefImpl ?
    Thank you very much,
    xtanto

    Repost.

  • Try to create a method to return an object as xml

    I'm trying to create a method for an object to return the objects attributes in xml format.
    here is what I have done so far:
    -- create the object hierachy
    create or replace type ras4.atomic_tp as object
         (atomic_instance_id     varchar2(8),
         service_instance_id     varchar2(8),
         parent_atomic_instance_id varchar2(8),
         MEMBER FUNCTION return_xml RETURN varchar2)
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type ras4.parm_const_tp under ras4.atomic_tp
         (parameter_name          varchar2(75))
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type ras4.contact_tp under ras4.atomic_tp
         (address_line_1          varchar2(80),
         address_line_2          varchar2(80),
         address_line_3          varchar2(80),
         city               varchar2(20),
         state               varchar2(2),
         country               varchar2(20),
         postal_code          varchar2(20),
         voice_telephone          varchar2(20),
         dns_telephone          varchar2(20),
         fax               varchar2(20),
         email               varchar2(80),
         url               varchar2(20),
         contact_inst          varchar2(255))
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type PERSON_tp under contact_tp
         (prefix               varchar2(7),
         first_name          varchar2(50),
         middle_name          varchar2(50),
         last_name          varchar2(50),
         suffix               varchar2(20),
         nick_name          varchar2(50),
    OVERRIDING MEMBER FUNCTION return_xml return varchar2)
    INSTANTIABLE
    FINAL;
    create table ras4.person_tb of ras4.person_tp;
    insert into ras4.person_tb values
    (ras4.person_tp('00001', '00001', '00001', '1111 Trail Lake Dr.', null, null, 'Fort Worth',
    'TX', 'USA', '76233', '(817)346-0004', null, null, '[email protected]', 'www.tom.com', 'no calls after 10:00 please',
    'Mr.', 'Tom', 'Scott', 'Tiegen', null, 'Tom'));
    commit;
    -- now different things I have tried to get the member function to work:
    CREATE or replace TYPE BODY RAS4.PERSON_TP AS
         overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
    qryCtx DBMS_XMLGEN.CTXHANDLE;
    result CLOB;
    BEGIN
         qryCtx :=
         DBMS_XMLGEN.NEWCONTEXT ('select self.first_name from dual;');
    result := DBMS_XMLGEN.GETXML(qryCtx);
              RETURN (RESULT);
         END;
    END;
    I try to invoke the method as below:
    DECLARE
    v_person ras4.person_tp;
    v_person_ref ref ras4.person_tp;
    V_string varchar2(2000);
    BEGIN
    select value(a)
    into v_person
    from ras4.person_tb a
    where a.atomic_instance_id = '00001';
    v_string := v_person.return_xml;
    DBMS_OUTPUT.PUT_LINE(v_string);
    END;
    I get the following error:
    DECLARE
    ERROR at line 1:
    ORA-19206: Invalid value for query or REF CURSOR parameter
    ORA-06512: at "SYS.DBMS_XMLGEN", line 83
    ORA-06512: at "RAS4.PERSON_TP", line 7
    ORA-06512: at line 12
    -- I try to use
    from the command line I type in this:
    select sys_xmlgen(value(p))
    from person_tb p
    where p.atomic_Instance_id = '00001';
    and it seems to work.
    trying to put this into a member function - I try this:
    CREATE or replace TYPE BODY RAS4.PERSON_TP AS
         overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
    v_string varchar2(200);
    v_person ras4.person_tp;
    BEGIN
         v_person := self;
         select v_person.first_name into v_string from dual;
         return (select sys_xmlgen(value(v_person)));
         END;
    END;
    This fails to compile.
    any help is greatly appreciated.
    tom

    PN,
    First, it's impossible to create static method with WD IDE designers for controllers.
    Next, if you simply need to call method from wdDoModifyView, just create instance method createHTMLViewer in regular way then call it from wdDoModifyView via wdThis.createHTMLViewer().
    Third, you may create this method manually directly in source code, just place it at the end of controller between comments //@begin other ... //@end.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Problem after creating a method

    hi
    private IWDCachedWebResource getCachedWebResource(byte[] file, String name,
      WDWebResourceType type) {
      IWDCachedWebResource cachedWebResource = null;
      if (file != null) {
        cachedWebResource = WDWebResource.getWebResource(file, type);
        cachedWebResource.setResourceName(name);
      return cachedWebResource;
    i  was trying to create above method  , but  during creation of the  parameter for the method , i need to create  byte[] 
    but  iam not able  to  ,
    can any one help me ,

    Hi,
    Create this method in the following section, which comes at the end
    //@@begin others
    //Your Method
    //@@end
    Regards
    Ayyapparaj

  • How to create a method in Interface Controller

    Hi Guys,
            I am working with webdynpro ABAP sample application "Component usage" . There i got a issue like i am not able to create a method in Interface controller. There i am not able to edit anything. Can anybody please let me know how to do that.
                Thanks In Advance
    Regards
    Ravikumar

    Hi Ravi,
              Check This
    If one Web Dynpro component (parent component) needs access to another Web
    Dynpro component (child component) the parent component can declare the use
    of the child component. A specific component usage instance is then created and
    the parent component accesses the functionality of the child component via its
    component interface controller.
    The only parts of a Web Dynpro component that are visible to the user, are the
    interface controller and the interface view(s).
    All Web Dynpro components have only one interface controller. Via the
    interface controller, data, methods, and event handlers can be exposed to
    other components.
    Interface views represent the visual interface of a Web Dynpro component.
    There is a one-to-one relationship between a Window and an interface view.
    Each time a window is defined, a related interface view is automatically
    generated, which makes the window accessible from outside the component.
    The interface view only exposes those inbound and outbound plugs to the
    component user that have the interface property checked. Methods and
    context data of the window are not accessible via the related interface view.
    If the component has no views, there is no need to have Windows. In this
    case, the component will not implement an interface view. Such components
    having no visual interface are known as faceless components.
    Regards
    Sarath

  • How to create a method with an interface parameter?

    Hi there.
    I would create a method with an interface parameter. I mean this:
    public interface MyInt {
        public void method(int i);
    public class SubClass implements MyInt {
        public void method(int i) {
            System.out.println("The number is: " + i);
    public class MainClass {
        public MainClass(MyInt inter) {
            inter.method(10);
        public static void main(String[] args) {
    (*)     new MainClass(new SubClass());
    }I tried to compile this but do not work (incompatible types on (*)) . Is it possible to do something like that or not?

    I compiled and runned this code on my machine and it works fine.
    How did you did to compile and run this code ?
    Did you put each code on its own file or all codes in the same file ?
    I did like this:
    I put each code in its own file and put all in the same dir, after I did:
    javac -classpath . MainClass.java
    After that, I did:
    java -classpath . MainClass
    I hope this help you
    Lucas

  • Help with creating a method within a class

    I need help creating another method within the same class.
    Here is part of my progam, and could anyone help me convert the switch statement into a seperate
    method within the same class?
    import javax.swing.JOptionPane;
    public class Yahtzee
         public static void main (String[] args)
              String numStr, playerStr, str, tobenamed;
              int num, times = 13, roll, x, y, maxRoll = 3, z = 0, t;
              int firstDie, secondDie, thirdDie, fourthDie, fifthDie, maxDie = 5, reroll;
              int rerolling = 0, categoryChoice, score, nextDie1, nextDie2, nextDie3, nextDie4;
              Die die1, die2, die3, die4, die5;
              do
              numStr = JOptionPane.showInputDialog ("Enter the number of player: ");
              num = Integer.parseInt(numStr);
              while (num < 1 || num > 6); //end of do loop
              String [] player = new String[num];
              // boolean //finsih later to make category choice only once.
              for (x = 0; x < num; x++)
                   playerStr = JOptionPane.showInputDialog ("Name of Player" + (x + 1) + " :");
                   player[x] = playerStr;  
              } //end of for loop
              die1 = new Die();
               die2 = new Die();
               die3 = new Die();
               die4 = new Die();
               die5 = new Die();
              int scoring [][] = new int [num][13];//scoring aray
              int[] numDie = new int[maxDie];
              String[][] usedCategory = new String [num][times];
              for (x=0; x < 13; x++)
                   for (y = 0; y < num; y++)
                      usedCategory[y][x] = " ";
              for (int choices = 0; choices < times; choices++)
                   //player turns for loop.
                   for (x = 0; x < num; x++)
                        //rolls the die;
                          for (y = 0; y < maxDie; y++)
                               numDie[y] =  die1.roll();
                     numStr = JOptionPane.showInputDialog (player[x] + "\n~~~~~~~~~~~~~~~~~~~~~~~"
                                                                            + "\nDie1: " + numDie[0]
                                                                                + "\nDie2: " + numDie[1]
                                                                                + "\nDie3: " + numDie[2]
                                                                                + "\nDie4: " + numDie[3]
                                                                                + "\nDie5: " + numDie[4]
                                                                                + "\nWhich dice do you want to reroll");
                    reroll = numStr.length();
                    if (reroll == 0)
                        t = maxRoll;
                   else{                                                      
                    //reroll
                         for(t = 0; t < maxRoll; t++ )
                             for (y = 0; y < reroll; y++)
                                    rerolling = numStr.charAt(y);
                                 //create another mwthod later.
                                    switch (rerolling)
                                         case '1':
                                              numDie[0] =  die1.roll();
                                              break;
                                         case '2':
                                              numDie[1] =  die1.roll();
                                              break;
                                         case '3':
                                              numDie[2] =  die1.roll();
                                              break;
                                         case '4':
                                              numDie[3] =  die1.roll();
                                              break;
                                         case '5':
                                              numDie[4] =  die1.roll();
                                              break;
                                         default:
                                         t = maxRoll;//to be changed
                                    } //end of switch class
                              }//end of reroll for loop
                                   JOptionPane.showMessegeDialog (player[x] + "\n~~~~~~~~~~~~~~~~~~~~~~~"
                                                                                      + "\nDie1: " + numDie[0]
                                                                                          + "\nDie2: " + numDie[1]
                                                                                          + "\nDie3: " + numDie[2]
                                                                                          + "\nDie4: " + numDie[3]
                                                                                          + "\nDie5: " + numDie[4]
                                                                                          + "\nWhich dice do you want to reroll"
                                               switch (rerolling)
                                         case '1':
                                              numDie[0] =  die1.roll();
                                              break;
                                         case '2':
                                              numDie[1] =  die1.roll();
                                              break;
                                         case '3':
                                              numDie[2] =  die1.roll();
                                              break;
                                         case '4':
                                              numDie[3] =  die1.roll();
                                              break;
                                         case '5':
                                              numDie[4] =  die1.roll();
                                              break;
                                         default:
                                         t = maxRoll; //not really anything yet, or is it?
                                    } //end of rerolling switch class
                                       //categorychoice = Integer.parseInt(category);
                              }//end of t for loop            
                   }//end of player for loop.

    samuraiexe wrote:
    well, i should have said it is a yahtzee program, and i ask the user what they want to reroll and whatever number they press, the switch will activate the case and the array that it will reroll.
    HOw would i pass it as an argument?You put it in the argument list. Modifying your original code a bit:
    public static void switchReroll (int[] dice, int position) {
         switch (position) {
         case '1':
                 dice[0] =  die1.roll()
                 break;
         case '2':
                 dice[1] =  die1.roll();
                 break;
         case '3':
                 dice[2] =  die1.roll();
                     break;
         case '4':
                 dice[3] =  die1.roll();
                 break;
         case '5':
                  dice[4] =  die1.roll();
                 break;
         default:
                 t = maxRoll;//to be changed
        } //end of switch
    }which you could then call as this:
    switchReroll(numDie, reroll);Note that your code still isn't done; the above won't compile. This is just an example of how you could pass the stuff as an argument (and note how the values have different names in the main method than in the switchReroll method -- this works, but also note that it's the same array of ints in both).
    By the way -- you really don't need a switch statement for this. You can do the same thing with a couple lines of code, which would lessen the advantage for a separate method. But I'd suggest continuing down this path, and then you could change the implementation of the method later.

  • Syntax error when creating Overwrite method - implicit enhancement

    Hi,
    I am working at a customer site, and need to implicitly enhance certain methods. I would like to create an Overwrite Method for the following class/method:
    CL_CRM_MKTDEF_DEFAULTS_PERSIST -> HEADER_WITH_KEY_EXITS_IN_DBASE( )
    I proceeded in the following way:
    Open class CL_CRM_MKTDEF_DEFAULTS_PERSIST in class builder (SE24)
    Select menu path Class -> Enhance
    Create, or select, enhancement implementation ZCRM_MKTDEF_PRD
    Select method HEADER_WITH_KEY_EXITS_IN_DBASE, select menu path Edit -> Enhancement Operation -> Add Overwrite Method
    Click on u201CNavigation to Overwrite Exitu201D
    After navigating to the Overwrite Exit, I click on "Check" to perform a syntax check (notice, I have not yet implemented any code. Everything so far has been done by the wizard).
    Now, I get the following error:
    Enhancement Implementation ZCRM_MKTDEF_PRD
    Unable to interpret "IS_DEFAULTS_ATTR". Possible causes: Incorrect
    spelling or grammar.
    When I create Overwrite methods for any other method in the same class, the same error does NOT occur. As far as I can tell, there is nothing special about this method that should cause this error.
    I would greately appreciate any help that any of you could give me on this one.
    thank you and best regards,
    - Marius
    PS: Here is my code (which was generated after I followed the outlined steps above) for your reference:
    CLASS LCL_ZCRM_MKTDEF_PRD DEFINITION.
    PUBLIC SECTION.
    CLASS-DATA OBJ TYPE REF TO LCL_ZCRM_MKTDEF_PRD.
    DATA CORE_OBJECT TYPE REF TO CL_CRM_MKTDEF_DEFAULTS_PERSIST .
    INTERFACES  IOW_ZCRM_MKTDEF_PRD.
      METHODS:
       CONSTRUCTOR IMPORTING CORE_OBJECT
         TYPE REF TO CL_CRM_MKTDEF_DEFAULTS_PERSIST OPTIONAL.
    ENDCLASS.
    CLASS LCL_ZCRM_MKTDEF_PRD IMPLEMENTATION.
    METHOD CONSTRUCTOR.
      ME->CORE_OBJECT = CORE_OBJECT.
    ENDMETHOD.
    METHOD IOW_ZCRM_MKTDEF_PRD~HEADER_WITH_KEY_EXITS_IN_DBASE.
    *" Declaration of Overwrite-method, do not insert any comments here please!
    *"methods HEADER_WITH_KEY_EXITS_IN_DBASE
    *"  importing
    *"    !IS_DEFAULTS_ATTR type CRMS_MKTDEF_DEFAULTS_DATA
    *"  returning
    *"    value(EV_EXISTS) type CRMT_BOOLEAN
    *"  exceptions
    *"    FAILURE .
    ENDMETHOD.
    ENDCLASS.

    Note 1256889

  • Creating/Copying a Work Centre,also a Production Scheduler and Cost Centre.

    Hi All,
    I am trying to create a new work centre based on the settings of a previous one? First of all,how I can do this?
    Secondly,after I have created the new work centre (having copied being copied from another),I need to create a new production Scheduler and Cost Centre? How I will be able to do so,also?Will the Production Scheduller and Cost Centre assignments fom the old work centre be copied,too,or I will need to create/copy these from scratch?
    All help greatly appreciated,will award points to all useful answers.
    PAPJ1.
    Edited by: PAPJ1 on May 20, 2011 11:01 AM

    Hello,
    You can create a new work center by copying an existing work center. in the cr01 screen in the copy from column put the plant name and Ref. work center name and put enter. all the existing data will be copied to the newly created work center. no need to create new assignment to  Production Scheduller and Cost Center.
    Hope it helps.
    Regards
    Alok

Maybe you are looking for

  • Is there a way to sync my iTunes on my iPad with my PC iTunes?

    I have iTunes on my iPad, as well as a MacBook Pro (without iCloud on it). I am trying to get the music from the iTunes on my PC to my iPad. How can I do that?

  • How to uninstall CS5?

    I recently got CS6. But I left CS5 in my computer as a backup. Now I want to uninstall CS5 because I believe CS5 is the reason my CS6 programs keep crashing on me without offering to save my work prior to crashing. How do I uninstall CS5 completely,

  • PSE ERROR ON SAPECC

    Hi Gurus ,             From today morninig , i face the error message while login to our ECC server . Below i mentioned the error . So kindly give me the solution for this error . Author Express message text SAPSYS    Validity of certificate from lis

  • Iphone 4S should be unlocked

    Last week buy in south Miami BBY an Iphone 4S should be unlocked as directed by the seller. Unfortunately to get my country (Chile) I realized that is blocked by Verizon, try to unlock it through Itunes but was not successful. How should I do to unlo

  • De authorising computers or devices

    I see no option in the OS to de authorise devices. There is only an optionto deauthorise all. I only want to de authorise old devices I no longer own. Can anyone help?