Sunday, April 27, 2014
Two types of enhancements are possible for Global Classes .(1) Enhancement to source code and (2) Enhancement to components of classes.
Related tutorial: Implicit Enhancement in Function module
Implicit Enhancement in Class
Implicit Enhancement can be implemented at start of method or at end of method.This is similar to Implicit Enhancement to Function Module.
- Display class in SE24 transaction code.
- Methods tab => Double click on Method
- Click on menu Edit => Enhancement Operations => Show Implicit Enhancements.
- Click on Enhance button which enable you to implement implicit enhancement.
- Put the cursor on previous line of ENDMETHOD statement and Edit=>Enhancement Operatiion=>Create Implementation.
- Write code.
Enhancements to Components of Classes
- Inserting New methods
- Inserting New optional parameters to existing methods(but no new exceptions)
- Implementing Exits to existing methods
- Pre-Exit – Called at the beginning of a method
- Post-Exit – Called at the End of a method
- Overwrite-Exit – Replaces the original method
Inserting New Methods
- Click on Enhance button.
- Enter Implementation details as shown in the screen shot.
To create implementation, follow the above step and the below steps tells you how to add optional Parameters.
- Place cursor on Method and click on Parameters
Enhancing the Components of Classes
Use this procedure to implement enhancements (pre, post, and overwrite methods) of global classes- Click on Enhance button
- Enter Implementation details as shown in the screen shot.
- You can see PreExit, PostExit and Overwrite-Exit
- Insert cursor on Method that you want to implement PreExit enhancement
- Click on the code button and Write source code.
Related tutorial: Implicit Enhancement in Function module
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.