Entering content frame

This graphic is explained in the accompanying text Reference Variable WD_THIS and Local Controller Interface Locate the document in its SAP Library structure

Each controller contains a local interface which can be accessed in the controller.

The controller attribute WD_THIS is a reference to this local interface. Depending on the controller, a reference variable is of the following type:

 

·        IF_COMPONENTCONTROLLER

·        IF_<MY_CUSTOM_CONTROLLER>

·        IF_<MY_VIEW>

·        IF_<MY_WINDOW>

 

The methods and attribute of the local controller interfaces can be accessed using these reference variables.

·        Included are all self-defined methods that have been created and implemented by an application developer for the current controller.

Since the application developer can change the implementation, these methods are listed on the tab Methods of the Controller Editor. You switch to the ABAP editor for adding source code by double-clicking the method name. For further information on these methods, refer to chapter Methods of Local Controller Interfaces. 

·        The application developer can call another group of methods but cannot change the implementation of these predefined methods.

This graphic is explained in the accompanying text For general information on different interface types and their visibility within one or more Web Dynpro components, refer to chapter Controllers of a Web Dynpro Component in the tools manual of this documentation.

·        The application developer can implement a third group of methods, but these methods are exclusively called by the runtime.

·        All attributes of the controller are accessed using the reference variable WD_THIS.

 

Accessing the Web Dynpro Runtime API

The generated interface of a controller (local and global) contains a restricted number of methods. It only contains methods and attributes that can directy or indirectly be defined or implemented by the application developer. Therefore, the Web Dynpro runtime provides a generic runtime API for each controller type. In this API, several frequently used methods are implemented and can be used by the application developer. You can access general functions like the portal manager or message manager of the framework using these interfaces. The method WD_GET_API which is contained in all generic controller interfaces allows the access to the corresponding runtime API.

 

Attribute WD_COMP_CONTROLLER of the View Controller

In most cases, it is useful to declare the usage of the component controller for a view controller. The development environment has therefore predefined this step. In addition, each view controller already contains the attribute WD_COMP_CONTROLLER, which is a reference variable of the type IG_COMPONENTCONTROLLER.  In each view controller, you can use the attribute WD_COMP_CONTROLLER to access all publicly accessible methods of the component-global generated interface of the corresponding component controller.

 

 

Leaving content frame