Enhancement Framework – Explicit Enhancement-POINT Implementation

By | April 1, 2014 | Enhancement Implementation | 100,709 | 6

Let’s see more on Explicit Enhancement POINT implementation in ABAP Enhancement Framework with step-by-step guide of creating an implementation.

If you have read the basics yet, I would suggest to read the previous article in the series – Enhancement Framework – Introduction

ENHANCEMENT-POINT

Points are predefined hooks available in Std SAP code which you can implement. At runtime, Based on the Switch status of the Implementation, the implementations would be called.

  • INCLUDE BOUND – If point is INCLUDE BOUND, the implementation would be created with respect to the include, instead of the main program. INCLUDE BOUND implementations would be called in each program where include is referenced.
  • STATIC – If point is STATIC, the implementation would be called if switch is not assigned. If switch is assigned, implementation would be called based on the status. If point is not STATIC, the implementation has to be part of the switch and it has to be active.

Find an Enhancement-POINT

To find any enhancement, you need to follow almost similar process like you have used to find any other enhancement – You debug. If you know the program, you can go through it and look for a specific point which you want to implement. But, I believe Debugging would give you better options.

Let take some scenario – You want to update certain attributes for Line Item while posting the material document. So, you debug the process. And found out that there is this Enhancement point which you can implement.

Implement the Enhancement-Point

1. Get to Enhancement Mod
Press the Spiral button on the toolbar to bring up the Enhancement mode. Once you are in Enhancement, the Editor would be open for change with kind of maze on left.

Enhancement_Implementation_Initial_Mode

2. Create an Enhancement
Put Cursor on the Enhancement Name and choose option Edit > Enhancement Operations > Create Implementation

Enhancement_implementation_Create_Implemenation

The same option is also available in context menu (right click)

If all options in Enhancement Operations in Main Menu and in context Menu are not selectable, you must not be in the Enhancement Mode.

3. Choose or use Implementation
System would bring you a popup to choose existing Enhancement implementation. If you implementing a new functionality, I suggest you create the new Implementation by pressing the Create Icon. Many times, developers get confused as system brings the std implementation names as well. They select them to implement their functionality and system would ask for the Access key. So, they get frustrated and confused. Enter the details of the Enh Imp name and description. In subsequent popup enter the Package and TR if you don’t select Local objects.

Enh_Imp_Explicit_pop_1

Once Enh Imp is created, you are back to the popup to select the Enh Imp. Scroll down to find your Enh Imp which you just created. Select and continue. If you are later version of ECC 6, your selected Enh Imp would be automatically selected.

Enh_Imp_Explicit_pop_2

4. Implement the logic
Now Implement the logic in your Enhancement Implementation. Once completed, press Activate Enhancements to activate the implementation.

Enh_Imp_Explicit_implemented_code

Change Implementation

Once you have created the implementation and you wish to change – get into the Enhancement mode. Use the Edit or Context menu to select the option Enhancement Operation > Change Implementation. Activate the Implementation.

Remove Implementation

If the you wish to remove the implementation, you need to follow two step approach.

  1. Undo the implementation first. Choose Context Menu > Enhancement Implementation > Undo Implementation.
  2. Activate the Implementation. If you don’t activate, the object will not be detached from the program.
  3. Go to SE80. Choose Other objects > Enhancements. Choose option Enhancement Implementation and enter the name. Choose Delete to remove it completely from system.

Multiple Implementations

There could be multiple Implementations of the same enhancement point. Like one shown in this example. If the implementation is attached to the Switch and if the switch is active, the system would execute those implementations. Implementations without any switch are also active at the same time.

If you are in the change mode of one of the implementation, Enhancement Framework will not allow you to create another one right there. You need to go out of the change mode. I generally, go out of the program and start the process again.

Enh_Imp_Explicit_implemented_multiple

Next Article

Enhancement Implementation Debugging

Table of Content – Enhancement Framework

Like It? Share!!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{274 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 274 articles.

Load comments

6 Comments

  • Subham Sarkar

    Hi Naimesh,

    I very often use implicit enhancement, is using enhancement best option, as I use because to override some standard flow, If I do not get any exit, then I use this.

    When to use explicit and when implicit.

    Is there any disadvantage of using enhancement spot?

    thanks
    Regards,
    Subham

  • Hello Subham,

    I request you to bear with me. It would be only make more sense, to introduce better option once after I have covered both explicit and implicit 🙂 I would getting onto it as part of this series.

    Thanks.

  • Anson

    Hi Nimesh,

    I was confused regarding this topic but now I have a better understanding after reading this post.

    Thanks a lot for taking time to share your knowledge.

  • Dhruvin

    Hi Naimesh,

    You are doing awsme work , and it is helping many developers.
    Although this post is about implicit enh, right?

  • Hello Dhruvin,

    The article shows on the implementation part of the Enhancements which are provided by SAP, thus they are Explicit, not implicit. Implicit options are not defined with ENAHCEMENT but they are available at certain places in the code. More to come in upcoming articles. Stay tuned.

    Thanks.

  • Abhay Singh

    It cleared a lot of air, now I know what is STATIC INCLUDE BOUND.. You my dear, are the BEST.
    Big Fan.

Comments on this Post are now closed. If you have something important to share, you can always contact me.

You seem to be new here. Subscribe to stay connected.