‎2008 Mar 31 7:34 AM
Hi all,
In class CL_GUI_LIST_TREE we have a method called
add_nodes_and_items>.In that method you are exporting
2 tables ie node_table and item_table.I want to know how to populate these 2 tables and also what is the purpose for these 2 tables.
Please explain with a sample code.
Thanks in advance.
Alex.
‎2008 Mar 31 7:50 AM
Hi,
This method is used for Inserting Nodes and Items.
It takes parameters Item_Table and Item_Table_Structure
Where, Item_table is your Internal Table data and Item_Table_Structure which is name of the Structure of the Item in ABAP Dictionary.
CALL METHOD me->ADD_NODES_AND_ITEMS
EXPORTING
* NODE_TABLE =
ITEM_TABLE = it_tab1
ITEM_TABLE_STRUCTURE_NAME = zitab1
* EXCEPTIONS
* FAILED = 1
* CNTL_SYSTEM_ERROR = 2
* ERROR_IN_TABLES = 3
* DP_ERROR = 4
* TABLE_STRUCTURE_NAME_NOT_FOUND = 5
* others = 6
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
HTH
Regards,
Dhruv Shah
‎2008 Mar 31 7:49 AM
Hello,
Pls refer the standard pgm SAPTLIST_TREE_CONTROL_DEMO.
Regards
‎2008 Mar 31 7:50 AM
Hi,
This method is used for Inserting Nodes and Items.
It takes parameters Item_Table and Item_Table_Structure
Where, Item_table is your Internal Table data and Item_Table_Structure which is name of the Structure of the Item in ABAP Dictionary.
CALL METHOD me->ADD_NODES_AND_ITEMS
EXPORTING
* NODE_TABLE =
ITEM_TABLE = it_tab1
ITEM_TABLE_STRUCTURE_NAME = zitab1
* EXCEPTIONS
* FAILED = 1
* CNTL_SYSTEM_ERROR = 2
* ERROR_IN_TABLES = 3
* DP_ERROR = 4
* TABLE_STRUCTURE_NAME_NOT_FOUND = 5
* others = 6
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
HTH
Regards,
Dhruv Shah