cancel
Showing results for 
Search instead for 
Did you mean: 

wd_this, wd_contex

Former Member
0 Kudos

Dear Folks,

I am very new to wd abap, ple give the difference of

WD_THIS

WD_CONTEXT

WD_COMP_CONTROLLER attributes.

Thanks & Regards,

sri

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member

Hi Sridevi..

WD_THIS

WD_THIS is a self reference to the controller interface. This attribute must

be distinguished from the standard ABAP self reference ME, which should

not be used in the source code of any controller. WD_THIS is a reference to

the current controller's interface, IF<controller name>, and represents all

the functionality implemented in the generated class. This also gives you

access to standard Web Dynpro functionality, such as validation.

WD_CONTEXT

WD_CONTEXT is the reference to the controller&#146;s context root node, and

thus to the entire context. Any access to the controller's context starts with

this reference.

WD_COMP_CONTROLLER

WD_COMP_CONTROLLER is the reference to the component controller.

Using this reference, all methods and all public attributes of the component

controller can be accessed (wd_comp_controller-><meth>, where

<meth> is a placeholder for the methods name).

Regards

Bala..

0 Kudos

Reference Variable WD_CONTEXT

WD_CONTEXT

Attribute WD_CONTEXT is a reference to the controller context. Regardless of the edited

controller, it is always a reference variable of the type IF_WD_CONTEXT_NODE [page 859].

You can use WD_CONTEXT and the interface methods to edit the content of a context node

in your controller method.

Example:

The controller context contains the node MY_TABLE_NODE. You can use the method

INVALIDATE_TABLE_NODE to invalidate the values of the node elements.

method INVALIDATE_TABLE_NODE .

data: TABLE_NODE type ref to IF_WD_CONTEXT_NODE.

TABLE_NODE = WD_CONTEXT->GET_CHILD_NODE( 'MY_TABLE_NODE' ).

TABLE_NODE->INVALIDATE( ).

endmethod.

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:

&#9679; IF_COMPONENTCONTROLLER

&#9679; IF_<MY_CUSTOM_CONTROLLER>

&#9679; IF_<MY_VIEW>

&#9679; IF_<MY_WINDOW>

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.

Former Member
0 Kudos

hi sridevi......

these are attributes that are declared...

these are declerd in the attribute section.

wd_this is a reference to your local controller interface.

wd_context refers to your local context

wd_comp_controller refers to the component controller

for details about the local controller interface, local context and local component controller, check the following links:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/00545e6d-0679-2910-acab-8073c... [original link is broken] [original link is broken]

---regards,

alex b justin

Former Member
0 Kudos

Hi.

See my previous answer in another thread.

too.

Most of the time your question has already been asked by someone else and therefore your answer will probably be available.

Regards.

Jos