Page tree
Skip to end of metadata
Go to start of metadata

Enhancement Framework   Implicit Enhancement (Source Code Enhancement)

Implicit Enhancement Option (Source Code Enhancement or Plug-ins) -

Throughout the ABAP system, enhancement options are automatically available at certain pre-defined places. Some of the implicit options are:

→ At the end of all the programs (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 (public, protected and private) of local class

How to create an implicit enhancement?

→ Click on 'Enhance' button in SE38 and follow the link to show the predefined enhancements (Edit - Enhancement Operations - Show implicit enhancements). Now, right click the predefined desired place and create the implementation.

→ Then create the implementation by processing the available dialog box.

→ Now add the desired coding or add the desired field to any structure and click on the 'Activate Enhancements'.

Enhancing a standard transaction program using implicit enhancement technique -

Consider a scenario in the 'Human Resource' module, where in PA30 transaction for the info type '0618' which is 'Academic Qualifications'.

Whenever an user sets the 'Subjects combination' using the radio buttons he/she must get the message of the choice selected in order to confirm his/her selections and default a set of 'Academic disciplines' based on customer combination values as enhancement to the standard process.

The normal process would work in a standard manner that is, for the entered combinations of 'Academic Disciplines' - 'Academic discipline 1' and 'Academic discipline 2' and so on.
Based on the combination of 'Subjects' that is 'Balanced' and 'Major/Minor' combinations the records are saved.

Observe the original functionality for disciplines 'H3' and 'H4' under 'Balanced' combination

If in future the any area of academic discipline can be changed as well as the combination of subjects like (say) 'Balanced' to 'Major/Minor'. Accordingly the records will be saved.

To enhance the standard functionality we go with some important steps,

Find the program name where we need to do the source code enhancement,
(Say) 'MP061800'.

Enter the program through 'SE38',

Locate the desired module which contains the main program code,

Now after locating the include drill into it and locate the place where these radio button actions are performed by maybe 'Debugging'.

Activate the 'Enhancement Mode' (Spiral button) on the application toolbar.

After locating the write place to place the enhancement, as usual enable the 'Enhancement mode' and then 'Enhancement operations' → 'Show implicit enhancements'.

Then decide the best suitable place for an implicit enhancement for creating the enhancement,

Create an implementation at the predefined points or places and fill the dialog details

Add the custom code required to enhance the standard business functionality,

Activate the enhancements

Now, the time has come to test the enhanced functionality of the PA30 transaction for any operation (maybe create new record, display data or change data) the enhanced functionality will trigger always,

Test case I - For subject combination already selected for 'Major/Minor' combination and 'Academic disciplines' as 'H2' and 'H5' respectively.
Observe the message,

→ Test Case II - For subject combination changed to 'Balanced' combination and leaving the 'Academic disciplines' as it is.

Observe that the enhancement logic has once again triggered and the desired changes have come into effect.

The 'Academic disciplines' have changed to the 'H3' and 'H4' values respectively.

Observe the message,


 

1 Comment

  1. Thanks for such a useful post... was really helpful !