Application Development 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: 

Changing methods

Former Member
0 Kudos

hello all,

I am relatively new to ABAP and was wondering if one of you could give me a hand with this.

I am asked to reset a certain Z methods to standard class. Is it possible to delete this Z method completely? I tried via se80/se24 but it gives the message "You cannot perform this action in modification mode ".

thanks for any help.

Edited by: abaplerner on Jun 13, 2011 9:26 PM

10 REPLIES 10

Sandra_Rossi
Active Contributor
0 Kudos

Hi,

by "reset", do you mean delete? I think this message is because you tried to maintain a standard class, in which custom methods have been added through the enhancement framework. If yes, then you must click menu Class -> Enhance, and then you'll be able to operate on the custom methods (and maybe you'll have to select the corresponding enhancement option).

BR

Sandra

0 Kudos

Thank you Sandra.

Yes, I am asked to delete the custom enhancements done to the methods (basically reset it to SAP's standard class). The standard CL_XX_XXX was copied to ZCL_XX_XXX and three methods were modified. The dump we are getting is pointing to ZCL_XX_XXX. If I delete the ZCL class, can I get the original program access the standard CL class instead of ZCL? In meantime, what I did was to manually comment out all the custom lines in the ZCL methods and make it same as CL. I am not sure if this is the correct way to do this.

I am not able to view any "enhance" option. I checked in Se24 and se80. Could you walk me through this?

Please advise what is the best way to RESET (remove all the custom changes and use standard SAP delievered class) the ZCL class to CL...

Thanks for your help.

0 Kudos

If I delete the ZCL class, can I get the original program access the standard CL class instead of ZCL?

You must change manually the original program. I think you'd better change manually the program to refer to CL instead of ZCL. By the way, you'd better have a look at the transport request used to work on that custom enhancement to see the list of all the objects concerned.

In meantime, what I did was to manually comment out all the custom lines in the ZCL methods and make it same as CL. I am not sure if this is the correct way to do this.

As I said above

I am not able to view any "enhance" option. I checked in Se24 and se80. Could you walk me through this?

Forget it as you are not working on the standard class. Note that it's available only on NetWeaver 7.0 (ECC 6 and so on)

Please advise what is the best way to RESET (remove all the custom changes and use standard SAP delievered class) the ZCL class to CL...

As I said above

Sandra

0 Kudos

Thanks again.

The program is a standard SAP program and the BADI (user exit) was changed to ZCL. Checking the transports shows the methods that were changed. When I used the "where used" list to see if I can find the program that uses it, it takes me to the methods that are used within the Z class.

If you have a minute can you give me some pointers to check where this BADI is used in the standard program? If there is a way to delete this Z class that would be another option, but I am not sure how.

Appreciate you help and thanks in advance.

0 Kudos

Hi,

I'm sorry to not be able to help you, but I don't understand what you say. So, you are saying that the standard BAdI was renamed and the standard program was also repaired to use the renamed BAdI? Are you sure that you are not talking about custom Z* implementation (with a ZCL* class) of the standard BAdI?

Could you paste the interesting portions of the code (calling program, called BAdI definition and implementation), I'm sure we will better understand...

Sandra

0 Kudos

Hi Sandra,

please see my response to Jeorg. Thank you for trying to help me. I am sorry that was the best I could explain. Unfortunately, I am not permitted to copy the code here.

thank you for your help. I appreciate it.

joerg_wegener
Explorer
0 Kudos

Hi,

dear abaplearner: do you mean to say that you copied a default BADI implementation (provided by SAP) into the Z namespace, and now you want to revert back to the original SAP BADI implementation?

If so, you do not have to delete anything at all. You should use transaction SE19 to change which implementation is used (the original one).

Hope this helps

Joerg

0 Kudos

hi Joerg,

Yes, that is exactly what I wanted to do. A consultant who worked on this copied the standard BADI and modified few methods in it. Now those changes are giving us a short dumps. Per recommendation from SAP we are trying to change it back to how it was delivered by SAP.

As you mentioned, I could now see the Z* implementation name changes when I went to SE19. I deactivated the Z changes there. I hope I did it correct and thinking this would make the standard SAP program access the standard BADI instead of Z. Please correct me if I am wrong.

Thanks a lot for your help!!

Edited by: abaplerner on Jun 22, 2011 6:32 PM

0 Kudos

Joerg,

WELL DONE! Thank you for having clarified the situation!

Sandra

Former Member
0 Kudos

Closing this.