This chapter provides an overview of TreeMover and discusses how to:
Import and export PeopleSoft 8 trees.
Import and export with PeopleSoft 7.x trees.
Customize TreeMover for additional node and level data records.
Note. The flat files for both the import and export processes are located in the working directory for PeopleSoft Application Engine as specified on the Process Type Definition page in PeopleSoft Process Scheduler. You can override this and create another location using the Process Definition Override page.
See Also
Defining Process Type Definitions
This section discusses:
Purpose of TreeMover.
Populated record types.
TreeMover file formats.
TreeMover file rules.
File layout details.
TreeMover enables you to move PeopleSoft trees between different PeopleSoft application databases. It enables you to export a tree to a flat file and to import a tree from a flat file. TreeMover moves all types of tree data, including the tree definition, tree structure, tree nodes, tree leaves, tree node data, and tree level data.
TreeMover does not support branched trees. If you import a branched tree, the branches become regular tree nodes.
Advantages of using TreeMover instead of methods of moving trees (such as Data Mover or custom SQR) include the following:
TreeMover can move trees between different versions of PeopleSoft databases (for example, from a PeopleSoft Financials 7.5 database to a PeopleSoft EPM 8 database).
Tree Mover can move tree node data (description, setID, effective date, and effective status) for trees that have node data stored in the PS_TREE_NODE_TBL (the table that stores the tree node data is specified as part of the tree structure).
Tree Mover can move tree level data (long description, short description, setID, effective date, and effective status) for trees that have level data stored in the PS_TREE_LEVEL_TBL (the table that stores the tree level data is specified as part of the tree structure).
TreeMover uses the tree APIs, which means the same logic used for the PeopleSoft Tree Manager application is used to load and unload trees using TreeMover.
TreeMover enables you to create branches on a tree after it is loaded into PeopleSoft Tree Manager. All the same edit checks are performed on a tree created with TreeMover as are performed on a tree created manually with PeopleSoft Tree Manager, because both use the same functionality to create the tree. Because TreeMover processes are initiated from standard PeopleSoft pages, the ability to import and export tree data can be restricted by using PeopleSoft standard security mechanisms for limiting access to pages.
Here are some examples of things you can do with TreeMover:
Load winter tree with nodes from a legacy financial database quickly and easily into PeopleSoft 8 databases.
Automatically replace an account tree every month with a new tree based on current information.
Easily load a dynamic detail tree using information entered through a spreadsheet.
Note. TreeMover currently supports fixed-format files only.
TreeMover does not support related language tables.
When you export a tree containing text data, the data is saved in the codepage of the server (for example, CP1252 Western
European on English Windows, or CP932 Shift-JIS on Japanese Windows). Any characters which are not valid in the server's
codepage are converted into question mark characters.
TreeMover consists of three parts: a utility to export a tree from a PeopleSoft 8 database, a utility to import a tree into a PeopleSoft 8 database, and a utility to export a tree from a PeopleSoft 7.x database. The import and export functionality for a PeopleSoft 8 database is implemented as a PeopleSoft Application Engine application process. As with other Application Engine processes, they can be scheduled to run automatically from the Process Scheduler. The Application Engine process uses PeopleCode Tree APIs, PeopleCode File APIs, and file layout definitions. The utility that enables you to export trees from a PeopleSoft 7.x database is implemented as an SQR program (TMDOWNLD.SQR).
TreeMover uses the following PeopleTools system tables for trees during both the tree import and tree export processes:
PSTREEDEFN.
PSTREENODE.
PSTREELEAF.
PSTREESTRCT.
PSTREELEVEL.
PS_TREE_LEVEL_TBL.
PS_TREE_NODE_TBL.
TreeMover also reads the PSSTATUS table during the tree export process, to identify the version of the tree data exported.
As delivered, TreeMover uses seven different file layouts. All the data for an exported tree is contained in a single file. Prior to a change in the file layout used for the export file, TreeMover writes a header record to the file to indicate what the next file layout is. The following table lists the standard file formats, along with their actual file layout name and the text of the header record that precedes a given layout data:
File Layout |
Description |
Header Record Text |
TREE_VERSION |
Contains the PeopleTools release number used to create the export data file. If a tree version is not provided, then the TreeMover import program assumes that the tree data is from a database before 8.1. |
999TREE_VERSION |
TREE_STRUCTURE |
Used for data from the PSTREESTRCT table. |
999TREE_STRCT |
TREE_DEFN |
Used for data from the PSTREEDEFN table. |
999TREE_DEFN |
TREE_USERLEVEL |
Used for data from PS_TREE_LEVEL_TBL. |
999TREE_USERLVL |
TREE_LEVEL |
Used for data from the PSTREELEVEL table. |
999TREE_LEVEL |
TREE_USERNODE |
Used for data from PS_TREE_NODE_TBL. |
999TREE_USERND |
TREE_NODE |
Used for data from the PSTREENODE and PSTREELEAF tables. |
999TREE_NODE |
The TreeMover export program processes the data in the order listed in the preceding table.
If you write your own export file, then you must adhere to the following rules:
The Tree Structure record, if present, must always come first in the file. If it is not present, the TreeMover import program defaults to the record layouts used prior to release 8.1.
The Tree Definition record, if present, must come after the Tree Structure record.
The Tree Level records (only for trees with levels) must come before the Tree Node and Leaf records.
The Tree Node and Leaf records are required for any export file.
Prior to the change in the record layout, you must precede the next data record with the appropriate header record for that file format.
The following table illustrates the TreeMover file formats.
999TREE_VERSION Tree Version Data |
999TREE_STRCT Tree Structure Data |
999TREE_DEFN Tree Definition Data |
999TREE_USERLVL Tree Level Data 1 Tree Level Data 2 |
Tree Level Data N |
999TREE_LEVEL Tree Level 1 Tree Level 2 |
Tree Level N |
999TREE_USERND Tree Node Data 1 Tree Node Data 2 |
Tree Node Data N |
999TREE_NODE Tree Node 1 Tree Node 2 |
Tree Detail 1 |
Tree Detail 2 |
Tree Node 3 |
Tree Node 4 |
Tree Node N |
Tree Detail 5 |
Tree Detail N |
TreeMover sample
TreeMover reads these records in the following strict order during an import:
PeopleTools Version (optional).
This record is only needed if loading data from an 8.1 or later PeopleSoft database.
Tree Structure (optional).
This record is only needed if the structures do not already exist. One or more structure records can be loaded.
Tree Definition (required).
The information needed to create a tree. Only one tree definition record can exist in the input file.
Tree Level Data (optional).
The detailed level data for a tree. One or more level data records can exist in the input file.
Tree Levels (required for leveled trees).
The levels defined for the tree. Must include enough to define all the nodes. One or more level records can exist in the input file.
Tree Node Data (optional).
The detailed tree node information (description, effective date, and so on).
Tree nodes and leaves (required).
Tree node and detail information. Each node must contain either a parent node or a previous sibling node. The referenced node (parent or sibling) must precede the node that references it in the input file.
Detail values for a tree must exist in the database before importing the tree.
One or more node records listed in level plus sibling order (that is, the root node on the first level, nodes on the second level, and so on) can exist in the input file.
Each record starts with a unique identifier for that record type, followed by the associated column data. All data is in a fixed format.
Tree Structure Layout (TREE_STRUCTURE)
For the Tree Structure layout, most column names map directly to the PSTREESTRCT record.
Note. Tree structure record is optional if the database already has the structure defined for the new tree.
The following table provides file layout details:
Column Name |
Column Type |
Length |
Start Position |
End Position |
Comments |
File Record ID |
Number |
1 |
1 |
1 |
Always 1. |
UPDATE_ACTION |
Character |
1 |
2 |
2 |
Always A (only add mode is supported at this time) |
TREE_STRCT_ID |
Character |
18 |
3 |
20 |
None |
DESCR |
Character |
30 |
21 |
50 |
None |
TREE_STRCT_TYPE |
Character |
1 |
51 |
51 |
None |
DYNAMIC_RANGE |
Character |
1 |
52 |
52 |
Y or N |
SETCNTRL_IND |
Character |
1 |
53 |
53 |
S, B, U, or N |
LEVEL_RECNAME |
Character |
15 |
54 |
68 |
None |
LEVEL_PNLNAME |
Character |
18 |
69 |
86 |
None |
LEVEL_MENUNAME |
Character |
30 |
87 |
116 |
None |
LEVEL_BARNAME |
Character |
30 |
117 |
146 |
None |
NODE_RECNAME |
Character |
15 |
147 |
161 |
None |
NODE_PNLNAME |
Character |
18 |
162 |
179 |
None |
NODE_FIELDNAME |
Character |
18 |
180 |
197 |
None |
SETCNTRLFLD |
Character |
18 |
198 |
215 |
None |
NODE_MENUNAME |
Character |
30 |
216 |
245 |
None |
NODE_BARNAME |
Character |
30 |
246 |
275 |
None |
DTL_RECNAME |
Character |
15 |
276 |
290 |
None |
DTL_FIELDNAME |
Character |
18 |
291 |
308 |
None |
DTL_PNLNAME |
Character |
18 |
309 |
326 |
None |
DTL_MENUNAME |
Character |
30 |
327 |
356 |
None |
DTL_BARNAME |
Character |
30 |
357 |
386 |
None |
DTL_SETID |
Character |
5 |
387 |
391 |
None |
SETCNTRLVALUE |
Character |
20 |
392 |
411 |
None |
DTL_TREE_NAME |
Character |
18 |
412 |
429 |
None |
DTL_TREE_LEVEL_NUM |
Character |
5 |
430 |
434 |
None |
LEVEL_PNLGRPNAME |
Character |
50 |
436 |
485 |
Only for release 8.1 and greater. |
NODE_PNLGRPNAME |
Character |
50 |
487 |
536 |
Only for release 8.1 and greater. |
DTL_PNLGRPNAME |
Character |
50 |
538 |
587 |
Only for release 8.1 and greater. |
LEVEL_ITEMNAME |
Character |
30 |
589 |
618 |
Only for release 8.1 and greater. |
NODE_ITEMNAME |
Character |
30 |
620 |
649 |
Only for release 8.1 and greater. |
DTL_ITEMNAME |
Character |
30 |
651 |
680 |
Only for release 8.1 and greater. |
TreeMover Tree Definition Layout (TREE_DEFN)
The tree definition record columns require either a tree structure defined in the database or a previous tree structure record in the file. For the Tree Definition layout, most column names map directly to the PSTREEDEFN record.
The following table provides tree definition layout details:
Column Name |
Column Type |
Length |
Start Position |
End Position |
Comments |
File Record ID |
Number |
1 |
1 |
1 |
Always 2. |
UPDATE_ACTION |
Character |
1 |
2 |
2 |
Always A (only add is mode supported at this time). |
SETID |
Character |
5 |
3 |
7 |
None |
SETCNTRLVALUE |
Character |
20 |
8 |
27 |
None |
TREE_NAME |
Character |
18 |
28 |
45 |
None |
EFFDT |
Date |
10 |
46 |
55 |
YYYY-MM-DD format. |
TREE_STRCT_ID |
Character |
18 |
56 |
73 |
None |
DESCR |
Character |
30 |
74 |
103 |
None |
NODE_COUNT |
Character |
10 |
104 |
113 |
None |
ALL_VALUES |
Character |
1 |
114 |
114 |
Y or N |
USE_LEVELS |
Character |
1 |
115 |
115 |
S, L, or N |
DUPLICATE_LEAF |
Character |
1 |
116 |
116 |
Y or N |
TREE_CATEGORY |
Character |
18 |
117 |
134 |
None |
EFF_STATUS |
Character |
1 |
135 |
135 |
None |
TREE_ACC_METHOD |
Character |
1 |
136 |
136 |
None |
TREE_ACC_SELECTOR |
Character |
1 |
137 |
137 |
None |
TREE_ACC_SEL_OPT |
Character |
1 |
138 |
138 |
None |
LEAF_COUNT |
Character |
10 |
139 |
148 |
None |
TREE_IMAGE |
Character |
30 |
139 |
168 |
Only for Release 8.1 and greater. |
BRANCH_IMAGE |
Character |
30 |
170 |
199 |
Only for Release 8.1 and greater. |
NODECOL_IMAGE |
Character |
30 |
201 |
230 |
Only for Release 8.1 and greater. |
NODEEXP_IMAGE |
Character |
30 |
232 |
261 |
Only for Release 8.1 and greater. |
LEAF_IMAGE |
Character |
30 |
263 |
292 |
Only for Release 8.1 and greater. |
Tree User Level Data Layout (TREE_USERLEVEL)
The columns in this layout correspond to the columns in the TREE_LEVEL_TBL record.
The following table provides tree user level data layout details:
Column Name |
Column Type |
Length |
Start Position |
End Position |
Comments |
File Record ID |
Number |
1 |
1 |
1 |
Always 3. |
UPDATE_ACTION |
Character |
1 |
2 |
2 |
Always A (only add mode is supported at this time). |
SETID |
Character |
5 |
3 |
7 |
None |
TREE_LEVEL |
Character |
10 |
8 |
17 |
None |
EFFDT |
Date |
10 |
18 |
27 |
YYYY-MM-DD format. |
EFF_STATUS |
Character |
1 |
28 |
28 |
None |
DESCR |
Character |
30 |
29 |
58 |
None |
DESCRSHORT |
Character |
10 |
59 |
68 |
None |
Tree Level Record Layout (TREE_LEVEL)
The tree level layout requires a tree definition record in the file previous to this record type. The columns in this layout correspond to the columns in the PSTREELEVEL record.
Note. No-level records should be defined for no-level trees.
The following table provides tree level layout details:
Column Name |
Column Type |
Length |
Start Position |
End Position |
Comments |
File Record ID |
Number |
1 |
1 |
1 |
Always 4. |
UPDATE_ACTION |
Character |
1 |
2 |
2 |
Always A (only add mode is supported at this time). |
TREE_LEVEL |
Character |
10 |
3 |
12 |
None |
TREE_LEVEL_NUM |
Character |
3 |
13 |
15 |
None |
ALL_VALUES |
Character |
1 |
16 |
16 |
Y or N |
Tree Node Data Layout (TREE_USERNODE)
The columns in this layout correspond to the columns in the TREE_NODE_TBL record.
The following table provides tree node data layout details:
Column Name |
Column Type |
Length |
Start Position |
End Position |
Comments |
File Record ID |
Number |
1 |
1 |
1 |
Always 5. |
UPDATE_ACTION |
Character |
1 |
2 |
2 |
Always A (only add mode is supported at this time). |
SETID |
Character |
5 |
3 |
7 |
None |
TREE_NODE |
Character |
20 |
8 |
27 |
None |
EFFDT |
Date |
10 |
28 |
37 |
YYYY-MM-DD format. |
EFF_STATUS |
Character |
1 |
38 |
38 |
None |
DESCR |
Character |
30 |
39 |
68 |
None |
Tree Node Record Columns (TREE_NODE)
Tree node record columns require a tree definition record in the file previous to this record type and level records if the tree has levels. Node records must have parents defined before their children. Detail records can be interspersed between node records.
Note. Node type is either G or R. G is for standard nodes, and R is for Query Access Group record nodes. Branch nodes are not supported at this time.
The following table provides tree node record details:
Column Name |
Column Type |
Length |
Start Position |
End Position |
Comments |
File Record ID |
Number |
1 |
1 |
1 |
Always 6. |
UPDATE_ACTION |
Character |
1 |
2 |
2 |
Always A (only add mode is supported at this time). |
TREE_NODE |
Character |
20 |
3 |
22 |
Only for node records. |
PARENT_NODE_NAME |
Character |
20 |
23 |
42 |
Tree TREE_NODE for the parent node of the node or detail. |
TREE_NODE_TYPE |
Character |
1 |
43 |
43 |
Only for node records; must be G or R. |
TREE_LEVEL_NUM |
Character |
3 |
44 |
46 |
Only for node records. |
TREE_NODE_PREV_SIB |
Character |
20 |
47 |
66 |
Only for node records. |
RANGE_FROM |
Character |
30 |
67 |
96 |
Only for detail records. |
RANGE_TO |
Character |
30 |
97 |
126 |
Only for detail records. |
DYNAMIC_RANGE |
Character |
1 |
127 |
127 |
Only for detail records; must be Y or N. |
LEAF_IMAGE |
Character |
30 |
129 |
158 |
Only for Release 8.1 and greater. |
NODECOL_IMAGE |
Character |
8 |
160 |
167 |
Only for Release 8.1 and greater. |
NODEEXP_IMAGE |
Character |
8 |
169 |
176 |
Only for Release 8.1 and greater. |
This section provides an overview of using TreeMover with PeopleSoft 8 databases and discusses how to:
Export PeopleSoft 8 trees to an external file.
Import PeopleSoft 8 trees from an external file.
As with other PeopleSoft Application Engine processes, you initiate the TreeMover process from PeopleSoft pages. You need to submit a few required parameters at run time, including the file name for each tree import (load) or tree export (unload). You can run TreeMover each time you need to load or unload a tree, or you can set PeopleSoft Process Scheduler to run a tree load or unload process automatically.
To view the results of TreeMover processes, perform the following from the Tree Import or Tree Export page:
Click the Process Monitor link.
The Process List page appears. The run status for your process will appear as Success, No Success, or Warning.
Note. If you receive a No Success or Warning status, you should also review the TreeMover log file. This file may include additional information that the Process Monitor does not include.
Click the Details link.
The Process Detail page appears.
Click the Message Log button.
Click the Explain button for further details on each message.
You can also choose to view the log output file. To find this file, navigate to the log_output directory (the location of the log_output directory is specified in the Process Scheduler configuration file). Once in the log_output directory, navigate to the following: /AE_TREEMOVER_<PROCESS_ID>/TreeMover-<Date-Time>.log.
The following provides an example of the full path to the log output file (the italicized portion of the path is specified in the Process Scheduler configuration file):
C:\PTools845_104A\APPSERV\PRCS\MD845104\log_output\AE_TREEMOVER_9999938\TreeMover-2004-02-10-16.22.55.log
The following is a sample log file:
TreeMover log file
The delivered TreeMover application can move only tree node data that is associated with the PS_TREE_NODE_TBL and only tree level data that is associated with the PS_TREE_LEVEL_TBL. You can modify TreeMover to support other tables for node and level data.
Note. When a tree replaces an existing tree using the Tree Import Utility, the system will import a new tree using a unique name
and check if the tree creation process is successful. If the tree creation process turns out to be successful, the system
will delete the existing tree and rename the newly created tree. If the import file from which you are importing is corrupted,
you will not lose your existing tree.
Also, if the existing tree was secured by Definition Security, it will be automatically removed from the Definition Security
Group at the time of deletion. Because the removal of the tree from the Definition Security Group occurs prior to the import,
the utility has no knowledge of the tree being secured, and therefore the new tree will have to be manually secured after
the import is complete.
See Also
Modifying the TreeMover Application Engine Program
Page Name |
Object Name |
Navigation |
Usage |
Tree Export |
RUN_TREEMOVER_EXP |
Export trees using TreeMover. |
|
Tree Import |
RUN_TREEMOVER_IMP |
Import trees using TreeMover. |
Access the Tree Export page.
To export a tree to an external file:
Enter the correct output file name.
The flat file is sent to the working directory for PeopleSoft Application Engine as specified on the Process Type Definition page in Process Scheduler. If this is not the location you want, enter the valid path name for the directory on the application server that runs the process.
Enter the tree name, effective date, and tree key value.
Note. The tree key value applies to only setID, business unit, or user-defined key trees (tree key type is set in the tree structure). For trees that have no additional key value, the field is not available.
Select the tree data to export.
You can export the tree structure data, the tree definition, the tree levels, the tree level data, the tree nodes and leaves, and the tree node data. You will probably want to export the tree definition, tree level, and tree node/leaf data.
Note. You will need to select Tree Structure if the tree structure does not already exist in the target database. You can also select Tree User Level to move related data from the PS_TREE_LEVEL_TBL table and select Tree User Nodes to move related data from the PS_TREE_NODE_TBL.
Click Run to move the tree.
Verify that the settings on the Process Scheduler Request page are correct and click OK to run the process.
Check the run status in the Process Monitor. If an Error or Warning status exists for the process, you should check the TreeMover log file which may contain additional information that describes the problem. Potential problems are not limited to—but may include—the following:
You tried to export tree level data and the tree has no levels.
You tried to export tree user level data and the tree does not use the PS_TREE_LEVEL_TBL for level data.
You tried to export tree user node data and the tree does not use the PS_TREE_NODE_TBL.
Access the Tree Import page.
Note. The Windows version of PeopleSoft Tree Manager will allow users to enter tree node names containing the two special wildcard characters, ? and *. However, the Web version of PeopleSoft Tree Manager does not accept these characters. To prevent creating a corrupted tree, the Tree Import utility now checks for invalid tree node names.
To import an existing PeopleSoft tree:
Enter the correct input file name.
The flat file is sent to the working directory for PeopleSoft Application Engine as specified on the Process Type Definition page in PeopleSoft Process Scheduler. If this is not the location you want, enter the valid path name for the directory on the application server that runs the process.
Select a save method.
By default, you should use Save. However, if you think the tree might not pass all the PeopleSoft tree audits, then select Save Draft. Save Draft saves the tree in draft mode and functions just as Save Draft does in PeopleSoft Tree Manager.
If the tree already exists in your database, select Replace Tree if Exists.
Note. If the tree already exists in your database and you do not select the check box, the tree will not be imported.
Select Load Tree Defn from File (load tree definition from file) if the tree definition is contained in the input file and you want to load the tree with the same tree definition values.
Note. In most cases, you will want to load the tree definition from the file. If you select this option and the tree definition does not exist in the input file, then the load process will fail.
Enter the basic tree information if you are not loading the tree definition from the input file.
If you are not loading the tree definition from the input file, then you will be required to specify all the basic tree information on the run control page. These fields correspond to the same values that you’d have to enter if you were creating the tree using PeopleSoft Tree Manager. TreeMover skips the input record that contains the tree definition information and instead use the values that you enter.
You must load the tree definition from the file if you’re also loading the tree structure from the file. If you try to load the structure from the file, but have overridden the definition values on the page, then the process will not run completely.
TreeMover only loads a new tree structure if the structure doesn't already exist.
Note. If your TreeMover data file contains user level data or user node data and you are changing the setID of your tree on import, the user data will retain the original setID. TreeMover import does not support the changing of user data setIDs.
Click Run to move the tree.
Verify the successful completion of the process by checking the run status of the process in the Process Monitor. If you receive either a run status of Warning or No Success, view the message log explanations for details and recommendations. You should also view the TreeMover log for more information.
Note. You can also check the log file. If the process completed successfully, the log file will state PeopleSoft TreeMover Completed Successfully.
If you’re loading a tree that contains detail values, then those detail values must exist in the target database before you
load the tree. If they do not exist, then the tree import process will fail.
This section provides an overview of the TMDOWNLD SQR and discusses how to:
Install the SQR program.
Run the SQR program.
TreeMover provides the TMDOWNLD SQR program for unloading a PeopleSoft tree from a PeopleSoft 7 or 7.5 database. (The SQR should also work against a PeopleSoft 6 database, but it has not been tested against that version and is not certified for it.) This program exports most of the same tree information as the Tree Export functionality provided with PeopleTools 8. Differences include:
Tree categories are not exported; the category defaults to DEFAULT.
Tree performance options are not exported.
Tree structures are not exported.
To install the TMDOWNLD SQR program copy the TMDOWNLD.SQR file from your PeopleTools 8 PS_HOME/SQR directory to the SQR directory for your PeopleTools 7 or 7.5 install.
Note. If you do not have a copy of TMDOWNLD.SQR, contact PeopleSoft Customer Service.
When you run this SQR against a given version of a PeopleSoft database, you must run it with the common SQC files that are delivered for that PeopleTools version. For example, if you run it against a PeopleSoft 7 database, you should run it so that it uses the SQC files delivered with PeopleTools 7. Otherwise, the process will not run correctly.
To run the TMDOWNLD SQR program:
Run the TMDOWNLD SQR program from the SQR command line.
Follow the system prompts.
Note. There is no associated run control page with this SQR for PeopleSoft 7 or 7.5 databases. In order to schedule this process to run without manual intervention, you will need to create a run control for the process. See your PeopleTools manual for more information on creating run controls.
See Also
SQR documentation
Introducing the Sample SQR Program
This section discusses how to:
Modify the TreeMover Application Engine program.
Modify the TreeMover SQR program.
The TreeMover program only moves data in the standard PeopleSoft tree tables. PeopleSoft trees generally have application node data stored in the PS_TREE_NODE_TBL table and application level data stored in the PS_TREE_LEVEL_TBL table.
However, the tables used to hold the application data for the detail values, such as leaves, are always application-specific; there are no default tables for storing that application data. For example, you might have trees that reference employees as leaf values, and the employee information is stored in the PERSONAL_DATA_TBL. TreeMover does not handle moving data from application tables. Generally, when you move trees between different PeopleSoft databases, you should move the application data using other means, such as with DataMover. However, you can also customize the TreeMover program to copy other application data. As with any PeopleSoft application, you should avoid performing any customizations whenever possible.
Note. Before customizing TreeMover, you should consider the tables that you intend to add support for. Application tables that hold data used by other parts of the PeopleSoft system should be moved by other means, such as DataMover.
The TreeMover process is a PeopleSoft Application Engine process called TREEMOVER. To add support for additional node and level tables, you have to perform two basic steps: create the file layout to be used for the new data and modify the TREEMOVER_AET PeopleCode according to the following steps.
Note. You should not need to make any modifications to the actual Application Engine code.
To modify the TreeMover Application Engine program:
Create file layouts for your desired tree node data record or tree level data record using Application Designer file layout functionality.
Use one of the existing TreeMover file layouts as an example (TREE_DEFN, TREE_NODE, and so on). Each file layout you add for TreeMover must have a unique file record ID (specified as part of the file layout record properties); the existing TreeMover file layouts use numbers 1−6.
Each file layout you add must also have the UPDATE_ACTION field.
In the TREEMOVER_AET record, modify the PROCESS_INSTANCE FieldFormula PeopleCode as follows:
In the isValidUserNodeRec function, add your desired PeopleSoft records for node data to the condition check.
In the isValidUserLevelRec function, add your desired PeopleSoft records for level data to the condition check.
In the setUserNodeRecLayout function, add code to set the correct file layout based on the node data record.
In the setUserLevelRecLayout function, add code to set the correct file layout based on the level data record.
In the getUserNodeData function, add code to get data from your new node records.
In the getUserLevelData function, add code to get data from your new level records.
Note. In the steps above, do not modify the original code in the functions. You should add new code only within new “if” conditions. If you change any of the existing code, trees based on the PS_TREE_LEVEL_TBL and PS_TREE_NODE_TBL will no longer be handled with TreeMover.
If you have modified the TREEMOVER Application Engine program, then you will also need to make similar changes to the TMDOWNLD.SQR, assuming you’re using that SQR to download trees from a PeopleSoft 7.x database.
To modify the TMDOWNLD SQR program:
Change the Download-TreeUserLevel procedure to handle the new tree level data tables.
Be sure to add conditional logic so that the existing logic is still executed when the tree structure uses PS_TREE_LEVEL_TBL. The tree level record name is stored in the variable &TS.LEVEL_RECNAME.
Change the Download-TreeUserNode procedure to handle the new tree node data tables.
Be sure to add conditional logic so that the existing logic is still executed when the tree structure uses PS_TREE_NODE_TBL. The tree node record name is stored in the variable &TS.NODE_RECNAME.