!--a11y-->
Enhancing the Components of Classes or
Interfaces 
You can enhance the components of a global class or global interface by:
· Inserting new attributes
· Inserting new, optional formal parameters for existing methods (but no new exceptions)
· Adding the implementation of a pre- and/or post-method for an existing method of a class. A pre-method is called directly after the call of the existing method before the first statement. A post-method is called after the last statement of the existing method before ENDMETHOD(only if the method is exited using ENDMETHOD).
The chain pre-method ® Method xyz ® post-method can be interrupted at runtime (parts are not executed) under the following circumstances:
¡ If within the pre-method an exception is raised, the method xyz and the post-method will not be executed.
¡ If within the method xyz are used statements like CHECK, RETURN, and so on, that stop the execution of method xyz, the post-method will not be executed.
· Inserting new methods
In the context of the enhancement concept, a global class or global interface provides corresponding implicit enhancement options.
To implement an enhancement of global classes or interfaces, use the Class Builder to call the Enhancement Builder.
...
1. Choose Edit ® Enhancement Operations ® Enhance Class/Interface for an existing class or interface.
A dialog box appears.
2. Select an existing enhancement implementation or create a new one (see Creating an Enhancement Implementation.)
This takes you to the enhancement mode of the Class Builder in which the original components of the class or interface are displayed and cannot be changed.
3. Create your enhancements following the steps below:
a. Create the new attributes in the same way as when you create a class or interface.
b. Insert new, optional formal parameters in the same way as when you create a method.
c. Insert or delete pre- and/or post-methods:
i. Select the desired method
ii. Choose Edit ® Enhancement Operations → Enhancement Operations and then choose one of the menu entries: Add Pre-Method, Add Post-Method, Delete Pre-Method, or Delete Post-Method.
d. Insert new methods in the same way as when you create a class or interface.
4. Save and activate the class.
You can further use the new components for implicit and explicit enhancement options in enhancements to the source code of the class. This can be done via ABAP Source Code Enhancements.