[Home] [Help]
PACKAGE BODY: APPS.WMS_RULE_PICK_PKG1
Source
1 PACKAGE BODY WMS_RULE_PICK_PKG1 AS
2
3 ---- For Opening the Pick CURSOR ----
4 ----
5 PROCEDURE EXECUTE_OPEN_RULE(
6 p_cursor IN OUT NOCOPY WMS_RULE_PVT.Cv_pick_type,
7 p_rule_id IN NUMBER,
8 p_organization_id IN NUMBER,
9 p_inventory_item_id IN NUMBER,
10 p_transaction_type_id IN NUMBER,
11 p_revision IN VARCHAR2,
12 p_lot_number IN VARCHAR2,
13 p_subinventory_code IN VARCHAR2,
14 p_locator_id IN NUMBER,
15 p_cost_group_id IN NUMBER,
16 p_pp_transaction_temp_id IN NUMBER,
17 p_serial_controlled IN NUMBER,
18 p_detail_serial IN NUMBER,
19 p_detail_any_serial IN NUMBER,
20 p_from_serial_number IN VARCHAR2,
21 p_to_serial_number IN VARCHAR2,
22 p_unit_number IN VARCHAR2,
23 p_lpn_id IN NUMBER,
24 p_project_id IN NUMBER,
25 p_task_id IN NUMBER,
26 x_result OUT NOCOPY NUMBER) is
27
28 BEGIN
29 IF p_rule_id = 1 THEN
30 WMS_RULE_1.open_curs(
31 p_cursor,
32 p_organization_id,
33 p_inventory_item_id,
34 p_transaction_type_id,
35 p_revision,
36 p_lot_number,
37 p_subinventory_code,
38 p_locator_id,
39 p_cost_group_id,
40 p_pp_transaction_temp_id,
41 p_serial_controlled,
42 p_detail_serial,
43 p_detail_any_serial,
44 p_from_serial_number,
45 p_to_serial_number,
46 p_unit_number,
47 p_lpn_id,
48 p_project_id,
49 p_task_id,
50 x_result );
51 ELSIF p_rule_id = 2 THEN
52 WMS_RULE_2.open_curs(
53 p_cursor,
54 p_organization_id,
55 p_inventory_item_id,
56 p_transaction_type_id,
57 p_revision,
58 p_lot_number,
59 p_subinventory_code,
60 p_locator_id,
61 p_cost_group_id,
62 p_pp_transaction_temp_id,
63 p_serial_controlled,
64 p_detail_serial,
65 p_detail_any_serial,
66 p_from_serial_number,
67 p_to_serial_number,
68 p_unit_number,
69 p_lpn_id,
70 p_project_id,
71 p_task_id,
72 x_result );
73 ELSIF p_rule_id = 3 THEN
74 WMS_RULE_3.open_curs(
75 p_cursor,
76 p_organization_id,
77 p_inventory_item_id,
78 p_transaction_type_id,
79 p_revision,
80 p_lot_number,
81 p_subinventory_code,
82 p_locator_id,
83 p_cost_group_id,
84 p_pp_transaction_temp_id,
85 p_serial_controlled,
86 p_detail_serial,
87 p_detail_any_serial,
88 p_from_serial_number,
89 p_to_serial_number,
90 p_unit_number,
91 p_lpn_id,
92 p_project_id,
93 p_task_id,
94 x_result );
95 ELSIF p_rule_id = 4 THEN
96 WMS_RULE_4.open_curs(
97 p_cursor,
98 p_organization_id,
99 p_inventory_item_id,
100 p_transaction_type_id,
101 p_revision,
102 p_lot_number,
103 p_subinventory_code,
104 p_locator_id,
105 p_cost_group_id,
106 p_pp_transaction_temp_id,
107 p_serial_controlled,
108 p_detail_serial,
109 p_detail_any_serial,
110 p_from_serial_number,
111 p_to_serial_number,
112 p_unit_number,
113 p_lpn_id,
114 p_project_id,
115 p_task_id,
116 x_result );
117 ELSIF p_rule_id = 5 THEN
118 WMS_RULE_5.open_curs(
119 p_cursor,
120 p_organization_id,
121 p_inventory_item_id,
122 p_transaction_type_id,
123 p_revision,
124 p_lot_number,
125 p_subinventory_code,
126 p_locator_id,
127 p_cost_group_id,
128 p_pp_transaction_temp_id,
129 p_serial_controlled,
130 p_detail_serial,
131 p_detail_any_serial,
132 p_from_serial_number,
133 p_to_serial_number,
134 p_unit_number,
135 p_lpn_id,
136 p_project_id,
137 p_task_id,
138 x_result );
139 ELSIF p_rule_id = 6 THEN
140 WMS_RULE_6.open_curs(
141 p_cursor,
142 p_organization_id,
143 p_inventory_item_id,
144 p_transaction_type_id,
145 p_revision,
146 p_lot_number,
147 p_subinventory_code,
148 p_locator_id,
149 p_cost_group_id,
150 p_pp_transaction_temp_id,
151 p_serial_controlled,
152 p_detail_serial,
153 p_detail_any_serial,
154 p_from_serial_number,
155 p_to_serial_number,
156 p_unit_number,
157 p_lpn_id,
158 p_project_id,
159 p_task_id,
160 x_result );
161 ELSIF p_rule_id = 15 THEN
162 WMS_RULE_15.open_curs(
163 p_cursor,
164 p_organization_id,
165 p_inventory_item_id,
166 p_transaction_type_id,
167 p_revision,
168 p_lot_number,
169 p_subinventory_code,
170 p_locator_id,
171 p_cost_group_id,
172 p_pp_transaction_temp_id,
173 p_serial_controlled,
174 p_detail_serial,
175 p_detail_any_serial,
176 p_from_serial_number,
177 p_to_serial_number,
178 p_unit_number,
179 p_lpn_id,
180 p_project_id,
181 p_task_id,
182 x_result );
183 ELSIF p_rule_id = 14 THEN
184 WMS_RULE_14.open_curs(
185 p_cursor,
186 p_organization_id,
187 p_inventory_item_id,
188 p_transaction_type_id,
189 p_revision,
190 p_lot_number,
191 p_subinventory_code,
192 p_locator_id,
193 p_cost_group_id,
194 p_pp_transaction_temp_id,
195 p_serial_controlled,
196 p_detail_serial,
197 p_detail_any_serial,
198 p_from_serial_number,
199 p_to_serial_number,
200 p_unit_number,
201 p_lpn_id,
202 p_project_id,
203 p_task_id,
204 x_result );
205 ELSIF p_rule_id = 16 THEN
206 WMS_RULE_16.open_curs(
207 p_cursor,
208 p_organization_id,
209 p_inventory_item_id,
210 p_transaction_type_id,
211 p_revision,
212 p_lot_number,
213 p_subinventory_code,
214 p_locator_id,
215 p_cost_group_id,
216 p_pp_transaction_temp_id,
217 p_serial_controlled,
218 p_detail_serial,
219 p_detail_any_serial,
220 p_from_serial_number,
221 p_to_serial_number,
222 p_unit_number,
223 p_lpn_id,
224 p_project_id,
225 p_task_id,
226 x_result );
227 ELSIF p_rule_id = 17 THEN
228 WMS_RULE_17.open_curs(
229 p_cursor,
230 p_organization_id,
231 p_inventory_item_id,
232 p_transaction_type_id,
233 p_revision,
234 p_lot_number,
235 p_subinventory_code,
236 p_locator_id,
237 p_cost_group_id,
238 p_pp_transaction_temp_id,
239 p_serial_controlled,
240 p_detail_serial,
241 p_detail_any_serial,
242 p_from_serial_number,
243 p_to_serial_number,
244 p_unit_number,
245 p_lpn_id,
246 p_project_id,
247 p_task_id,
248 x_result );
249 ELSIF p_rule_id = 18 THEN
250 WMS_RULE_18.open_curs(
251 p_cursor,
252 p_organization_id,
253 p_inventory_item_id,
254 p_transaction_type_id,
255 p_revision,
256 p_lot_number,
257 p_subinventory_code,
258 p_locator_id,
259 p_cost_group_id,
260 p_pp_transaction_temp_id,
261 p_serial_controlled,
262 p_detail_serial,
263 p_detail_any_serial,
264 p_from_serial_number,
265 p_to_serial_number,
266 p_unit_number,
267 p_lpn_id,
268 p_project_id,
269 p_task_id,
270 x_result );
271
272 END IF;
273 END EXECUTE_OPEN_RULE;
274
275 PROCEDURE EXECUTE_FETCH_RULE (
276 p_cursor IN WMS_RULE_PVT.Cv_pick_type,
277 p_rule_id IN NUMBER,
278 x_revision OUT NOCOPY VARCHAR2,
279 x_lot_number OUT NOCOPY VARCHAR2,
280 x_lot_expiration_date OUT NOCOPY DATE,
281 x_subinventory_code OUT NOCOPY VARCHAR2,
282 x_locator_id OUT NOCOPY NUMBER,
283 x_cost_group_id OUT NOCOPY NUMBER,
284 x_uom_code OUT NOCOPY VARCHAR2,
285 x_lpn_id OUT NOCOPY NUMBER,
286 x_serial_number OUT NOCOPY VARCHAR2,
287 x_possible_quantity OUT NOCOPY NUMBER,
288 x_sec_possible_quantity OUT NOCOPY NUMBER,
289 x_grade_code OUT NOCOPY VARCHAR2,
290 x_consist_string OUT NOCOPY VARCHAR2,
291 x_order_by_string OUT NOCOPY VARCHAR2,
292 x_return_status OUT NOCOPY NUMBER) is
293
294 BEGIN
295 IF p_rule_id = 1 THEN
296 WMS_RULE_1.fetch_one_row(
297 p_cursor,
298 x_revision,
299 x_lot_number,
300 x_lot_expiration_date,
301 x_subinventory_code,
302 x_locator_id,
303 x_cost_group_id,
304 x_uom_code,
305 x_lpn_id,
306 x_serial_number,
307 x_possible_quantity,
308 x_sec_possible_quantity,
309 x_grade_code,
310 x_consist_string,
311 x_order_by_string,
312 x_return_status );
313 ELSIF p_rule_id = 2 THEN
314 WMS_RULE_2.fetch_one_row(
315 p_cursor,
316 x_revision,
317 x_lot_number,
318 x_lot_expiration_date,
319 x_subinventory_code,
320 x_locator_id,
321 x_cost_group_id,
322 x_uom_code,
323 x_lpn_id,
324 x_serial_number,
325 x_possible_quantity,
326 x_sec_possible_quantity,
327 x_grade_code,
328 x_consist_string,
329 x_order_by_string,
330 x_return_status );
331 ELSIF p_rule_id = 3 THEN
332 WMS_RULE_3.fetch_one_row(
333 p_cursor,
334 x_revision,
335 x_lot_number,
336 x_lot_expiration_date,
337 x_subinventory_code,
338 x_locator_id,
339 x_cost_group_id,
340 x_uom_code,
341 x_lpn_id,
342 x_serial_number,
343 x_possible_quantity,
344 x_sec_possible_quantity,
345 x_grade_code,
346 x_consist_string,
347 x_order_by_string,
348 x_return_status );
349 ELSIF p_rule_id = 4 THEN
350 WMS_RULE_4.fetch_one_row(
351 p_cursor,
352 x_revision,
353 x_lot_number,
354 x_lot_expiration_date,
355 x_subinventory_code,
356 x_locator_id,
357 x_cost_group_id,
358 x_uom_code,
359 x_lpn_id,
360 x_serial_number,
361 x_possible_quantity,
362 x_sec_possible_quantity,
363 x_grade_code,
364 x_consist_string,
365 x_order_by_string,
366 x_return_status );
367 ELSIF p_rule_id = 5 THEN
368 WMS_RULE_5.fetch_one_row(
369 p_cursor,
370 x_revision,
371 x_lot_number,
372 x_lot_expiration_date,
373 x_subinventory_code,
374 x_locator_id,
375 x_cost_group_id,
376 x_uom_code,
377 x_lpn_id,
378 x_serial_number,
379 x_possible_quantity,
380 x_sec_possible_quantity,
381 x_grade_code,
382 x_consist_string,
383 x_order_by_string,
384 x_return_status );
385 ELSIF p_rule_id = 6 THEN
386 WMS_RULE_6.fetch_one_row(
387 p_cursor,
388 x_revision,
389 x_lot_number,
390 x_lot_expiration_date,
391 x_subinventory_code,
392 x_locator_id,
393 x_cost_group_id,
394 x_uom_code,
395 x_lpn_id,
396 x_serial_number,
397 x_possible_quantity,
398 x_sec_possible_quantity,
399 x_grade_code,
400 x_consist_string,
401 x_order_by_string,
402 x_return_status );
403 ELSIF p_rule_id = 15 THEN
404 WMS_RULE_15.fetch_one_row(
405 p_cursor,
406 x_revision,
407 x_lot_number,
408 x_lot_expiration_date,
409 x_subinventory_code,
410 x_locator_id,
411 x_cost_group_id,
412 x_uom_code,
413 x_lpn_id,
414 x_serial_number,
415 x_possible_quantity,
416 x_sec_possible_quantity,
417 x_grade_code,
418 x_consist_string,
419 x_order_by_string,
420 x_return_status );
421 ELSIF p_rule_id = 14 THEN
422 WMS_RULE_14.fetch_one_row(
423 p_cursor,
424 x_revision,
425 x_lot_number,
426 x_lot_expiration_date,
427 x_subinventory_code,
428 x_locator_id,
429 x_cost_group_id,
430 x_uom_code,
431 x_lpn_id,
432 x_serial_number,
433 x_possible_quantity,
434 x_sec_possible_quantity,
435 x_grade_code,
436 x_consist_string,
437 x_order_by_string,
438 x_return_status );
439 ELSIF p_rule_id = 16 THEN
440 WMS_RULE_16.fetch_one_row(
441 p_cursor,
442 x_revision,
443 x_lot_number,
444 x_lot_expiration_date,
445 x_subinventory_code,
446 x_locator_id,
447 x_cost_group_id,
448 x_uom_code,
449 x_lpn_id,
450 x_serial_number,
451 x_possible_quantity,
452 x_sec_possible_quantity,
453 x_grade_code,
454 x_consist_string,
455 x_order_by_string,
456 x_return_status );
457 ELSIF p_rule_id = 17 THEN
458 WMS_RULE_17.fetch_one_row(
459 p_cursor,
460 x_revision,
461 x_lot_number,
462 x_lot_expiration_date,
463 x_subinventory_code,
464 x_locator_id,
465 x_cost_group_id,
466 x_uom_code,
467 x_lpn_id,
468 x_serial_number,
469 x_possible_quantity,
470 x_sec_possible_quantity,
471 x_grade_code,
472 x_consist_string,
473 x_order_by_string,
474 x_return_status );
475 ELSIF p_rule_id = 18 THEN
476 WMS_RULE_18.fetch_one_row(
477 p_cursor,
478 x_revision,
479 x_lot_number,
480 x_lot_expiration_date,
481 x_subinventory_code,
482 x_locator_id,
483 x_cost_group_id,
484 x_uom_code,
485 x_lpn_id,
486 x_serial_number,
487 x_possible_quantity,
488 x_sec_possible_quantity,
489 x_grade_code,
490 x_consist_string,
491 x_order_by_string,
492 x_return_status );
493
494 END IF;
495
496 END EXECUTE_FETCH_RULE;
497
498 PROCEDURE EXECUTE_FETCH_AVAILABLE_INV (
499 p_cursor IN WMS_RULE_PVT.Cv_pick_type,
500 p_rule_id IN NUMBER,
501 x_return_status OUT NOCOPY NUMBER) is
502
503 BEGIN
504 IF p_rule_id = 1 THEN
505 WMS_RULE_1.fetch_available_rows(
506 p_cursor,
507 x_return_status );
508 ELSIF p_rule_id = 2 THEN
509 WMS_RULE_2.fetch_available_rows(
510 p_cursor,
511 x_return_status );
512 ELSIF p_rule_id = 3 THEN
513 WMS_RULE_3.fetch_available_rows(
514 p_cursor,
515 x_return_status );
516 ELSIF p_rule_id = 4 THEN
517 WMS_RULE_4.fetch_available_rows(
518 p_cursor,
519 x_return_status );
520 ELSIF p_rule_id = 5 THEN
521 WMS_RULE_5.fetch_available_rows(
522 p_cursor,
523 x_return_status );
524 ELSIF p_rule_id = 6 THEN
525 WMS_RULE_6.fetch_available_rows(
526 p_cursor,
527 x_return_status );
528 ELSIF p_rule_id = 15 THEN
529 WMS_RULE_15.fetch_available_rows(
530 p_cursor,
531 x_return_status );
532 ELSIF p_rule_id = 14 THEN
533 WMS_RULE_14.fetch_available_rows(
534 p_cursor,
535 x_return_status );
536 ELSIF p_rule_id = 16 THEN
537 WMS_RULE_16.fetch_available_rows(
538 p_cursor,
539 x_return_status );
540 ELSIF p_rule_id = 17 THEN
541 WMS_RULE_17.fetch_available_rows(
542 p_cursor,
543 x_return_status );
544 ELSIF p_rule_id = 18 THEN
545 WMS_RULE_18.fetch_available_rows(
546 p_cursor,
547 x_return_status );
548
549 END IF;
550
551 END EXECUTE_FETCH_AVAILABLE_INV;
552
553 PROCEDURE EXECUTE_CLOSE_RULE (p_rule_id IN NUMBER,
554 p_cursor IN WMS_RULE_PVT.Cv_pick_type) is
555 BEGIN
556 IF p_rule_id = 1 THEN
557 WMS_RULE_1.close_curs(p_cursor);
558 ELSIF p_rule_id = 2 THEN
559 WMS_RULE_2.close_curs(p_cursor);
560 ELSIF p_rule_id = 3 THEN
561 WMS_RULE_3.close_curs(p_cursor);
562 ELSIF p_rule_id = 4 THEN
563 WMS_RULE_4.close_curs(p_cursor);
564 ELSIF p_rule_id = 5 THEN
565 WMS_RULE_5.close_curs(p_cursor);
566 ELSIF p_rule_id = 6 THEN
567 WMS_RULE_6.close_curs(p_cursor);
568 ELSIF p_rule_id = 15 THEN
569 WMS_RULE_15.close_curs(p_cursor);
570 ELSIF p_rule_id = 14 THEN
571 WMS_RULE_14.close_curs(p_cursor);
572 ELSIF p_rule_id = 16 THEN
573 WMS_RULE_16.close_curs(p_cursor);
574 ELSIF p_rule_id = 17 THEN
575 WMS_RULE_17.close_curs(p_cursor);
576 ELSIF p_rule_id = 18 THEN
577 WMS_RULE_18.close_curs(p_cursor);
578
579 END IF;
580 END EXECUTE_CLOSE_RULE;
581 END WMS_RULE_PICK_PKG1;
582 --COMMIT;
583 --EXIT;