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.

12

Web Dynpro ABAP and Floorplan Manager

12.2.3 Establishing View Settings

Now, you’ll be defining various screens (views) and parts of those screens in

order to enable your transaction flow. First, you’ll create a selection option field

via which the user can enter a monster number and/or name. Then, you’ll set up

a button the user can press after he’s en tered his selections so that a monster

search is triggered. Next, you’ll define the view that will store the resulting list of

monsters. Finally, you’ll set up the view that will be used to display header details

of a monster selected from the list and the associated list of monster items.

Defining the Select Options Part of the View

Now is the time to take the structure that is being used to store the select options

and replicate that structure in the view (which, again, is how you’d start in a DYN-

PRO program—by setting up the initial sc reen). Normally, you’d have at least a

dozen fields on a selection screen; here, you’re just going to use two for simplicity’s

sake: name and number.

Technically, the selection options are going to live in a view all of their own, so

select your ZWDC_MONSTER_MONITOR root node, right-click, and choose Create 폷

View. Be radical: call this view SELECT_OPTIONS. You’ll land on the Layout tab of

your new view. Navigate to the Context tab, which is where data structures have

their home (Figure 12.9).

Figure 12.9 Creating a View for the Select Options

Select the SELECT_OPTIONS node from the controller box on the right and drag it

over to the view box on the left. The result is that the SELECT_OPTIONS node is replicated

inside the view box, and you get a message to the effect that a mapping has

been defined. This means that there are now two identical structures (one in the

view and one in the controller), and they are joined at the hip. You will also have

522

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

Saved successfully!

Ooh no, something went wrong!