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.

14

Shared Memory

agrees with the database contents. (The term invalidate here has the same meaning

as when used in relation to SAP database tables that use buffering.)

You will have seen by now that there are three settings scattered throughout the

screen that all relate filling up the root class with data the first time it is accessed:

Aut. Area Creation , Constructor Class , and Area Structure . If these three

fields are not consistent, then you get all sorts of error messages.

The Lifetime option at the bottom enables you to expire certain shared memory

areas if they have not been read for (as an example) 180 minutes, thus freeing up

memory. You usually would not want to do this, unless maybe you have objects

which were only accessed at certain times of the year (which does not seem very

likely).

When you are happy with the settings you have defined, click the Save button to

create the shared memory area. You will see messages popping up at the bottom

of the screen telling you that a class with the same name as the area is being generated:

ZCL_MONSTER_SHMO, in this case.

As mentioned earlier, you do not have to add any of your own custom coding

into the broker class. Each broker class is generated automatically with 99% identical

code; some small parts change based on the choices you made during the

SHMA transactions. For example, in the Attributes tab, as shown in Figure 14.6,

you can see that some of the attributes (such as the name of the root class) have

been set to the values you just entered.

Figure 14.6 Broker Class Attributes

642

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

Saved successfully!

Ooh no, something went wrong!