Source
Code Enhancement is one of the enhancement technologies available under
Enhancement Framework. Implementing this technology is also called as Source
Code Plug-In. Technically the source code plug-in implementations are stored in
a separate include program and not as part of the original source program.
There
are two types of Source Code enhancements possible.
- Implicit enhancement option
- Explicit enhancement option
Here
I am explaining implicit enhancement. The screenshots in the explanation are for
below scenario:
Extend materials (both header material and component material) to the plant while creation or change of BOMs.
Extend materials (both header material and component material) to the plant while creation or change of BOMs.
Below
are steps to create enhancement:
Step1: Open include or function module to which you
want to implement enhancement.
Step2: In order to implement any of these Source code
enhancements, you need to be in ‘change Enhancement mode’ (the spiral icon
available in the editor)
Step3: Goto Show Implicit Enhancement Options.
Step4: Below lines consisting of double quotes(‘’) as shown in screenshot
signifies that implementation is possible.
All
Implicit Enhancement option will be displayed. In ABAP programs, implicit
enhancement options are predefined at the following places:
·
Begin/End of an include.
·
Begin/End of Method/Function Module/Form
Routine
·
End of a structure
·
End of Private/Protected/Public Section
of a local class
Step5: Right Click on the line
and Create Enhancement as shown below. The options to modify the enhancement is
also available in the list.
Give
a name and create.
An option to decide type of enhancement will appear.
An option to decide type of enhancement will appear.
In
the example it is ’Code’.
Step6: The editor will open in editable mode. Plugin the code as required and
activate it.