1 PACKAGE WSMPOPRN AS
2 /* $Header: WSMOPRNS.pls 120.3 2006/08/30 04:13:00 skaradib noship $ */
3
4 l_debug VARCHAR2(1) := FND_PROFILE.VALUE('MRP_DEBUG'); -- czh:BUG1995161
5 g_aps_wps_profile VARCHAR2(1);
6
7
8 /* EXPLODE_ROUTING
9
10 This package creates operations, operation_resources, and
11 operation_instructions for a job. It does not attempt
12 to schedule; instead it sets all operation and resource
13 start and end dates to the date parameters passed to this
14 routine.
15
16 You should pass a P_Commit of 1 unless called from the Customized
17 Move transaction form
18 */
19
20 PROCEDURE Add_Operation(
21 p_transaction_type_id IN NUMBER,
22 P_Commit IN NUMBER,
23 X_Wip_Entity_Id IN NUMBER,
24 X_Organization_Id IN NUMBER,
25 X_From_Op IN NUMBER,
26 X_To_Op IN NUMBER,
27 --NSO Modification by abedajna
28 X_Standard_Operation_Id IN NUMBER,
29 X_Op_Seq_Id IN NUMBER,
30 x_error_code OUT NOCOPY NUMBER,
31 x_error_msg OUT NOCOPY VARCHAR2);
32
33 PROCEDURE Add_Operation(
34 p_transaction_type_id IN NUMBER,
35 P_Commit IN NUMBER,
36 X_Wip_Entity_Id IN NUMBER,
37 X_Organization_Id IN NUMBER,
38 X_From_Op IN NUMBER,
39 X_To_Op IN NUMBER,
40 --NSO Modification by abedajna
41 X_Standard_Operation_Id IN NUMBER,
42 X_Op_Seq_Id IN NUMBER,
43 x_error_code OUT NOCOPY NUMBER,
44 x_error_msg OUT NOCOPY VARCHAR2,
45 p_txn_quantity IN NUMBER,
46 p_reco_op_flag IN VARCHAR2,
47 p_to_rtg_op_seq_num IN NUMBER,
48 p_txn_date IN DATE,
49 p_dup_val_ignore IN VARCHAR2,
50 p_jump_flag IN VARCHAR2);
51
52
53 --bug 3595728 added a new parameter p_txn_date
54 PROCEDURE Disable_operations (
55 x_Wip_entity_id IN NUMBER,
56 x_Organization_id IN NUMBER,
57 x_From_op IN NUMBER,
58 x_error_code OUT NOCOPY NUMBER,
59 x_err_msg OUT NOCOPY VARCHAR2,
60 p_txn_date IN DATE);
61
62
63 PROCEDURE Delete_Operation(
64 X_Wip_Entity_Id IN NUMBER,
65 X_Organization_id IN NUMBER,
66 -- X_From_Op IN NUMBER,
67 X_To_Op IN NUMBER,
68 x_error_code OUT NOCOPY NUMBER,
69 x_error_msg OUT NOCOPY VARCHAR2);
70
71 /* This procedure ensures that WIP_OPERATIONS.previous_operation_seq_num
72 and WIP_OPERATIONS.next_operation_seq_num are correct following
73 insert or deletion of an operation
74 */
75 PROCEDURE set_prev_next
76 (X_wip_entity_Id IN NUMBER,
77 X_organization_Id IN NUMBER,
78 x_error_code OUT NOCOPY NUMBER,
79 x_error_msg OUT NOCOPY VARCHAR2);
80
81 PROCEDURE create_op_details
82 (X_wip_entity_Id IN NUMBER,
83 X_organization_Id IN NUMBER,
84 X_op_seq_num IN NUMBER,
85 x_error_code OUT NOCOPY NUMBER,
86 x_error_msg OUT NOCOPY VARCHAR2);
87
88 /* This procedure selects the operation seq and step that has quantity
89 in it for a given Wip Entity Id. For semicon implementation, there
90 is guaranteed to be only one such operation
91
92 The procedure also returns the next mandatory step within the
93 operation if there is one. It will return a value of 0 if there is no
94 remaining mandatory step in the operation.
95
96 Possible values returned for steps are:
97 WIP_CONSTANTS.QUEUE
98 WIP_CONSTANTS.RUN
99 WIP_CONSTANTS.TOMOVE
100 */
101
102 PROCEDURE get_current_op (
103 p_wip_entity_id IN NUMBER,
104 p_current_op_seq OUT NOCOPY NUMBER,
105 p_current_op_step OUT NOCOPY NUMBER,
106 p_next_mand_step OUT NOCOPY NUMBER,
107 x_error_code OUT NOCOPY NUMBER,
108 x_error_msg OUT NOCOPY VARCHAR2);
109
110 /* This function returns the next mandatory step in an operation
111 given the current step and the mandatory_steps_flag (1-8) which
112 indicates what the mandatory steps are within an operation
113
114 Possible return values are:
115 WIP_CONSTANTS.QUEUE
116 WIP_CONSTANTS.RUN
117 WIP_CONSTATNS.TOMOVE
118 0 (indicating there is no remaining mandatory step)
119 */
120
121 FUNCTION get_intra_operation_value
122 (p_std_op_id IN NUMBER,
123 x_error_code OUT NOCOPY NUMBER,
124 x_error_msg OUT NOCOPY VARCHAR2
125 ) RETURN NUMBER;
126
127 /* This function returns the value for queue, run and to move
128 from mfg_lookups for the standard_operation_id
129 */
130
131 FUNCTION get_next_mandatory_step(x_step IN NUMBER, x_flag IN NUMBER)
132 RETURN NUMBER;
133
134 PROCEDURE get_sec_inv_loc(
135 p_routing_seq_id IN NUMBER,
136 x_secondary_invetory_name OUT NOCOPY VARCHAR2,
137 x_secondary_locator OUT NOCOPY NUMBER,
138 x_error_code OUT NOCOPY NUMBER,
139 x_error_msg OUT NOCOPY VARCHAR2);
140
141 FUNCTION update_job_name (
142 p_wip_entity_id IN NUMBER,
143 p_subinventory IN VARCHAR2,
144 p_org_id IN NUMBER,
145 p_txn_type IN NUMBER,
146 /*BA#1803065*/
147 p_dup_job_name OUT NOCOPY VARCHAR2,
148 /*EA#1803065*/
149 x_error_code OUT NOCOPY NUMBER,
150 x_error_msg OUT NOCOPY VARCHAR2
151 ) return VARCHAR2;
152
153 FUNCTION update_job_name (
154 p_wip_entity_id IN NUMBER,
155 p_subinventory IN VARCHAR2,
156 p_org_id IN NUMBER,
157 p_txn_type IN NUMBER,
158 p_update_flag IN BOOLEAN,
159 /*BA#1803065*/
160 p_dup_job_name OUT NOCOPY VARCHAR2,
161 /*EA#1803065*/
162 x_error_code OUT NOCOPY NUMBER,
163 x_error_msg OUT NOCOPY VARCHAR2
164 ) return VARCHAR2;
165
166 /*BA#1803065*/
167 PROCEDURE update_job_name1 (
168 p_wip_entity_id IN NUMBER,
169 p_org_id IN NUMBER,
170 p_reentered_job_name IN OUT NOCOPY VARCHAR2,
171 x_error_code OUT NOCOPY NUMBER,
172 x_error_msg OUT NOCOPY VARCHAR2
173 );
174 /*EA#1803065*/
175
176 --Bug 2328947
177 PROCEDURE rollback_before_add_operation;
178
179 PROCEDURE copy_plan_to_execution(x_error_code OUT NOCOPY NUMBER
180 , x_error_msg OUT NOCOPY VARCHAR2
181 , p_org_id IN NUMBER
182 , p_wip_entity_id IN NUMBER
183 , p_to_job_op_seq_num IN NUMBER
184 , p_to_rtg_op_seq_num IN NUMBER
185 , p_to_op_seq_id IN NUMBER
186 , p_reco_op_flag IN VARCHAR2
187 , p_txn_quantity IN NUMBER
188 , p_txn_date IN DATE
189 , p_user IN NUMBER
190 , p_login IN NUMBER
191 , p_request_id IN NUMBER
192 , p_program_application_id IN NUMBER
193 , p_program_id IN NUMBER
194 , p_dup_val_ignore IN VARCHAR2
195 , p_start_quantity IN NUMBER);
196
197 PROCEDURE call_infinite_scheduler(
198 x_error_code OUT NOCOPY NUMBER,
199 x_error_msg OUT NOCOPY VARCHAR2,
200 p_jump_flag IN VARCHAR2,
201 p_wip_entity_id IN NUMBER,
202 p_org_id IN NUMBER,
203 p_to_op_seq_id IN NUMBER,
204 p_fm_job_op_seq_num IN NUMBER,
205 p_to_job_op_seq_num IN NUMBER,
206 p_scheQuantity IN NUMBER);
207
208 --mes
209 Procedure copy_to_op_mes_info(
210 p_wip_entity_id IN NUMBER
211 , p_to_job_op_seq_num IN NUMBER
212 , p_to_rtg_op_seq_num IN NUMBER
213 , p_txn_quantity IN NUMBER
214 , p_user IN NUMBER
215 , p_login IN NUMBER
216 , x_return_status OUT NOCOPY VARCHAR2
217 , x_msg_count OUT NOCOPY NUMBER
218 , x_msg_data OUT NOCOPY VARCHAR2
219 );
220 --mes end
221
222 -- Begin Changes Bug 4614970 (FP Bug 4860613)
223 -- Procedure set_prev_next has been overloaded, two new parameters introduced from the earlier procedure definition
224
225 PROCEDURE set_prev_next (
226 X_wip_entity_Id IN NUMBER,
227 X_organization_Id IN NUMBER,
228 X_from_op IN NUMBER,
229 X_to_op IN NUMBER,
230 X_op_seq_incr IN NUMBER,
231 x_error_code OUT NOCOPY NUMBER,
232 x_error_msg OUT NOCOPY VARCHAR2
233 );
234
235 --bug 5337172 intermediate function generated by rosetta
236 function update_job_name(p_wip_entity_id NUMBER
237 , p_subinventory VARCHAR2
238 , p_org_id NUMBER
239 , p_txn_type NUMBER
240 , p_update_flag number
241 , p_dup_job_name out nocopy VARCHAR2
242 , x_error_code out nocopy NUMBER
243 , x_error_msg out nocopy VARCHAR2
244 ) return varchar2;
245 --end bug 5337172
246 END WSMPOPRN;