Enhance your ABAP code without altering original SAP objects

by Scott Priest, Editorial Director, Financials & GRC

August 5, 2011

A repeated concern in adding modifications to code is that doing so can create unforeseen problems if you're not careful. As a result, many companies (and IT professionals themselves) resist modifications if they can find an alternative.

In his latest SAP Professional Journal article, Faisal Altaf of DESCON Engineering presents such an alternative, implicit enhancements. Implicit enhancements enhance standard SAP objects such as includes, function modules and forms. They allow you to add functionality to the standard object without changing the objecti itself, which is obviously preferable, especially when upgrade time comes around. Of course, you can couple such an enhancement with other modifications if you so choose (Faisal includes a small modification is his example).

He covers two types of implicit enhancements:

  1. Static (declaration) enhancement
    • Data declaration is part of a static enhancement (e.g., structure definitions TYPES, DATA, CONSTANTS, and STATICS)
    • PUBLIC, PROTECTED, PRIVATE and SECTION of a class, include, interface definition, and class implementation are also part of a static enhancement
    • CHANGING, IMPORTING, and EXPORTING parameter list of a method
    • There is no option for selecting a type of enhancement while implementing it, but it automatically goes into the static enhancement category
  2. Dynamic (code) enhancement
    • All ABAP code other than declarations is considered a dynamic enhancement
    • You can use dynamic enhancement for form, methods, and function modules
    • You can select the type of enhancement while implementing, so you can place it in both declaration and code type
    • If you want to place a form, local class, or method in an implicit enhancement you have to include these in the static type of enhancement. You can’t include it in a dynamic type.
    • Data declarations are always static, even if you will place them in the dynamic part of the enhancement

He then goes on to show you how to implement the implicit enhancement, as well as the various place where you can use them. For the full article, SAP Professional Journal subscribers can go here. For more information about SAP Professional Journal, go here.

An email has been sent to:

More from SAPinsider


Please log in to post a comment.

No comments have been submitted on this article. Be the first to comment!