1 PACKAGE AHL_MC_TREE_PVT AUTHID CURRENT_USER AS
2 /* $Header: AHLVMCTS.pls 120.1 2005/07/04 02:27:15 tamdas noship $ */
3
4 G_PKG_NAME CONSTANT VARCHAR2(30) := 'AHL_MC_TREE_PVT';
5
6 -------------------------------
7 -- Define records and tables --
8 -------------------------------
9
10 -- Key for the OUT params
11 -- HAS_SUBCONFIGS = Should be used to display / hide the subconfiguration association table
12 -- IS_SUBCONFIG_NODE = Should be passed to the right-frame for displaying subconfiguration edit page
13 -- IS_SUBCONFIG_TOPNODE = Can be used if needed, indicates whether the node is a root node of the subconfiguration
14 -- IS_PARENT_SUBCONFIG = Can be used if needed, indicates whether the parent node is a subconfiguration node itself
15 -- POSITION_PATH = Encoded position path of the particular node
16 -- POSITION_PATH_ID = Position path ID created for the particular node, null if no record exists in position path tables
17 -- MC_HEADER_ID = The mc_header_id of the node, the subconfig mc_header_id if the node is a subconfig node
18 -- MC_ID = The mc_id of the MC that has the particular node, the subconfig's mc_id if the node is a subconfig node
19 -- VERSION_NUMBER = The version_number of the MC that has the particular node, the subconfig's version_number if the node is a subconfig node
20 -- CONFIG_STATUS_CODE = The config_status_code of the MC that has the particular node, the subconfig's config_status_code if the node is a subconfig node
21
22 TYPE Tree_Node_Rec_Type IS RECORD
23 (
24 RELATIONSHIP_ID NUMBER,
25 OBJECT_VERSION_NUMBER NUMBER,
26 POSITION_KEY NUMBER,
27 PARENT_RELATIONSHIP_ID NUMBER,
28 ITEM_GROUP_ID NUMBER,
29 POSITION_REF_CODE VARCHAR2(30),
30 POSITION_REF_MEANING VARCHAR2(80),
31 --R12
32 --priyan MEL-CDL
33 ATA_CODE VARCHAR2(30),
34 ATA_MEANING VARCHAR2(80),
35
36 POSITION_NECESSITY_CODE VARCHAR2(30),
37 POSITION_NECESSITY_MEANING VARCHAR2(80),
38 UOM_CODE VARCHAR2(30),
39 QUANTITY NUMBER,
40 DISPLAY_ORDER NUMBER,
41 ACTIVE_START_DATE DATE,
42 ACTIVE_END_DATE DATE,
43
44 NUM_CHILD_NODES NUMBER := 0,
45 HAS_SUBCONFIGS VARCHAR2(1) := 'F',
46 IS_SUBCONFIG_NODE VARCHAR2(1) := 'F',
47 IS_SUBCONFIG_TOPNODE VARCHAR2(1) := 'F',
48 IS_PARENT_SUBCONFIG VARCHAR2(1) := 'F',
49
50 POSITION_PATH VARCHAR2(4000),
51 POSITION_PATH_ID NUMBER,
52
53 MC_HEADER_ID NUMBER,
54 MC_ID NUMBER,
55 VERSION_NUMBER NUMBER,
56 CONFIG_STATUS_CODE VARCHAR2(30)
57 );
58
59 TYPE Tree_Node_Tbl_Type IS TABLE OF Tree_Node_Rec_Type INDEX BY BINARY_INTEGER;
60
61 -----------------------
62 -- Define procedures --
63 -----------------------
64 -- Start of Comments --
65 --
66 -- Procedure name : Get_MasterConfig_Nodes
67 -- Type : Private
68 -- Function : Get MC Tree Nodes for Left frame UI
69 -- Pre-reqs :
70 --
71 -- Standard IN Parameters :
72 -- p_api_version IN NUMBER Required
73 --
74 -- Standard OUT Parameters :
75 -- x_return_status OUT VARCHAR2 Required
76 -- x_msg_count OUT NUMBER Required
77 -- x_msg_data OUT VARCHAR2 Required
78 --
79 -- Get_MasterConfig_Nodes Parameters :
80 -- p_mc_header_id IN NUMBER
81 -- p_parent_rel_id IN NUMBER
82 -- p_is_parent_subcongfig IN VARCHAR2 Default 'F'
83 -- p_parent_pos_path IN VARCHAR2
84 -- p_isTopConfigNode IN VARCHAR2 Default 'F'
85 -- p_isSubConfigNode IN VARCHAR2 Default 'F'
86 -- x_tree_node_tbl OUT Tree_Node_Tbl_Type
87 --
88 -- Key to call this API, input params to be passed
89 -- MC Root Node
90 -- p_mc_header_id = <header-id of the MC>
91 -- p_parent_rel_id = null
92 -- p_is_parent_subconfig = 'F'
93 -- p_parent_pos_path = null
94 -- p_is_top_config_node = 'T'
95 -- p_is_sub_config_node = 'F'
96 --
97 -- MC Node (except root node)
98 -- p_mc_header_id = <header-id of the MC>
99 -- p_parent_rel_id = <relationship-id of the MC Node>
100 -- p_is_parent_subconfig = 'F'
101 -- p_parent_pos_path = <position path of the parent-node>
102 -- p_is_top_config_node = 'F'
103 -- p_is_sub_config_node = 'F'
104 --
105 -- Subconfig Root Node (any level deep)
106 -- p_mc_header_id = <header-id of the subconfig>
107 -- p_parent_rel_id = <relationship-id of the MC node to which the subconfig is to be attached>
108 -- p_is_parent_subconfig = 'F' (if the MC node to which the subconfig is to be attached is not a subconfig itself, else 'T'>
109 -- p_parent_pos_path = <position path of the MC node to which the subconfig is to be attached>
110 -- p_is_top_config_node = 'T'
111 -- p_is_sub_config_node = 'T'
112 --
113 -- Subconfig Node (except root node, any level deep)
114 -- p_mc_header_id = <header-id of the subconfig>
115 -- p_parent_rel_id = <relationship-id of the subconfig node>
116 -- p_is_parent_subconfig = 'T'
117 -- p_parent_pos_path = <position path of the subconfig node>
118 -- p_is_top_config_node = 'F'
119 -- p_is_sub_config_node = 'T'
120 --
121 -- End of Comments --
122 PROCEDURE Get_MasterConfig_Nodes
123 (
124 p_api_version IN NUMBER,
125 x_return_status OUT NOCOPY VARCHAR2,
126 x_msg_count OUT NOCOPY NUMBER,
127 x_msg_data OUT NOCOPY VARCHAR2,
128 p_mc_header_id IN NUMBER,
129 p_parent_rel_id IN NUMBER,
130 p_is_parent_subconfig IN VARCHAR2 := 'F',
131 p_parent_pos_path IN VARCHAR2,
132 p_is_top_config_node IN VARCHAR2 := 'F',
133 p_is_sub_config_node IN VARCHAR2 := 'F',
134 x_tree_node_tbl OUT NOCOPY Tree_Node_Tbl_Type
135 );
136
137 End AHL_MC_TREE_PVT;