Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error When Deleting a Method Inside a Class

Former Member
2,731

I developed a custom class that contained a private method. I removed this method because it was no longer needed. When moving the changes from the development to test client, it failed on import. For some reason, there was still some dependency on the method that was deleted.

I went back to transaction SE24 and regenerated all the sections. When this was done, it regenerated the class definition and the various sections. I moved a transport that contained these changes and it still failed. The import log has a reference to an include that is failing, but I still see no mention of the method that was deleted.

To continue going forward, I added the method back so that it resolved syntax error during import.

I am suspecting that there is some issue with ABAP support pack being used on the development system. Have other people experienced the same issue. I don't have the habit of deleting that many methods once it is created, but would like to understand the above problem and see what should be the corrective action.

Feedback/comments would be appreciated.

Regards,

Vince Castello

6 REPLIES 6
Read only

mvoros
Active Contributor
0 Likes
1,397

Hi,

it might be a bug in SAP. Have checked OSS notes? For example the notes 1257256 and 1227154 may be useful for your. There are some other notes as well.

Cheers

Read only

Former Member
0 Likes
1,397

Hi,

You should try to clean up your class in the Class Builder with the tools Utilities->Clean Up and Utilities->regenerate Section.

Regards

Read only

Former Member
0 Likes
1,397

As mentioned in my original post, I did re-generate all the sections using SE24, but the import still failed where the dependency to deleted method still remained.

I am planning to create a customer message and will post results when they become available.

Regards,

Vince Castello

Read only

0 Likes
1,397

Hi vicente,

I remember similar situations like this and then in helped to activate the class with errors. After doing so once, errors disappeared in the next syntax check.

Regards,

Clemens

Read only

Former Member
0 Likes
1,397

I've had this before and the solution is strange but quick...

Add a method with the same name and visibility into the class and then delete that method.

Read only

matt
Active Contributor
0 Likes
1,397

Alternatively, manually create an object entry in your transport request of R3TR CLAS z_myclass This will ensure that all the components of the class are transported.