Show TOC

 Editing Source Code Plug-InsLocate this document in the navigation structure

You can create, change, replace and delete source code plug-ins in addition to edit an enhancement point in the original code. The code of an enhancement section is substituted by the respective source code plug-in.

Creating Source Code Plug-Ins

Procedure

  1. Open the ABAP source with explicit or implicit enhancement options in the ABAP Editor.

    More information about how to create explicit enhancement options: Explicit Enhancement Options in ABAP Source Code .

  2. Switch to enhancement mode by using the Enhance pushbutton from the toolbar.
    Note

    To exit the enhance mode, choose the Display <-> Change pushbutton.

  3. Position your cursor on the explicit or implicit enhancement option and choose Enhancement Implementation → Create Implementation/Option from the context menu.

    The Select or Create Enhancement Implementation dialog box appears. You can choose an existing implementation or create a new one.

  4. If you choose to create a new enhancement implementation, an empty source code plug-in is automatically created. It has a unique ID and is displayed in the ABAP Editor below the enhancement option as follows:

    ENHANCEMENT id.

    ...

    ENDENHANCEMENT.

  5. Implement the enhancement between the ENHANCEMENT and ENDENHANCEMENT lines.

    A source code plug-in is assigned to exactly one enhancement option (the container) but an enhancement option can be enhanced through several source code plug-ins.

    Note

    Although source code plug-ins are displayed in the same source code as the respective enhancement options, they are stored in other include programs managed by the Enhancement Builder.

Changing Source Code Plug-Ins

Procedure

  1. Open the ABAP source code with the enhancement implementation you wish to change - for example, in transaction SE80.
  2. Switch to enhancement mode by choosing Enhance from the standard toolbar.
    Note

    To exit enhancement mode, choose Display <-> Change.

  3. Position the cursor on the enhancement implementation to be changed and select Change Enhancement Implementation → Implementation from the context menu.
    Note

    With this function, you can change all the elements that belong to the enhancement implementation. If you wish to change a different enhancement implementation, you must first switch to display mode.

    Note

    Source code plug-ins are displayed in the same source code as the corresponding enhancement options, but they are stored in a different include managed by the Enhancement Builder.

Replacing Source Code Plug-Ins

You can replace existing enhancement implementations instead of changing them.

Note

The Enhancement Framework is not supported by the Modification Assistant. For this reason, this procedure is the preferred one because it is not a modification.

Should the replaced implementation change - for example, due to a Support Package import, it could become necessary to change the replacement as well. The requirement to do this is displayed to you in transaction SPAU_ENH .

Procedure

  1. Open the ABAP source code with the enhancement implementation you wish to change - for example, in transaction SE80.
  2. Switch to enhancement mode by choosing Enhance from the standard toolbar.
    Note

    To exit enhancement mode, choose Display <-> Change.

  3. Position the cursor on the enhancement implementation to be changed and select Change Enhancement Implementation → Implementation from the context menu.
  4. The Choose or Create Enhancement Implementation window appears. You can now select an existing implementation or create a new one.
  5. If you wish to create a new enhancement implementation, an empty source code plug-in will be created automatically. This has a unique ID and is displayed in the ABAP Editor under the enhancement spot as follows: 

ENHANCEMENT id. "Replacing …

...

ENDENHANCEMENT.

Note

In addition, a comment is entered in the implementation. From this comment you can see that this is a replacement action.

  1. Implement the enhancement between the lines ENHANCEMENT and ENDENHANCEMENT .
    Note

    Source code plug-ins are displayed in the same source code as the corresponding enhancement options. However, they are stored in different include programs managed by the Enhancement Builder.

Deleting Source Code Plug-Ins

Procedure

  1. Open the ABAP source code with the enhancement implementation you wish to change - for example, in transaction SE80.
  2. Switch to enhancement mode by choosing Enhance from the standard toolbar.
    Note

    To exit enhancement mode, choose Display <-> Change.

  3. Position the cursor on the enhancement implementation to be changed and select Change Enhancement Implementation → Undo Implementation from the context menu.