ENHANCEMENT-POINT
Short Reference
ABAP Syntax ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ...
[STATIC]
[INCLUDE BOUND].
ABAP_ADDITIONS:
1 ... STATIC
2 ... INCLUDE BOUND
What does it do? : This statement defines an explicit
enhancement option at the current
position in the program at which a
source code enhancement can
be made. During program generation, the
source code plug-ins of the assigned
enhancement implementation that are
available in the current system and have a
switch with the stand-by or
on status are included at this position.
If the STATIC addition is not specified, the source code
enhancement is dynamic. This means that when the program is executed,
only those source code plug-ins are executed whose
switch has the on status. If a source code plug-in is not
assigned a switch, it is handled in the same way as a plug-in with a
switch with the on status.
With enh_id , an ID must be specified directly for the
enhancement option. This ID must be unique in the current
compilation unit without the
INCLUDE BOUND addition, and in the current include program with
this addition. At least one
enhancement spot must be assigned to the enhancement option by
specifying simple enhancement
spots spot1 , spot2 , and so on.
Within enhancements , one or more
source code plug-ins can be
created for an enhancement option. A source code plug-in is created by
assigning an enhancement implementation
in the Enhancement Builder .
This automatically generates an empty source code plug-in with a unique
ID. This is displayed in the Editor underneath ENHANCEMENT-POINT ,
where the actual enhancement can be implemented between
ENHANCEMENT and
ENDENHANCEMENT .
A source code plug-in is assigned to exactly one enhancement option.
Multiple source code plug-ins of multiple enhancement implementations
can be assigned to one enhancement option.
Latest notes: : In the terminology of the
enhancement concept , the
ENHANCEMENT-POINT statement includes both the
enhancement spot element definition
and the enhancement spot
invocation of the enhancement option.
The ENHANCEMENT-POINT statement can either be entered directly
or created by choosing
Edit -> Enhancement operations -> Create
enhancement in the Enhancement
Builder . Once the program has been saved or the enhancement has been
created by choosing Edit -> Enhancement operations -> Create
enhancement , the statement can only be deleted by choosing Edit
- Enhancement operations - Delete enhancement .
In addition to the enhancement options explicitly specified by
ENHANCEMENT-POINT , ABAP programs also contain
implicit enhancement points , which can
also be enhanced using source code plug-ins.
The ENHANCEMENT-POINT statement can also be listed in a source
code plug-in.
ABAP_ADDITION_1 ... STATIC
What does it do? : The STATIC addition is used to define a static
source code enhancement. In a static source code enhancement, all source
code plug-ins incorporated are taken into account when the program is
executed, including those whose switch
has the stand-by status.
Latest notes: : The STATIC addition is intended for enhancing data
declarations, while the ENHANCEMENT-POINT statement without the
STATIC addition is intended for enhancing executable coding. When
the statement is created by choosing Enhancements -> Create
enhancement , the addition is set according to this selection.
ABAP_ADDITION_2 ... INCLUDE BOUND
What does it do? : This addition can be specified in include programs. It
links the source code enhancement to the current include program. Each
program that incorporates an include program only includes the source
code enhancements that are defined with this addition. Enhancement
options created using the INCLUDE BOUND addition must have unique
designations within the include program. Internally, the designations of
include-bound enhancement options always refer to their include program.
This ensures that naming conflicts do not occur between include programs
and compilation units during integration in a
compilation unit and or between
include programs when multiple include programs are integrated.
Without the INCLUDE BOUND addition, a source code enhancement
is assigned to exactly one compilation unit. If the
ENHANCEMENT-POINT statement is listed in an include program without
this addition, a compilation unit must be assigned to it in the
Enhancement Builder.
Latest notes: : In an include program, include-bound and
non-include-bound source code enhancements cannot be defined at the same
time. This also applies if an include program incorporates other include
programs.
In an include program that is integrated in the same program more than
once, only include-bound source code enhancements are permitted.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved