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

how to create second or third source code plug-in for same enhancement point?

Former Member
0 Likes
1,268

i am asking this in the context of thomas weiss blog on

Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework

http://scn.sap.com/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-serie...

from the blog :

"Source code plug-ins are unnamed. You create a source code plug-in by assigning a (simple) enhancement implementation to an enhancement point. In turn, this means that a (simple) enhancement implementation can only be assigned once to an enhancement point. Otherwise the identity of a source-code plug-in would be blurred."

so if we can assign enhancement implementation only once to enhancement point,how can we create second source code plug-in to same enhancement point?

9 REPLIES 9
Read only

PeterJonker
Active Contributor
0 Likes
1,139

It looks to me that the text you are quoting says it is not possible. same like a Badi where only one implementation is possible compared to badi's where multiple implementations are possible.

I guess you can always write both requirements in one implementation

Read only

0 Likes
1,139

Hi Peter,

http://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htm

from the above link we can see visually that multiple source code plug-in's are possible.

Read only

0 Likes
1,139

OK, I see. But now I also read the above statement correct and it really says one source code plug in per enhancement IMPLEMENTATION.

Therefore the text does NOT say that you can only have one implementation per enhancement point

My apologies for reacting to fast. But in truth the above text says (just like in the SAP HELP link) that you can have multiple implementations on one enhancement point.

If it says:

"assign enhancement implementation only once to enhancement point" that means that you cannot assign the same implementation to two or more implementation points." That is how I interpret the text.

Did you try to create a second implementation ?

Read only

0 Likes
1,139

Hello,

The SAP Help Link shows that you can have multiple enhancement implementations indirectly tied to an Enahncement spot. It does not show an enhancement point hacing multiple implementations.

An enhancement spot can have many enhancement points and each enhancement point ( enhancement definiton) - especially in the case of a source code enhancement can have only one enhancement Implementation assigned. Thats the limatation of the Enhancement option ( Source code Plugin ) and it makes sense. There cannot be multiple Source code enhancements for one poiint, if so how do you determine which plugin to pick at runtime?.

However,In the case of source code plugin's,  I am not sure if we can reassign an Enhancement point to multiple enhancement spots. I have never tried that.

Enhancement option like BADI's allow to have multiple Implementaions tied to one definition, because they provide us a mechanism to choose the right one ( Filters )..

Hope this Helps. Do correct me if I am missing anything.

Venkat.

Read only

0 Likes
1,139

From the blog:

"There can be none, one or many active source code plug-ins (as these enhancement implementation elements are called) assigned to an enhancement point. All these source code plug-ins are executed in addition to the code that is enhanced."

so it is clear that source code plug-ins are assigned to an enhancement point.

now i am also thinking about the order of execution of source code plug-ins?

any inputs?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,139

An enhancement spot can have many enhancement points

Agreed!

 each enhancement point ( enhancement definition) - especially in the case of a source code enhancement can have only one enhancement Implementation assigned.

Don't agree You can have multiple enhancement implementations to an enhancement point.

There cannot be multiple Source code enhancements for one poiint, if so how do you determine which plugin to pick at runtime?.

If your implementation is linked to a "switch", then the runtime environment(RTE) determines the status of the switch and does the needful Otherwise every enhancement is triggered. I have no idea about the sequence in which they are triggered

Enhancement option like BADI's allow to have multiple Implementaions tied to one definition, because they provide us a mechanism to choose the right one ( Filters )..

What about BAdIs with multiple implementations & w/o filter? All the implementations are triggered, but the sequence in which they are called is not defined.

BR,

Suhas

Read only

0 Likes
1,139

Hello Suhas,

Englightened .

Honestly, the thought of a switch never crossed my mind ( To be honest, I have never used it !)..

I guess i got confused with the fact that ,  Every enhancement point can be implemented only once in an Enhancement Implementation.

What about BAdIs with multiple implementations & w/o filter? All the implementations are triggered, but the sequence in which they are called is not defined.

You are correct. Again, a scenario, where I have never created a BADI definition which allowed multiple impementations wihtout a filter. The classic BADI's have a different mechanism for handling them, but using the GET BADI statement,I have never tried the scenario, I should investigate it.

Thanks for your input.

Thanks,

Venkat.

Read only

0 Likes
1,139

Hi suhas,

I too thought in the same line in the beginning,after i read this blog i got confused that's why i create this thread..

still i do not understand:

"All these source code plug-ins are executed in addition to the code that is enhanced"

what do you think about this statement from the blog?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,139

All these source code plug-ins are executed in addition to the code that is enhanced

It sounds like it should sound in plain English All the code plug-ins are executed along with the standard code, provided the switch(if any) is turned on.

BR,

Suhas