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: 

enhancement-section can't delete

dieterzenger
Participant
0 Kudos

Hello,

could someone help me, how I can delete an enhancement section / spot implementation?

I have changed a method of a standard class using "enhance" function.

Now I need to delete the enhancement same but I am not able to.

The implementation and the way I want to delete it looks ike following :

when using undo or replace implementation I am only getting the error message

"position the cursor within an enhancement implementation". I almost tried all lines of the enhancement section but it does not work

your help is much appreciated

Thank you

Dieter

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

The code you are showing is not an implementation. It's a normal code that you define as "re-implementable" (an enhancement section). I think you put this code inside the standard code either as a modification of the standard (if you're not aware of having done it, maybe the code has already been modified some time ago by another developer), or inside a true custom implementation (not what you show) of an explicit or implicit enhancement option.

You may only undo the code inside a ENHANCEMENT (alone, not ENHANCEMENT-POINT nor ENHANCEMENT-SECTION) statement.

Could you give us more insight of any custom code in that program? (search for ENHANCEMENT statement alone)

9 REPLIES 9

Former Member

you have to click Enhance icon(spiral) first beofore you take any action.

0 Kudos

I did press the Spiral button

Sandra_Rossi
Active Contributor
0 Kudos

The code you are showing is not an implementation. It's a normal code that you define as "re-implementable" (an enhancement section). I think you put this code inside the standard code either as a modification of the standard (if you're not aware of having done it, maybe the code has already been modified some time ago by another developer), or inside a true custom implementation (not what you show) of an explicit or implicit enhancement option.

You may only undo the code inside a ENHANCEMENT (alone, not ENHANCEMENT-POINT nor ENHANCEMENT-SECTION) statement.

Could you give us more insight of any custom code in that program? (search for ENHANCEMENT statement alone)

0 Kudos

Hi Sandra,

thanks for your reply.

inside the method there is no "Enhancement" statement alone. I did implement the change

by using the Spiral Icon and the object was not changed by another developer.

Also the enhancement I can find in transaction SE18 as Enhancement Implementation Point/Section

In the attachement you can find the coding for the complete method.

Search for "ENHANCEMENT-SECTION" to find the changes I did.

Thank you

0 Kudos

It's what I said, you did a modification of the standard (as shown by the comment line *{ INSERT RFIK90002). Your code is not an enhancement implementation, it's a enhancement option/section (which has a default code, but which can be overriden with a enhancement implementation).

Consequently, you just need to remove the code by modifying the code directly, you don't need the "spiral" icon at all here.

If you're asked a modification key, that means there was an upgrade of your system (modification key is dépendent of installation number/release number), and you need to ask one to your admin (or via the Service Market Place in the SSCR section if you're authorized).

0 Kudos

Another way to delete the code (but that will be less clean), is to use the spiral icon, and via the context menu in the ABAP editor you can create an empty implementation of the custom enhancement section, which will be equivalent to deleting the enhancement section.

0 Kudos

https://help.sap.com/saphelp_erp60_sp/helpdata/en/56/ee9441026aae5fe10000000a1550b0/content.htm

Hi Sandra,

I wonder why I did not need a SSCR Key to change the coding. You are right, in the past before we did upgrade the system to 7.4 I implemented this change with change mode and SSCR key.

After the upgrade it was reset to standard. Now I wanted to do it as enhancement, but looks like that I did not use the correct way. I used the help in the above link, to implement it. Further checking of documentation made me  a bit i checked the following Link in the SAP Help

I was also a bit unsure, because i used the addition "STATIC".

The only thing I wanted to achieve is, that in addition to the standard coding,  the customer coding part is  executed (additionally).

Ideally I should be able to switch on / of  this enhancement points.

Can you advise me what is best practice.

BTW: I tried to remove the enhancement area, but the only message i do get is "Position the cursor within an enhancement implementation".  Do you think the only way to get rid of this is to register the object and use change mode instead of spiral icon ?

thank  you

0 Kudos

I can't say what happened exactly to your code during the upgrade, as it seems the custom code has been converted into standard or something like that. It's more a bug than a feature.

I think it's best to install relevant all SAP notes which could apply to the enhancement Framework.

After that, put aside your custom code, retrieve the standard version (in version management), and reapply the modifications.

I'm not sure for best practices. I would just opt for ENHANCEMENT-POINT instead of ENHANCEMENT-SECTION, and create an implementation of the point. The ENHANCEMENT-SECTION is to use when you want to have a default code, and allow other developer teams to overwrite the default behavior. Anyway, it doesn't make a big difference.

About removing the "enhancement area": you cannot "undo the implementation" because it's not an implementation; ENHANCEMENT-SECTION is just a place where you can create an implementation. To remove the code, you must do it in the classic way, you don't need the spiral. The spiral is for working with enhancement implementations. ENHANCEMENT-POINT and ENHANCEMENT-SECTION are just places ("enhancement options") for adding an enhancement implementation. In the classic way, a standard ABAP source can be modified only if there's a valid modification key. But, as I said previously, try first to retrieve the standard version, and recreate the implementation (at that time, you'll need the modification key anyway).

0 Kudos

thank you, Sandra