Tree Class
Tree objects are instantiated from a session object with the GetTree method.
The following code sample gets a tree, then opens the tree structure associated with that tree:
Local string &TREE_NAME;
Local string &TREE_DT;
Local ApiObject &MYSESSION, &VC_TREE, &STRUCT;
/* Get and Open the Tree using the Tree API */
&MYSESSION = %Session;
/* Get the Tree Name and Effective Date from the level 0 record */
&TREE_NAME = "CUSTOMER";
&TREE_DT = "1900-01-01";
/* Get and Open the Tree */
&VC_TREE = &MYSESSION.GetTree();
/* open the tree with read access only */
&VC_TREE.OPEN("BKINV", "", &TREE_NAME, &TREE_DT, "", False);
/* Get and Open Tree Structure */
&STRUCT = VC_TREE.Structure;
See GetTree.