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: 

Best practice to use in User exit

Former Member
0 Kudos

Hello Team,

We have a requirement where we want that many developers can do changes in User exit( for example: MV45AFZZ) at same time without locking object and depending on project situations , specific process code can be deactivated and activated..

I have read many threads in SDN and also many documents where I have realized there are many solutions, out of which i believe there are two options are good.

1) Define custom BADI and create many implementations  for it and call method of this BADI in User exit.

  I like this concept as it can be also enhance with switch framework. Only disadvantageous which I see that we need to identify all parameters in form routines defined in userexit. Otherwise we need to do the changes in Interface and user exit.

2) Implicit and explict enhancement points:-

Implicit enhancement point :- Please confirm whether we can create more than 2 implementations in form routines of user exit. I have tried to create one but not able to do so.

explicit enhancement point :-   I understand that multiple EP can be assigned to ES and they have multiple implementations.

But not able to do identify what is more advantageous in BADI and explicit enhancement points.

Please give your views on this.

Thanks

Shiv

1 ACCEPTED SOLUTION

former_member1716
Active Contributor
0 Kudos

Hi Agarwal,

To Your Question on the second point, yes we can create two enhancement points inside same routine, in one of our requirement we have created Three enhancement points. Please let us know what difficulty are you facing in that.

As Most of the experts suggested BADIs are always a better option to go but yes finding parameters is a bit difficult job. It is upon the requirement to deicde which is feasible to achieve BADI or Enhancement points.

Regards,

Satish

11 REPLIES 11

former_member1716
Active Contributor
0 Kudos

Hi Agarwal,

To Your Question on the second point, yes we can create two enhancement points inside same routine, in one of our requirement we have created Three enhancement points. Please let us know what difficulty are you facing in that.

As Most of the experts suggested BADIs are always a better option to go but yes finding parameters is a bit difficult job. It is upon the requirement to deicde which is feasible to achieve BADI or Enhancement points.

Regards,

Satish

0 Kudos

Thanks Satish for your response.

For my second point, My first question is whether we can create more than two implementations in Implicit EP as SAP defines enhancement option only at the beginning and end of routine.

SAP is saying that implementation is already done while creating third implementation.

0 Kudos

Hi Agarwal,

I just got Your Point. I assume what you are doing is creating the first enhancement point and then immediatly as the next step you are trying to create the second enhancement point. This is the reason you are getting it even i got the same just checked. There are two solutions to create more enhancements points.

1) If you want to give your second enhancement a different name come out of the screen and follow the same procedure as you did for creating a first enhancement, Now you will be getting an pop up screen as below in that click create icon(Marked in Red Below). In this way you can create different enhancement points.

2) Suppose if you want two enhancments to be created with same name then you need not follow the full procedure again instead just try to create the second enhancement immediatly at the option available beneath the first enhancement point(Marked In green), but not above the first enhancement point(Marked in Blue). if you try to create above the first point then it will give the error as you told. In this case the enhancement numbers will be in ascending order as marked in red below.

I just tried these steps, hope you are clear now. Please get back in case you have any queries.

Thanks and regards,

Satish

0 Kudos

And for your question yes we can create more than two enhancement points.

0 Kudos

Thanks Satish,

You are right that we can create multiple implementation on enhancement points.

Regarding Explicit enhancement points, SAP have provided certain places where we can implement it so I guess this would be disadvantage as all routines in User exit MV45AFZZ does not have explicit enchantment options. Do you agree on it.

0 Kudos

Well Agarwal based on my personal experience i would say no. Because the Include MV45AFZZ is the favourite exit point in our project , Since we have so many enhancement points in it.

Also i just checked all the routines in that particular include has enhancement options. Am afraid on how you are checking, Please follow the below steps as soon as you enter the Include.

Step1: Click on the enhance icon on top left as shown below,

Step2: Now navigate as given below,

Edit--> Enhancement Operations--> Show implicit Enhancement options.(Shown below)

Step 3: After step two you can find black arrow(Shown Below) inside every routines, which confirms that enhancement point can be created.

Then you can create your enhancement Point. Hope your doubts are clear . Please let me know for any queries

Thanks and regards,

Satish


0 Kudos

Yes Satish, I agree on the point of Implicit Enhancement points. But I am curious about explicit enhancement points although it is not needed in this userexit. But to understand the concept of explicit EP , would there be option to implement  Enhancement implementations at all places in these routines.

0 Kudos

There is one more point for this.. How to Deactivate Implicit implementation . I know that we can undo implementation but if we want to attach it again or activate it again then is there any possibility . If yes then how to do it,.

0 Kudos

Well Like BADI we dont have an option to deactivate the enhancement points. But if you want to use this enhancement point later but not now i would suggest you comment all the the code lines and activate the user exit and later when you need it you can uncomment and activate. I think by this way you can achieve what you want.

Regards,

Satish

0 Kudos

Basically let me differentiate between an implicit and explicit enhancement in short:

Explicit Enhancement: If You try to create a enhancement point in customer or user exits provide by SAP then it is Explicit enhancement, and you can create any number of Enhancement points.

Implicit Enhancement: These are like creating enhancement points at the standard programs. usually these enhancement options will be visible at the top or at the end of a Fm or Subroutine.

Hope you are clear now. And for your question yes you can create as many implementations inside the subroutine but you cannot create it at all places. It must be either at the start of the subroutine or the end of the subroutine but not between the standard code lines.

Hope you are clear. Please Get back if you have any further queries.

Regards,

Satish

0 Kudos

Thanks Satish for all of your detailed explanation . It is quite useful.