14.01.2020 Views

ABAP_to_the_Future

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Custom Enhancements 8.3

The next two screens are too boring to show. On the next screen in the wizard,

you’re asked for the name of the constant s interface; this is exactly the same as

the steps we covered in Section 8.1. The constants interface provides a link

between the human-readable names of the business object and the internal GUID

references. The last screen of the wizard asks if you want to make your new

enhancement object extensible; that is, you could let some future developer come

along and make an enhancement to the enhanced object you’re now creating. It’s

wise to say yes to this, for the same reason you should very rarely define a class

as final; you just never know what requirements will come along in the future,

so keep your options open.

When you click the Complete button at the end of the wizard, a new business

object is created that has the exact same child nodes as the original object (Figure

8.41).

Figure 8.41 Enhanced Business Object

Now the object is yours, and you can do with it what you will. As mentioned previously,

in addition to obvious things like adding new Z fields to the existing

structure, you can also crea te new subnodes or actions and validations. There’s

really no point in going through thes e one by one, because the procedure is

exactly the same as when you created actions and validations for your custom

business object earlier in the chapter, and I’m sure I don’t need to tell you how to

add an extension structure to a standard SAP table!

If you’re bursting for further information on this topic, I refer you to the fifth of

the excellent series of blog posts by James Wood on the subject of BOPF; there’s

353

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

Saved successfully!

Ooh no, something went wrong!