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.

Using BOPF to Write a DYNPRO-Style Program 8.2

Figure 8.14 Displaying a Determination in Transaction BOB

In this case, you want to the do the PB O trick (filling out derived fields before

showing them to the user)—you can tell because the Determination Pattern

field has been set to Fill Transient Attributes of Persistent Nodes —and fill

some text fields straight after you have the database fields.

After you finish the wizard, the next task is to actually code ZCL_D_FILL_MONSTER-

HEADER_TEXT. Looking at the generated class, the first thing to notice is that the /

BOBF/IF_FRW_DETERMINATION interface has been added to the new class. The interface

for determinations has the following three methods you can implement (the

first two are optional):

왘 CHECK_DELTA

This corresponds to the DYNPRO concept of ON-INPUT. This method works out

what fields have been changed; this is important, because usually only some

fields will need to trigge r determination if they ha ve been changed. In the

DYNPRO framework, this was part of the UI logic, but really this is the job of

the model.

왘 CHECK

This is very subtly different; this time, the method looks at the new content of

the changed fields. This is important, because sometimes you need to work out

309

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

Saved successfully!

Ooh no, something went wrong!