Implicit Vs Explicit Enhancements
Implicit Vs Explicit Enhancements
This Implicit and Explicit enhancement can be found in ECC6.0 version onwards. This
comes under the Enhancement Framework and can be switched using Switch framework.
A Spiral symbol that can be seen in the editors so that the whole program is switched into
enhancement mode wherein you can define your one enhancement in different ways like:
Whenever we are incorporating enhancements directly in the source code we go with this
source code plug-ins.
Implicit Enhancement
Explicit Enhancement
Enhancement-Point
Enhancement-Section
• At the end of all the programs such as Includes, Reports, Function pool, Module pool, etc.
after the last statement.
• At the beginning and end of all FORM subroutines.
• At the end of all Function Modules.
• At the end of all visibility areas as public, protected and private of local class .
This kind of enhancements as stated before is of two kinds .One that can be provided at a
specific place such as Enhancement Point , and another which can be used to replace a
group of statements called as enhancement Section.
Enhancement Section
Enhancement Point
First of all going with Implicit enhancement here is an example of it in PZ80 (Section 80
Deduction Data).
In SE80 (object navigator) open the standard program SAPLEHIN80 in Function Group
EHIN80 in subroutine MODIFY_OKCODE_0100 double click on it.
Step 3.
Once the program is opened in enhance mode than check for implicit enhancement place
available in the code. (As described before Menu->Edit->Enhancement Operations-
>Show Implicit Enhancement Options.
In the subroutine you will see the enhancement been provided by SAP.
Place the cursor on the line been highlighted and right click, select Enhancement
Implementations-> Create.
Give the enhancement name and short description in the pop-up that will be displayed
after create is selected.
Step 4.
In the subroutine you will see the enhancement been provided by SAP.
Place the cursor on the line been highlighted and right click, select Enhancement
Implementations-> Create
CODE:
A Message gets displayed on the status bar confirming that the change button is disabled.
Select it as SAPLEHIN80.
CODE:
This is how you can do Implicit enhancements in any Program. We generally go with this
if we do not get the option for any explicit enhancements in the source code.
Select the package in which you want to create the simple enhancement spot.
In case of explicit enhancement we can add our enhancements at any place as per our
requirement.
Well in our case we start with a Z program and do enhancement in it.
Before starting explicit enhancement we have to create a Enhancement Spot.
Enhancement Spot.
This has to be done under a package. So starting with creation of a package. Go to se80.
Now go to se38 and there in a ‘z’ program you can include your enhancement spot
created .This is a procedure wherein it becomes clear that how if one is creating a custom
program and wants that it would provide some enhancements wherein he can do the
enhancements .It is done as this.
Now in the Program you can see the created spot for enhancement point.
Now right clicking on it…You can create the implementation for it as this but for this we
have to go to the Enhancement mode as here below.
Activate only the enhancement as here. We don’t need to activate the whole Program.
This is how we can create and we can go through the creation of Enhancement spot. This
was a Custom one.
Now going for the standard one we have to go through the same procedure we did in
SE38.This will make the Explicit enhancement more clear.
Here is the Small sample scenario in which we will be defaulting the Sold-to-party value
in the VA01 transaction.
For this now first of all we need to find out the relevant explicit enhancement where we
can put the code.
So we first of all debug the transaction VA01 transaction and then at that time u will find
many explicit exits present.
Now this is the VA01 transaction.
SAPMV45A
Now, click on the sales above in debugging mode we find in this module where there is a
form as below.
This is the enhancement section above in the given main program and the form name.
Varma Pericherla, ERPandERP Pvt. Ltd. Hyderabad
Now,
Going to Se80 and in the Program find include and the form where this enhancement
was there.
After tracing the place where the Section is there as we stated in the definition before that
section is used to replace the existing code of sap with the customer type.
So, we go as right clicking on the enhancement and checking the create option it gives
you the option to create your own enhancement for that section and the SAP code will be
present in the ENHANEMENT and ENDENHANCEMENT .You can change or edit the
code or keep your own code in that .
So as we have selected ZTEST123 we proceed as above here is the below screen for it.
The enhancement implemented here is our ZTEST123 and in the just we are giving a
default value for Sold-to-Party as ‘1’.
This is how the Explicit enhancements are done. The simplest way to trace out that the
particular enhancement is getting triggered or not at the place u want ,You put a break-
point in that Enhancement and Endenhancement and check the debugging starts at that
place or not.
Similarly we can proceed with the Enhancement-point but that is a place were you create
a particular code no replacement of SAP code is there.
Best-practice for the order in which the enhancement options should be considered and
used is:
• Use a BADI; if there is no BADI to suite your need then,
• Try to solve it using Explicit Source code, Function and Class enhancements; and,
• Implicit Source code enhancement should be the last option to choose
Of course, if none of the above could solve your adaptation needs and if your need
demands it, modification should be the last option to be tried.