
Interface F_WD_CONTEXT_NODE enables a single Context Node to be filled or data to be retrieved from a context node.
BIND_ELEMENT
This method binds a context element to the context node.
Parameters
|
Name |
Type |
Description |
|
NEW_ITEM |
Import Parameter |
This can be a reference to a context element (ref to IF_WD_CONTEXT_ELEMENT ) or a reference to a data structure or a data structure itself. If it is a data structure, for performance reasons you should use BIND_STRUCTURE. |
|
SET_INITIAL_ELEMENTS |
Import Parameter |
If this parameter has the standard value (=ABAP_TRUE), the content of the node is chucked out, that is, the node is invalidated and then the new element is inserted. Otherwise the element is added to the list. |
|
INDEX |
Import Parameter |
Specifies the element before which the new element is to be added (only relevant if SET_INITIAL_ELEMENTS = ABAP_FALSE). With the standard value 0 the new element is added as the last element. |
|
ELEMENT |
Return parameter |
The reference to the new element is returned. |
If there is an error, an exception is triggered of type CX_WD_CONTEXT.
BIND_ELEMENTS
This method binds context elements to context nodes. This method is essentially the same as the method BIND_ELEMENT, with the difference here that an internal table containing either element references, data references, or data structures must be specified.
BIND_STRUCTURE
With this method a structure can be created as a new element in a node. The structure should preferably be the same as the declared structure of the node, but it does not have to be. If the structures are not the same, a move-corresponding is executed. In other respects this method behaves the same as BIND_ELEMENT.
BIND_TABLE
This method binds an internal table to the context node. This method is an optimized version of BIND_ELEMENTS. A table containing data is expected. If the data structure of the table matches the declared structure, the following internal optimization is performed: Only the table itself is passed to the node. No element instances are created yet. If one or more elements are accessed, precisely these element references are created.
The ABAP principle Copy-on-write is used to transfer the table, which means that the table is copied only when it is changed and not at the time it is transferred.
Only index tables, that is, standard tables and sorted tables are supported.
CLEAR_SELECTION
The current selection is cleared.
CREATE_ELEMENT
An element reference is created that can later be appended to the node using BIND_ELEMENT. The data for the element can be appended too, or set later. The element reference is returned.
CREATE_ELEMENT_STATIC_ATTR
This method is obsolete, so do not use it.
GET_ATTRIBUTE
This method retrieves the value of a context attribute.
GET_ATTRIBUTE_REF
This method returns a reference with the value of a static or dynamic attribute. A new reference is created. This means that a change made to the content of the reference does not change the attribute itself.
GET_CHILD_NODE
This method retrieves a specific child node.
GET_CHILD_NODES
This method retrieves all child nodes.
GET_CONTEXT
This method retrieves the reference to the controller context (not to the context node). The reference is particularly relevant for working with the Context Change Log .
GET_ELEMENT
This method retrieves the reference to an element, either with a special index or the lead selection element.
GET_ELEMENTS
This method retrieves an internal table with all element references.
GET_ELEMENT_COUNT
This method retrieves the number of elements.
GET_LEAD_SELECTION
This method retrieves the reference of the lead selection element.
GET_LEAD_SELECTION_INDEX
This method retrieves the index of the lead selection element.
GET_META_PATH
This method retrieves the path of the node in the metadata. The path does not contain any indexes.
GET_NODE_INFO
This method retrieves the reference to the metadata object (IF_WD_CONTEXT_NODE_INFO).
GET_PARENT_ELEMENT
This method retrieves the reference to the element in the parent node to which this node belongs.
GET_PATH
This method retrieves the path of the node in the original controller. This path contains the node name and indexes.
GET_SELECTED_ELEMENTS
This method retrieves a list of all selected elements.
GET_STATIC_ATTRIBUTES
This method supplies a copy of all attributes declared static.
GET_STATIC_ATTRIBUTES_REF
This method gets a reference to a copy of all static attributes.
GET_STATIC_ATTRIBUTES_TABLE
This method gets all the static attributes of all elements.
INVALIDATE
This method invalidates all elements of the node. This means that all elements and subnode instances are deleted. Afterwards the status of the node is as it is in its initial state. When an element or an attribute is requested again, the supply method is called, if it is available.
IS_ALIVE
Method for checking whether the associated controller is still "alive", which means it can still be accessed, and has not been terminated with WDDOEXIT.
IS_ATTRIBUTE_NULL
IS_CHANGED_BY_CLIENT
IS_FINALIZED
IS_SELECTED
This method finds out if the element associated with an index is selected.
IS_SUPPLIED
This method finds out if the node is filled or is still in its initial state (or invalidated).
MOVE_ELEMENT
MOVE_FIRST
This method sets the lead selection to the first element.
MOVE_LAST
This method sets the lead selection to the last element.
MOVE_NEXT
This method sets the lead selection to the next element.
MOVE_PREVIOUS
This method resets the lead selection to the previous element (the index then has one element less than before).
MOVE_TO
This method sets the lead selection to an element with the specified index.
PATH_GET_ATTRIBUTE
This method retrieves a data reference to an attribute that can be accessed from the ME node along a relative path.
If there is an error, an exception is triggered of type CX_WD_CONTEXT.
PATH_GET_ELEMENT
This method is essentially the same as PATH_GET_ATTRIBUTE, but does not retrieve an element reference.
PATH_GET_NODE
This method is essentially the same as PATH_GET_ATTRIBUTE, but does not retrieve a node reference.
REMOVE_ELEMENT
This method deletes an element from the node. The element can later be appended to the same node again.
RESET_CHANGED_BY_CLIENT
SET_ATTRIBUTE
SET_ATTRIBUTE_NULL
SET_CHANGED_BY_CLIENT
SET_FINALIZED
SET_LEAD_SELECTION
SET_LEAD_SELECTION_INDEX
SET_SELECTED
SET_STATIC_ATTRIBUTES
SET_STATIC_ATTRIBUTES_NULL
TO_XML
This method serializes the node in XML.