Wednesday, August 31, 2016

Controller Attributes

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.
4
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.
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.

No comments:

Post a Comment

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...