cancel
Showing results for 
Search instead for 
Did you mean: 

WD_CONTEXT AND IF_WD_CONTEXT_NODE

Former Member
0 Kudos

Hi folks,

Am very new to Abap objects and working on webdynpro.I have a very basic question what is wd_context and if_wd_context_node.Please let me know what is the use of them.

Regards,

Vamshi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As you know, that to deisgn our things , webdynpro framework provides the root objects so that upon which we can start building our own things...

WD_CONTEXT is the attribute you can find it the respective ATTRIBUTES section of view and other controllers...

There is already a CONTEXT defined by framework to which we attach/create our things...

In order to get the reference of this root context, it refers to the type IF_WD_CONTEXT_NODE to start with.

WD_CONTEXT refers to type IF_WD_CONTEXT_NODE type object...so that we can get the root context reference based on which we can aslo get our own nodes and attribtues using the respective methods like GET_CHILD_NODE in that interface..

Answers (2)

Answers (2)

former_member199125
Active Contributor
0 Kudos

As you are new to webdynpro,

think of node as table..

attributes under node as fields in table

To perform the various operation on table we have methods like delete, insert, update

similarly for node we have methods.. ..all those methods under one interface [ if_wd_context_node ]

Check this interface in SE24 tcode, u will find the methods under it.

Regards

Srinivas

Former Member
0 Kudos

Hi Vamshi,

IF_WD_CONTEXT_NODE is the reference interface of Context node, which is having so many methods for context node and attribute operations like BIND_ELEMENTS, BIND_STRUCTURE, GET_ATTRIBUTE etc.

The WD_CONTEXT attribute is a reference to the root node of the context of the controller.

See the below code, it will differentiate the two concepts.

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.

Regards,

Simi A M