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

Properties of Context Node

 

In the following post we are going to see what the properties of context node are.  Please refer to this link on what is context node before going on to its properties:

 

http://www.teamabap.com/2014/05/context-in-webdynpro-abap.html

 

The properties of the context node are as below:

 

clip_image001

 

 

Node Name: The node name specifies the Name of the context node.

 

Interface Node: Interface node property of the context node determines whether the node can be used for cross component communication (One component to another Component) or not.

Say for example we have two components Component A and Component B. When the component A to which contains a context node “STATUS” is used in another component B then the component B can access the node STATUS if it is interface node. Interface nodes are mainly used for the purpose of transferring data from one component to another component. The context node in a component that is created in the view level does not provide interface option and cannot be accessed in other components.

 

Input Element (Ext.): Usually when we want a context node to be used in the number of views we define it in the component controller context and map it to the view required by dragging and dropping the context node in the different view. We call it data mapping ref to document data mapping.

 

Dictionary Structure: Here we specify a dictionary object reference as a structure to the context node. It can be either table or structure. When the dictionary structure is referenced to the context node then the attribute of the context node can only bear attributes belonging to the structure or table specified. Also it is not necessary that all the fields of the dictionary structure is to be used as the structure of the context node, we can choose only the required fields from the structure. Apart from the fields in the dictionary structure any attribute other then the fields in the dictionary structure specified cannot be added unless and until the dictionary structure reference is removed.

Cardinality: Here we specify the cardinality of the context node. i.e. the no of the records that the context node is subjected to have at run time.

 

0..1 – It can contain up to one record or nothing.

1..1 –  It can contain only one record. A record by default is instantiated.

0..n – It can Contain N no of records or nothing.

1..n – It Contains one record instantiated by default or any No of records.

 

 

Selection: This selection specifies no of (Elements or rows or leads) can selected by the user for processing. The input is similar to that of the cardinality.

 

 

Initialize lead selection: If the initial lead selection is checked then one (Element or row or lead) will be selected by default. It will be the first element of the context node.  For example when you display the data in the context node using table UI element one row of the table will be selected by default.

 

Singleton: Singleton property is set to reduce the load of the context node. Say for example when we have a parent child relationship between two nodes, Node A (5 Elements) and Node B (10 elements). When the Node A is accessed it loaded with all the elements of the Node A as well as all the elements of the Node B when the singleton property is not set for node A. The same when the singleton property is set for the Node A, then only the 5 elements of the Node A along with the records corresponding record of 1st record in the node A with Node B will be loaded.  

 

To be precise, Assume that Parent node has 5 Sales order (1,2,3,4,5). When a Sales order 1 is accessed the supply function method is triggered and corresponding details of sales order 1 is stored in child node. When sales order 2 is triggered supply function method is triggered and the details of sales order 2 is stored in child node. Now if we don’t have singleton option in the node and if select the lead for sales order 1, this time the supply function method will not be triggered as the element is already available in the memory. The same if I have had the singled property selected, then when I accessed the 2nd sales order the memory allocated for the first sales order will be destroyed. Now if I choose the first sales order then once again supply function method gets triggered and loads the data, this time it clears the second element which is already available in the child node. This way it ensures that only one element available in the child node.

 

Supply Function: Supply function is a method assigned to the context node which is being executed every time the context node is being accessed. It is used for initializing or invalidating the context node.

 

 

 

 

 

 

 

 

 

 

 

 

 

About Arun

3 Comments:

  1. yeah very nice and clear explaination.

    thank you.

    ReplyDelete
  2. However, interest rates have only 1 way to go and that is up. Test that your investment still produces cash flows at higher interest rates so it remains an asset and not a liability.deyaar offplan properties

    ReplyDelete

Powered by Blogger.