TREE_ADD_NODE SAP Method Add Node to Parent/Child Manager
Below is documentation, parameters and attributes of ABAP Method TREE_ADD_NODE within SAP class CL_ALV_TREE_BASE_IN. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name CL_ALV_TREE_BASE_IN into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Instance
This is an Instance Method so needs to be instantiated first before you can access any of the methods. I.e. you need to create a local variable of TYPE ref to the class.The following technical details of method TREE_ADD_NODE can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method TREE_ADD_NODE
.| Name | Type | Data Type | Description | Default Value |
| I_NEW_NODE_KEY | Importing | TYPE LVC_NKEY | Node to be Inserted | |
| I_NODE_TEXT | Importing | TYPE LVC_VALUE | Node Key Text | |
| I_RELATIONSHIP | Importing | TYPE INT4 | How Node Should be Inserted | |
| I_RELATKEY | Importing | TYPE LVC_NKEY | Relative Node |
Exceptions of Method TREE_ADD_NODE
ERROR - Inconsistency OccurredExample ABAP coding
DATA: lo_class TYPE REF TO CL_ALV_TREE_BASE_IN.
DATA: lv_I_NEW_NODE_KEY TYPE LVC_NKEY,
lv_I_NODE_TEXT TYPE LVC_VALUE,
lv_I_RELATIONSHIP TYPE INT4,
lv_I_RELATKEY TYPE LVC_NKEY,
lv_other TYPE c.
CALL METHOD lo_class=>TREE_ADD_NODE(
EXPORTING
I_NEW_NODE_KEY = lv_I_NEW_NODE_KEY
I_NODE_TEXT = lv_I_NODE_TEXT
I_RELATIONSHIP = lv_I_RELATIONSHIP
I_RELATKEY = lv_I_RELATKEY ).
Links to Related Class(s)
CL_ALV_T...Full list of available SAP object classes
Search for further information about these or an SAP related objects