Sei sulla pagina 1di 3

Implicit/Explicit Enhancements

The Main problem with the user exits is that only a single implementation is possible. That means if an
enhancement is included in one project that cannot be reused as long as the project is active.

To overcome the drawback of User exit, SAP came up with BADI which supported multiple
implementations. Now several users can create an instances of the same object and can use(as it follows
with the OOPS Concept). And these enhancements are good with transactions.

If an enhancement is required on standard report, then SAP came up with Enhancement spots(ECC6.0)

These spots are Implicit or explicit.

 Implicit enhancements are available at various places.


At end of programs, subroutine pools, Function Groups, Few Include programs
At end of Structure (TYPE) Definition
At beginning and at end of Subroutine, Method, Function Module
At beginning and at end of Enhancement Implementation
At end of list of parameters for FM, Method
At end of each section (PUBLIC, PROTECTED, PRIVATE) of the class
At end of Interface definition

 To check the implicit enhancements, EDIT-> Enhancement operations -> Show Implicit enhancement
operations.

 We can choose type of enhancement. Like Declaration or code. Declaration is static , and it will be
available in all clients(data declarations, which works independently on the client). Code is dynamic
implementation, it would be called only on the switch status.

 Definitions of subroutines, methods, and local classes cannot be implemented in “dynamic”


enhancement implementations, but only in “static” ones
- Data declarations should be implemented in “static” enhancement implementations.
- At runtime, “dynamic” calls do not ensure the same performance as “static” calls.

 In explicit enhancement, we have 2 different types of enhancements.


a. Enhancement-Point: SAP has some standard functionality for a report, and it may required to
add our own code. In this case, the code that we added will be executed along with the standard
code.(Custom code will be executed along with the standard code)
 Multiple Active implementations of an Enhancement-point, can exist.
 All the implementations will be executed with no guarantee in the order of the execution.

b. Enhancement-Section: When the standard functionality does not suit our requirement, we may
need to add our code and we will need only that code need to be executed. (Only custom code
will be executed and the standard code will be bypassed)
 There can be only one active implementation of an enhancement-section.
 Only the implementation gets executed and the original code doesn’t get executed.
Enhancement section has same properties as the Enhancement Point with default code. When we
implement the enhancement section, system by default copy the default logic to our implementation.

Enhancement-point in custom program:

No need to create enhancement points in custom program because, we can directly edit the code. If
we have a enhancement spot where the code has already written we can use it.

In a Custom program, we can implement the enhancement point anywhere in the code.
-> Create the package and right click on it to create one enhancement spot. Give the name of the
enhancement spot.
-> Activate the enhancement spot. Right click the enhancement spot and implement it(give the impl.
name).
-> Activate the implementation, go to se38 and place the cursor where we need to create the impl.
(Right click -> enhancements-> create option)
-> Choose 'Enhancement point' and provide the enhancement impl. As enhancement spot and package.
-> Now the enhancement point will come in our code in grey color. Click on enhance. Enhancement
operations-> create.

SAP ABAP : How to Create Multiple Implementations for an Enhancement Point

https://www.youtube.com/watch?v=hIqCxwCYckk

SE20: Enhancements
SE84:
SE80:

Steps to create enhancement point:


Points are predefined hooks available in standard SAP code which we can implement.

1. Press the spiral button on the toolbar to bring up the enhancement mode.
2. Put cursor on the enhancement name and choose option Edit->Enhancement operations-> create
implementation.(same option is also available in context menu).
3. System bring ups a popup message to choose the existing Enh impl. If its new functionality, we need
to create the new impl by pressing Create Icon.
4. Provide the name and select it and click on OK.
5. Now implement the logic. Once completed press Activate enhancements to activate the
implementation.

Remove Implementation:

1. To remove the implementation, we need to undo it first.(Choose Context Menu-> Enhancement


Implementation->Undo Implementation.
2. Activate the implementation. If we 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. (Or you can directly go to
SE20).

Multiple Implementations:

There could be multiple implementations of the same enhancement point. If we are in change mode in
one enhancement, it wont allow to change or create the another one over there. Lot many
implementations we can do in one enhancement- point. Same applies for enhancement section but only
one works leaving others.

How to find the enhancement spots?

Goto SE15-> Take option enhancement SPOT-> and pass the package name.
It will display all the enhancement spots related to that package.

Potrebbero piacerti anche