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.

6

The Enhancement Framework and New BAdIs

6.3.3 Creating the BAdI Interface

The last Russian nesting doll to create in the BAdI definition is the interface for

the BAdI—that is, what methods BAdI implementations are going to have and

what parameters and exceptions those methods have. To create this interface,

click on the arrow on the left of the BAdI definition, and double-click the Interface

icon in the tree that pops up.

Figure 6.19 Creating a BAdI Interface: Part 1

Most developers are used to SE11 or SE38 or SE24 for creating various repository

objects in which the icons are arranged in the order Display, Change, Create. To

keep you on your toes when creating the BAdI interface, the first two options are

reversed to Change, Display…and there is no Create option in sight (Figure

6.19). What you need to do is cr eate the interface by clicking the Change icon,

after which you are asked if you want to create the interface. Then, you’ll end up

at the standard SE24 screen (Figure 6.20).

Figure 6.20 Creating a BAdI Interface: Part 2

This is exactly the same as defining a normal interface, with the exception that

multiple-use BAdIs can only have importing and changing parameters. This is

because they are called in a random order, so exporting or returning parameters

make no sense, because only the last implementation called would be meaningful.

You’re now finished with the definition of the BAdI (rather like saying you

244

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

Saved successfully!

Ooh no, something went wrong!