Entering content frame

This graphic is explained in the accompanying text Controller: Attribute Locate the document in its SAP Library structure

You can define local attributes for every type of controller. Like the private instance attributes of a class, these can be used locally in all methods of the view or the controller. These attributes can also have the characteristic “Public” and in this way are known beyond the limits of their own controllers within the surrounding component.

The ID

The attribute ID can consist of the alphanumeric characters and the special character _ (underline). The ID must not begin with a figure, an underline or the letter combination WD.

 

This graphic is explained in the accompanying text The IDs for attributes, events, actions and methods share the same namespace within the view/controller – that is, an attribute cannot have the same name as an event, an action or a method.

Public

Use this checkbox to decide whether the attribute’s visibility remains restricted to the corresponding controller (default setting), or whether the attribute is visible and can be used within the entire surrounding component.

The Reference Type

All types that are entered in the Dictionary are permitted as reference types for an attribute, as are all data types that are created. Furthermore, references to classes and interfaces can also be used as reference types. In this case you have to select the field belonging to the attribute in the RefTo column.

 

Two attributes are automatically created when a controller is created:

WD_CONTEXT

WD_CONTEXT always has the reference type IF_WD_CONTEXT_NODE and is a reference to the local controller context.

WD_THIS

This attribute is a self-reference to the local interface of the corresponding controller. Since each controller has a unique local interface, every WD_THIS attribute also has a unique reference type.

For more information about using these two attributes, see the relevant chapter of the programming manual, Programming Controller Methods.

 

Leaving content frame