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

to drag the MONSTER_HEADER_TABLE over as well, as later on the SELECT_OPTIONS

node will need this in order to properly handle the user pressing the Find

Selected Monsters button.

Section 12.2.2 talked about data structures, and now you’ll turn to the real job of

a view, which is looking after the appearance of such data. Navigate to the Layout

tab of your view, and you’ll find that your cursor has landed on a node called

ROOTUIELEMENTCONTAINER. Right-click on this, and choose Create Form Container.

A pop-up box appears that’s just crawling with options. In this case, you

want to use the context you just created, so click the Context button in the topright-hand

corner of the pop-up box.

In the resulting screen (Figur e 12.10), you can choose the SELECT_OPTIONS node

(not that you actually have much choice at the moment). The two fields appear in

the pop-up box in a tabular display; click the green checkmark.

Figure 12.10 Creating a Form Container

Using Standard WDA Elements

In this example you have manually coded the two selection option boxes. In real life you

would want to make use of a standard reusable Web Dynpro component WDR_SELECT_

OPTIONS that defines “real” select options such as the ones you see on a selection

screen, with all the extra functionality that entails, rather than having to code it all yourself.

The “Recommended Reading” box at the end of the chapter has a link to instructions

on how to do this.

Now, it’s time to meet the WDA equivalent of the DYNPRO Screen Painter. Either

press (CTRL) + (F10) or click the button that says Show/Hide Layout Preview. The

resulting screen (Figure 12.11) probably looks very familiar, at least in terms of

structure.

523

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

Saved successfully!

Ooh no, something went wrong!