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.

Building the WDA Application 12.2

Figure 12.20 Creating an Outbound Plug

Once you’ve defined an outbound plug, you can enter data in the lower half of

the Outbound Plug tab (Figure 12.21), in the section with Importing Parameter

from at the top. You almost always want to send data between views so that you

can have as many parameters as you want, rather like events in OO programming.

This is an outbound parameter from the sending view’s perspective, but the WDA

framework has chosen to call it an “importing” parameter on the grounds that it

will be imported into other views. You could send the monster number and have

the system look up the monster header record, but as you already have all the

fields, that seems rather wasteful—so send the whole record.

Figure 12.21 Creating an Outbound Plug Parameter

As we all know, what goes up, must come down. Now you have an outbound

plug looking for a home, so you need to define a corresponding inbound plug in

the target view. Simply navigate to the target view ( V_DISPLAY_MONSTER) and

select the Inbound Plug tab (Figure 12.22).

The difference between the outbound and inbound plugs is that when you add an

entry in the Inbound Plug tab called IP_FROM_MONSTER_TABLE, an event handler

method called HANDLEIP_FROM_HEADER_TABLE is created for you (you’ll be coding

this method in Section 12.2.8).

Now, create the linkage between the two plugs by going to the Window tab of

the W_MONSTER_MONITOR window, selecting the outbound plug leaving the V_HEAD-

ER_GRID, right-clicking, and choosing Create Navigation Link.

533

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

Saved successfully!

Ooh no, something went wrong!