SAP ENHANCEMENT-POINT ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for ENHANCEMENT-POINT

ENHANCEMENT-POINT

Short Reference
• ENHANCEMENT-POINT ABAP Statement
• SPOTS ENHANCEMENT-POINT


ABAP Syntax ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ...

[STATIC]
ABAP Code Snippet

ABAP Addition
1 ... STATIC
ABAP Code Snippet

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 ABAP Code Snippet 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.
• STATIC ENHANCEMENT-POINT

ABAP Addition

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.
INTHINT Undocumented feature: When STATIC is used,
INTHINT the restriction of complete control structures
INTHINT between ENHANCEMENT and ENDENHANCEMENT
INTHINT is moderated to complete
INTHINT statement blocks (blocks within control structures).
INTHINT This is not communicated to customers, since
INTHINT STATIC is intended for declarations only.



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 Code Snippet

ABAP Addition

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 ABAP Code Snippet 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.

ABAP Code Snippet 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.

Return to menu