14.01.2020 Views

ABAP_to_the_Future

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating Enhancements 6.2

Figure 6.2 Implicit Enhancement Point

However, implicit enhancement points ar e still limited to the start and end of

routines. If you want to add your own code in the middle of a standard SAP routine,

then there needs to be an explicit enhancement point added by SAP.

6.2 Creating Enhancements

The process of actually creating an enhancement doesn’t change based on

whether it is explicit or implicit, although the way to start the creation is slightly

different. If you’re dealing with an explicit enhancement, then you put your cursor

on the line that says ENHANCEMENT_POINT; if you are dealing with an implicit

enhancement point, then you can position your cursor on the line of double quotation

marks.

In both cases, you then navigate to Edit 폷 Enhancement Operations 폷 Create

Implementation, and you will be guided throug h the process of adding in an

enhancement implementation (here, “enhancement” refers to the fact that an area

of standard code can be enhanced; an “enhancement implementation” refers to a

specific section of custom code that you have written).

You’ll now look at creating such an enhancement implementation, first in a procedural

program and then in an object-oriented (OO) program.

6.2.1 Procedural Programming

As an example, pretend that one of your custom programs is a standard SAP program—and

then butcher it with every possible enhancement option you can

imagine. (I would like to stress that I’ m not actually recommending you do this;

it’s just to show what’s possible.)

This example will guide you through pret ending to change a standard SAP function

module. You will add a new option al importing parameter, do something

with that value at the start of the function module, and then at the end of the

229

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!