Professional Documents
Culture Documents
04 Web Dynpro For ABAP-Context at Design Time
04 Web Dynpro For ABAP-Context at Design Time
Session Overview
At design time, the developer can statically define the context structure of any
controller.
Context elements have to be added to the structure hierarchy and properties
have to be set for each context element.
At runtime, these properties rule the memory allocation, for example, the type
of the content and the dimension of data arrays to be stored. Thus it is
essential to understand the static definitions and the runtime properties related
to the context .
This lesson gives a basic introduction to the context.
Learning Objectives
After completing this lesson, you will be able to:
Define nodes and attributes in a controller's context
Explain how the node property's cardinality and singleton influence the memory
allocation at runtime
Define the Supply function methods for populating the context at runtime.
Root Context
Node
Context Node
Context Node
Arranged hierarchically
Permitted to have children(Nodes and
Attributes)
Metadata Description declared manually
or derived from DDIC structure
Context Attribute
Stores runtime data or references to
runtime data
Based on DDIC types
Context Node
attributes
01 :
At runtime, no more than one element is instantiated, but it is also possible that no
element is instantiated.
1n :
n elements can be instantiated, but at least one element must be instantiated.
0n
The number of instantiated elements of the context node can vary
10
Initialize Lead
Selection
SET_LEAD_SELECTION and
SET_LEAD_SELECTION_INDEX
11
12
Singleton Property
13
14
Supply function
Supply functions are a mechanism to repopulate child nodes
They can be assigned to each context node of a controller and is especially
useful in combination with singleton nodes.
If the lead selection is changed by the user, the supply function can access the
new lead selection element and recalculate the values of the child node
elements accordingly.
They are called automatically at runtime by the Web Dynpro Framework in the
following conditions
The node collection is initial.
The lead selection in the parent node collection is changed.
The node collection is invalidated programmatically.
15
Supply Function
16
Session Summary
You should now be able to:
Define nodes and attributes in a controller's context
Explain how the node property's cardinality and singleton influence the
memory allocation at runtime
How to use Supply function method for population context.
17