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.

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. 
  • Add new method. 

Inserting New Optional Parameters to existing methods

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
  •  Add parameter.

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

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.