Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Webdynpro ABAP

Context in Webdynpro ABAP


Context is a method of storing a data in a hierarchical manner. The data used by the component or a view are stored in the form of context. We can read or write data in the context using the controller as a starting point.


Structure of a Context node:



If you look at the context tab of any controller you will be able to see a thing called context. It is actually a singleton root node under which we will be declaring our nodes and attributes.


Each context has a node and a number of attributes underneath a node. The attributed declared directly will be coming under the root context node “CONTEXT”.


Each node consists of data can be one of the two ways:

1.      A individual instance

2.      Table of Instance

We will discuss it when we come to the topic cardinality of the context node.

Recursion Node:


Dynamic nesting of node is also possible within the context called recursion node.



1.      The node which is used for recursion should always be a predecessor of new node.  Here in the above given example the node2 is the recursion node and the node1 is the predecessor node.

2.      The recursion node cannot be processed separately.

3.      You cannot use the root node “CONTEXT” as a predecessor node.



How to access the data in the context?


By default all the nodes which we are declaring will be the child node of the root node “CONTEXT”.  The reference to this root context is available in the Attributes tab of the Controller.




The interface consist of number of methods that will help us play with the context.


About Arun


Powered by Blogger.