Reference Variable WD_CONTEXTLocate this document in the navigation structure

WD_CONTEXT

The WD_CONTEXT attribute is a reference to the root node of the controller context. Regardless of the edited controller, it is always a reference variable of type IF_WD_CONTEXT_NODE. 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 MY_TABLE_NODE node. You can use the INVALIDATE_TABLE_NODE method 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.

GET_CHILD_NODE and INVALIDATE are methods of the IF_WD_CONTEXT_NODE interface. Other frequently used methods are GET_ATTRIBUTE or BIND_ELEMENT, for example. For a complete list of methods and their functions, refer to the reference section of this documentation (link is above).