07-18-2010 5:00 PM
Hi Guys,
I would like to ask you for help as I do not know how to get from the following situation.
By mistake I managed to create in one class two methods with the same name. I deleted one of those methods. However the whole class is stell in error after validation and the error message says 'method x has already been implemented'.
Do you have any idea what steps i need to do to remove the whole method at all. I cannot see it in the list of methods under the class.
Many thanks in advance,
Jan
07-18-2010 10:47 PM
Hello Jan
You may have a look at table TMDIR which contains the class methods. Perhaps you find two records which have a different index yet the same method name. If so then try delete one of the duplicated entries.
Regards
Uwe
07-19-2010 5:55 AM
Thanks for the advise. But unfortunately there is only one entry in the table.
Basically now I can see in the class only one method x. When I validate the class it gives error that the method x has already been implemented. And when I click on the message it says that Method x does not exist.
Maybe I can try to remove the other method with name x. But I am a bit afraid that it will not solve the problem.
Any ideas how to solve this? Due to this I cannot move forward.
many thanks,
Jan
07-19-2010 10:53 AM
HI
Please confirm that you deleted the method from the definition as well as implementation part of the class.
Thanks
Lalit Gupta
07-19-2010 10:59 AM
Hi,
Can you please advise me where to delete it from the implementation part?
Tahnks,
Jan
07-19-2010 11:06 AM
Hi
First of all I want to know that where you created your class, In SE24 or in any programm.
if in SE24, then go to se24 open that class go to methods tab and check if that method name accurs at two places, if not, then
click on that method and check the code.
or if in a program.
then you must have defined like
class <class name> definition.
public section
method <method name>
endclass.
class <class name> implementation.
method <method name>
code for that method.
endclass.
It might be possible you have set the implementation part twice for that particular method, So please check and delete one implementation for that method.
Thanks
Lalit Gupta
07-19-2010 10:59 AM
Did you perform these actions (from the "Menu Functions"):
1. Utilities --> Clean Up --> Method Includes (basically select the one which is relevant in your case).
2. Utilities --> Regenerate Sections.
BR,
Suhas