Reference Variables in ABAP WebDynpro
Reference Variables in ABAP WebDynpro
Reference variables or attributes or object references or instances ,all are same SAP ABAP WebDynpro.These are used as object references for current controller and interfaces and also used to access the root node .So here there are two different instances are available which are 'wd_this' and 'wd_context' and we learn the use of these two reference variables.
WD_THIS is a reference variable or 'instance' for the current controller :IF_VIEW_NAME.
WD_CONTEXT is a reference variable or instance for
'root context node':IF_WD_CONTEXT_NODE.
Normally ,in webdynpro component,whenever a view has been created , view interface will be created by system (IF_VIEW_NAME) and object reference for this interface is 'WD_THIS'.
Some interfaces related to
Node->IF_WD_CONTEXT_NODE.
Parent Element->IF_WD_CONTEXT_ELEMENT.
We are using WD_CONTEXT reference variable or object reference for 'root node'.
Whenever you want to perform an action in the context node ,you need to access node first so that to access that node we need object reference that is 'WD_CONTEXT'.
Context Node is a root node ,is referring to SAP standard interface IF_WD_CONTEXT_NODE. This interface contains a method 'GET_CHILD_NODE' which is used to get the object reference of its child node .
Using this method ,we can access the reference variable of immediate child node of root node.
From this post,we have learnt the reference variables which are instances for current controller and root node to access the attributes of node elements .
Comments
Post a Comment