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

Enhancement Section

Former Member
0 Likes
1,180

Hi,

I've one enhancement section in my code as

ENHANCEMENT-SECTION es1 SPOTS ZSP1.
write: 'Original Section'.
END-ENHANCEMENT-SECTION.

I've defined two implementations for this enhancement section as

ENHANCEMENT 3  ZES1_IMPLEMENTATION.    "active version
write 'First Implementation'.
ENDENHANCEMENT.

and

ENHANCEMENT 4  ZES1_IMPLEMENTATION2.    "active version
write 'Second Implementation'.
ENDENHANCEMENT.

Both these implementations are active.

Now, the doubt I've is, this enhancement section is always getting replaced by first implementation . Why control never goes to second implementation?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,106

Hello,

I suggest you to access the blog from Thomas Weiss [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3595] [original link is broken] [original link is broken] [original link is broken];. In this you can find a lot of usefull information about Enhancements.

Regards,

Hello,

I suggest you to access the blog from Thomas Weiss [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3595] [original link is broken] [original link is broken] [original link is broken];. In this you can find a lot of usefull information about Enhancements.

Regards,

8 REPLIES 8
Read only

Former Member
0 Likes
1,107

Hello,

I suggest you to access the blog from Thomas Weiss [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3595] [original link is broken] [original link is broken] [original link is broken];. In this you can find a lot of usefull information about Enhancements.

Regards,

Read only

0 Likes
1,106

Hi David,

Yes that is really a nice blog, I've already been there before.

But nothing is mentioned about this topic..

I guess, there can be only one replacement for the enhancement section and the source code plugin encountered first is used for this replacement..

Do you have any inputs??

G@urav.

Read only

0 Likes
1,106

Hello,

I've found this . Like described you can only have one implementation active for an enhancement section.

Regards,

Read only

0 Likes
1,106

But, both implementations for that enhancement section are active in my system.

ENHANCEMENT 3  ZES1_IMPLEMENTATION.    "active version
write 'First Implementation'.
ENDENHANCEMENT.

and

ENHANCEMENT 4  ZES1_IMPLEMENTATION2.    "active version
write 'Second Implementation'.
ENDENHANCEMENT.

G@urav.

Read only

Former Member
0 Likes
1,106

Hi Gaurav,

For ENHANCEMENT-SECTION, you can have only one active implementation as it replaces the code encapsulated by this abap statement.

If you try to create another implementation for the same enhancement section, the sytem would not allow you to do so, it will say:

"In enhancement ZES1_IMPLEMENTATION there is already an implementation for ES1".

So I suggest you check ES1 and verify whether both enhancement implemenations point to the same enhancement section?? It wont be the case.

Regards,

Chitrali

Read only

0 Likes
1,106

Hi Chitrali,

They both point to the same enhancement section.

After clicking that 'spiral' button in toolbar, just right click on es1 and say create implementation, it allows to do that.

What I have concluded is that, you can have as many active implementation for enhancement section as you want. However, the first one of these will be replacing the original section.

G@urav.

Read only

Former Member
0 Likes
1,106

Hi Gaurav,

After seeing your reply I tried this scenario again, wondering how the system allows to create another implementation when one exists for an enhancement section. And this is what I discovered.

You are right in saying that the system allows to create multiple enhancement implementations for a given enhancement section.

But try doing this. Enter enhancement mode by clicking the spiral button. Create one implementation. Now donot exit enhancement mode. Create another implementation immediately. And the system wont allow you to do so.

Now come out of the enhancement mode (you are in display mode). Again go to enhancement mode and then create an implementation for that same seaction, and the system allows you to do so. This is what you might have done. But ideally the system must stop you from doing so.

I feel its kinda problem in the enhancement builder tool.

Regards,

Chitrali

Read only

0 Likes
1,106

Yes,

You are right...

It can be a problem with enhancement builder tool.. or there is some application for multiple implementations of enhancement section which we are not sure of.

Consider the scenario where these implementations are stored in different packages and hence connected to different switches.And these switches are associated with different business functions i.e with different SAP extension.

So, each of these implementations can be switched on or off without affecting each other.

But it should not allow us to create multiple implementations with in the same package for same enhancement section.

G@urav.