1 PACKAGE BOM_RTG_NETWORK_API AUTHID CURRENT_USER AS
2 /* $Header: BOMRNWKS.pls 120.2.12010000.2 2008/11/21 13:58:45 svagrawa ship $ */
3
4 TYPE Op_Record_Type IS RECORD
5 ( operation_seq_num NUMBER,
6 operation_sequence_id NUMBER);
7
8 TYPE Op_Tbl_Type IS TABLE OF Op_Record_Type
9 INDEX BY BINARY_INTEGER;
10
11 /*-------------------------------------------------------------------------
12 Name
13 get_all_prior_line_ops
14
15 Description
16 This PROCEDURE gets all the prior line opeartions from the current
17 line operation including line operations on primary and alternate
18 paths. Line Operations on Rework path and standalone line
19 operations are ignored.
20
21 Returns
22 A pl/sql table of Op_Tbl_Type type as IN OUT NOCOPY parameter that includes
23 a list of line operations.
24 +--------------------------------------------------------------------------*/
25 PROCEDURE get_all_prior_line_ops (
26 p_rtg_sequence_id IN NUMBER,
27 p_assy_item_id IN NUMBER,
28 p_org_id IN NUMBER,
29 p_alt_rtg_desig IN VARCHAR2,
30 p_curr_line_op IN NUMBER,
31 x_Op_Tbl IN OUT NOCOPY Op_Tbl_Type );
32
33 /*-------------------------------------------------------------------------
34 Name
35 get_primary_prior_line_ops
36
37 Description
38 This PROCEDURE gets only the PRIMARY prior line opeartions from the
39 current line operation. This includes line operations on the
40 feeder lines.
41 If the current line op is on the alternate path then this
42 API gets all the previous line ops on the alternate path till
43 it hits the primary path and then onwards gets all the
44 line ops in the primary path only.
45 The procedure looks at p_rtg_sequence_id parameter. If
46 p_rtg_sequence_id is null then only it looks at
47 p_assy_item_id,p_org_id,p_alt_rtg_desig to derive
48 routing_sequence_id
49
50 Returns
51 A pl/sql table of Op_Tbl_Type type as IN OUT NOCOPY parameter that includes
52 a list of line operations.
53 +--------------------------------------------------------------------------*/
54 PROCEDURE get_primary_prior_line_ops (
55 p_rtg_sequence_id IN NUMBER,
56 p_assy_item_id IN NUMBER,
57 p_org_id IN NUMBER,
58 p_alt_rtg_desig IN VARCHAR2,
59 p_curr_line_op IN NUMBER,
60 x_Op_Tbl IN OUT NOCOPY Op_Tbl_Type );
61
62 /*-------------------------------------------------------------------------
63 Name
64 get_all_line_ops
65
66 Description
67 This PROCEDURE gets all the line operations on the network for
68 the routing. Standalone line operations are ignored.
69
70 Returns
71 A pl/sql table of Op_Tbl_Type type as IN OUT NOCOPY parameter that includes
72 a list of line operations.
73 +--------------------------------------------------------------------------*/
74 PROCEDURE get_all_line_ops (
75 p_rtg_sequence_id IN NUMBER,
76 p_assy_item_id IN NUMBER,
77 p_org_id IN NUMBER,
78 p_alt_rtg_desig IN VARCHAR2 DEFAULT NULL,
79 x_Op_Tbl IN OUT NOCOPY Op_Tbl_Type );
80
81 /*-------------------------------------------------------------------------
82 Name
83 get_all_primary_line_ops
84
85 Description
86 This PROCEDURE gets all the line operations that are on the
87 primary path on the network for the routing. Line operations on
88 the feeder lines are included. Standalone line operations are
89 ignored.
90 The procedure looks at p_rtg_sequence_id parameter. If
91 p_rtg_sequence_id is null then only it looks at
92 p_assy_item_id,p_org_id,p_alt_rtg_desig to derive
93 routing_sequence_id
94
95 Returns
96 A pl/sql table of Op_Tbl_Type type as IN OUT NOCOPY parameter that includes
97 a list of line operations.
98 +--------------------------------------------------------------------------*/
99 PROCEDURE get_all_primary_line_ops (
100 p_rtg_sequence_id IN NUMBER,
101 p_assy_item_id IN NUMBER,
102 p_org_id IN NUMBER,
103 p_alt_rtg_desig IN VARCHAR2,
104 x_Op_Tbl IN OUT NOCOPY Op_Tbl_Type );
105
106 /*-------------------------------------------------------------------------
107 Name
108 get_all_next_line_ops
109
110 Description
111 This PROCEDURE gets all the next line opeartions from the current
112 line operation including line operations on primary and alternate
113 paths. Line Operations on Rework path and standalone line
114 operations are ignored.
115
116 Returns
117 A pl/sql table of Op_Tbl_Type type as IN OUT NOCOPY parameter that includes
118 a list of line operations.
119 +--------------------------------------------------------------------------*/
120 PROCEDURE get_all_next_line_ops (
121 p_rtg_sequence_id IN NUMBER,
122 p_assy_item_id IN NUMBER,
123 p_org_id IN NUMBER,
124 p_alt_rtg_desig IN VARCHAR2,
125 p_curr_line_op IN NUMBER,
126 x_Op_Tbl IN OUT NOCOPY Op_Tbl_Type );
127
128 /*-------------------------------------------------------------------------
129 Name
130 get_next_line_operation
131
132 Description
133 This FUNCTION returns the next line operation for the current
134 line operation. Following Rules are used.
135 - Get the next line operation on the primary path if primary
136 path exists on the current line operation to the next.
137 - Get the next line operation on the alternate path if primary
138 path does not exist.
139 - Get the lowest line operation if primary does not exist and
140 multiple alternates exist.
141
142 Returns
143 Returns Op_Seq_Num of the next line operation
144 +--------------------------------------------------------------------------*/
145 FUNCTION get_next_line_operation (
146 p_rtg_sequence_id IN NUMBER,
147 p_assy_item_id IN NUMBER,
148 p_org_id IN NUMBER,
149 p_alt_rtg_desig IN VARCHAR2,
150 p_curr_line_op IN NUMBER ) RETURN NUMBER;
151
152 /*-------------------------------------------------------------------------
153 Name
154 check_last_line_op
155
156 Description
157 This fucntion checks whether current line operation is the last
158 operation on the network.
159
160 Returns
161 TRUE if the current operation is the last otherwise FALSE
162 +--------------------------------------------------------------------------*/
163 FUNCTION check_last_line_op (
164 p_rtg_sequence_id IN NUMBER,
165 p_assy_item_id IN NUMBER,
166 p_org_id IN NUMBER,
167 p_alt_rtg_desig IN VARCHAR2,
168 p_curr_line_op IN NUMBER ) RETURN BOOLEAN;
169
170 /* Fixed for bug 7582458 - Removed WNPS */
171 PRAGMA RESTRICT_REFERENCES (get_all_line_ops, WNDS);
172 PRAGMA RESTRICT_REFERENCES (get_all_next_line_ops, WNDS);
173
174 END BOM_RTG_NETWORK_API;