[Home] [Help]
PACKAGE BODY: APPS.ENG_LAUNCH_ECO_OI_PK
Source
1 PACKAGE BODY ENG_LAUNCH_ECO_OI_PK AS
2 /* $Header: ENCOINB.pls 120.6.12000000.2 2007/09/04 07:23:53 jiabraha ship $ */
3
4
5 ---------------
6 --
7 -- Global variables
8 --
9
10 g_ECO_ifce_key VARCHAR2(30) := NULL;
11 g_revised_item_ifce_key VARCHAR2(30) := NULL;
12 g_revised_comp_ifce_key VARCHAR2(30) := NULL;
13
14 g_ECO_exists BOOLEAN := FALSE;
15 g_revised_items_exist BOOLEAN := FALSE;
16 g_revised_comps_exist BOOLEAN := FALSE;
17
18 g_all_org NUMBER;
19 g_org_id NUMBER;
20
21
22 ---------------
23 --
24 -- Global data structures
25 --
26
27 -- ifce arrays. An entry in each of these consists of all distinct ifce keys in interface tables
28
29 TYPE ECO_ifce_type IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
30 TYPE item_ifce_type IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
31 TYPE comp_ifce_type IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
32
33 g_ECO_ifce_group_tbl ECO_ifce_type;
34 g_item_ifce_group_tbl item_ifce_type;
35 g_comp_ifce_group_tbl comp_ifce_type;
36
37 -- record structures with ifce keys
38
39 g_encoin_rev_item_tbl Encoin_Revised_Item_Tbl_Type;
40 g_encoin_rev_comp_tbl Encoin_Rev_Component_Tbl_Type;
41 g_encoin_ref_des_tbl Encoin_Ref_Designator_Tbl_Type;
42 g_encoin_sub_comp_tbl Encoin_Sub_Component_Tbl_Type;
43
44 -- record structures without ifce keys.
45 -- rev comps structures have parent rev items index keys
46 -- ref desgs and sub comps have parent rev comps and grand parent rev items ifce keys
47
48 g_public_eco_rec ENG_Eco_PUB.Eco_Rec_Type;
49 g_public_out_eco_rec ENG_Eco_PUB.Eco_Rec_Type;
50 g_public_rev_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type;
51 g_public_out_rev_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type;
52 g_public_rev_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type;
53 g_public_out_rev_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type;
54 g_public_lines_tbl ENG_Eco_PUB.Change_Line_Tbl_Type;
55 g_public_out_lines_tbl ENG_Eco_PUB.Change_Line_Tbl_Type;
56 g_public_rev_comp_tbl Bom_Bo_PUB.Rev_Component_Tbl_Type;
57 g_public_out_rev_comp_tbl Bom_Bo_PUB.Rev_Component_Tbl_Type;
58 g_public_ref_des_tbl Bom_Bo_PUB.Ref_Designator_Tbl_Type;
59 g_public_out_ref_des_tbl Bom_Bo_PUB.Ref_Designator_Tbl_Type;
60 g_public_sub_comp_tbl Bom_Bo_PUB.Sub_Component_Tbl_Type;
61 g_public_out_sub_comp_tbl Bom_Bo_PUB.Sub_Component_Tbl_Type;
62 g_public_rev_operation_tbl Bom_Rtg_Pub.Rev_Operation_Tbl_Type;
63 g_public_rev_op_res_tbl Bom_Rtg_Pub.Rev_Op_Resource_Tbl_Type;
64 g_public_rev_sub_res_tbl Bom_Rtg_Pub.Rev_Sub_Resource_Tbl_Type;
65 g_public_out_rev_operation_tbl Bom_Rtg_Pub.Rev_Operation_Tbl_Type;
66 g_public_out_rev_op_res_tbl Bom_Rtg_Pub.Rev_Op_Resource_Tbl_Type;
67 g_public_out_rev_sub_res_tbl Bom_Rtg_Pub.Rev_Sub_Resource_Tbl_Type;
68
69
70 ---------------
71 --
72 -- Global Cursors Definitions
73 --
74
75 -- Get ECO headers
76
77 CURSOR GetEco IS
78 SELECT attribute7, attribute8, attribute9, attribute10, attribute11,
79 attribute12, attribute13, attribute14, attribute15, request_id,
80 program_application_id, program_id, program_update_date,
81 approval_status_type, approval_date, approval_list_id,
82 change_order_type_id, responsible_organization_id,
83 approval_request_date, requestor_user_name, assignee_name,
84 change_notice, organization_id, last_update_date, last_updated_by,
85 creation_date, created_by, last_update_login, description,
86 status_type, initiation_date, implementation_date,
87 cancellation_date, cancellation_comments, priority_code,
88 reason_code, estimated_eng_cost, estimated_mfg_cost, requestor_id,
89 attribute_category, attribute1, attribute2, attribute3,
90 attribute4, attribute5, attribute6, process_flag,
91 transaction_id, APPROVAL_LIST_NAME, CHANGE_ORDER_TYPE,
92 change_mgmt_type_name, project_name, task_number, ORGANIZATION_CODE,
93 RESPONSIBLE_ORG_CODE, transaction_type, ENG_CHANGES_IFCE_KEY, change_name ,status_name, --Bug 2908248
94 pk1_name ,pk2_name , pk3_name ,plm_or_erp_change --11.5.10
95 , Approval_status_name -- bug 3587304
96 ,ORGANIZATION_HIERARCHY -- 4967902
97 , employee_number -- 4402842
98 , source_type_name
99 , source_name
100 , need_by_date
101 , eco_department_name
102 FROM eng_eng_changes_interface
103 WHERE process_flag = 1
104 AND (g_all_org = 1
105 OR
106 (g_all_org = 2 AND organization_id = g_org_id));
107
108 -- Get Revision with current ECO Header's ifce key
109
110 CURSOR GetRevWithCurrECOifce IS
111 SELECT attribute11, attribute12, attribute13, attribute14,
112 attribute15, program_application_id, program_id, program_update_date,
113 request_id, revision_id, change_notice, organization_id, revision,
114 last_update_date, last_updated_by, creation_date,created_by,
115 last_update_login, comments,attribute_category, attribute1,
116 attribute2, attribute3, attribute4, attribute5, attribute6,
117 attribute7, attribute8, attribute9, attribute10, new_revision,
118 process_flag, transaction_id,transaction_type, ORGANIZATION_CODE,
119 eng_changes_ifce_key
120 FROM eng_eco_revisions_interface
121 WHERE eng_changes_ifce_key = g_ECO_ifce_key
122 AND process_flag = 1
123 AND (g_all_org = 1
124 OR
125 (g_all_org = 2 AND organization_id = g_org_id));
126
127 -- Called when there are no more ECO headers.
128 -- Group ECO revisions by ECO Header ifce values
129
130 CURSOR GetRevWithSameECOifce IS
131 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
132 FROM eng_eco_revisions_interface
133 WHERE process_flag = 1
134 AND (g_all_org = 1
135 OR
136 (g_all_org = 2 AND organization_id = g_org_id));
137
138 -- Get all other ECO Revisions
139
140 CURSOR GetRev IS
141 SELECT attribute11, attribute12, attribute13, attribute14,
142 attribute15, program_application_id, program_id, program_update_date,
143 request_id, revision_id, change_notice, organization_id, revision,
144 last_update_date, last_updated_by, creation_date,created_by,
145 last_update_login, comments,attribute_category, attribute1,
146 attribute2, attribute3, attribute4, attribute5, attribute6,
147 attribute7, attribute8, attribute9, attribute10, new_revision,
148 process_flag, transaction_id,transaction_type, ORGANIZATION_CODE,
149 eng_changes_ifce_key, eng_eco_revisions_ifce_key
150 FROM eng_eco_revisions_interface
151 WHERE process_flag = 1
152 AND (g_all_org = 1
153 OR
154 (g_all_org = 2 AND organization_id = g_org_id));
155
156 -- Get revised items with the current ECO Header's ifce key
157 ---11.5.10 adding following columns and ordering by parent_revised_item_name
158 -- parent_revised_item_name
159 -- parent_alternate_name
160
161 CURSOR GetItemWithCurrECOifce IS
162 SELECT change_notice ,
163 organization_id ,
164 revised_item_id ,
165 last_update_date ,
166 last_updated_by ,
167 creation_date ,
168 created_by ,
169 last_update_login ,
170 implementation_date ,
171 cancellation_date ,
172 cancel_comments ,
173 disposition_type ,
174 new_item_revision ,
175 early_schedule_date ,
176 attribute_category ,
177 attribute2 ,
178 attribute3 ,
179 attribute4 ,
180 attribute5 ,
181 attribute7 ,
182 attribute8 ,
183 attribute9 ,
184 attribute11 ,
185 attribute12 ,
186 attribute13 ,
187 attribute14 ,
188 attribute15 ,
189 status_type ,
190 scheduled_date ,
191 bill_sequence_id ,
192 mrp_active ,
193 request_id ,
194 program_application_id ,
195 program_id ,
196 program_update_date ,
197 update_wip ,
198 use_up ,
199 use_up_item_id ,
200 revised_item_sequence_id ,
201 use_up_plan_name ,
202 descriptive_text ,
203 auto_implement_date ,
204 attribute1 ,
205 attribute6 ,
206 attribute10 ,
207 requestor_id ,
208 comments ,
209 process_flag ,
210 transaction_id ,
211 organization_code ,
212 revised_item_number ,
213 new_rtg_revision ,
214 use_up_item_number ,
215 alternate_bom_designator ,
216 transaction_type ,
217 ENG_REVISED_ITEMS_IFCE_KEY,
218 eng_changes_ifce_key ,
219 parent_revised_item_name ,
220 parent_alternate_name ,
221 updated_item_revision ,
222 New_scheduled_date -- Bug 3432944
223 ,
224 from_item_revision -- 11.5.10E
225 ,
226 new_revision_label ,
227 New_Revised_Item_Rev_Desc ,
228 new_revision_reason ,
229 from_end_item_unit_number
230 /*Bug 6377841*/
231 FROM eng_revised_items_interface
232 WHERE eng_changes_ifce_key = g_ECO_ifce_key
233 AND process_flag = 1
234 AND (g_all_org = 1
235 OR (g_all_org = 2
236 AND organization_id = g_org_id))
237 ORDER BY parent_revised_item_name desc ;
238
239 -- Called when there are no more ECO headers.
240 -- Group revised items by ECO Header ifce values
241
242 CURSOR GetItemWithSameECOifce IS
243 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
244 FROM eng_revised_items_interface
245 WHERE process_flag = 1
246 AND (g_all_org = 1
247 OR
248 (g_all_org = 2 AND organization_id = g_org_id));
249
250 -- Get all other revised items
251
252 CURSOR GetItem
253 IS
254 SELECT change_notice ,
255 organization_id ,
256 revised_item_id ,
257 last_update_date ,
258 last_updated_by ,
259 creation_date ,
260 created_by ,
261 last_update_login ,
262 implementation_date ,
263 cancellation_date ,
264 cancel_comments ,
265 disposition_type ,
266 new_item_revision ,
267 early_schedule_date ,
268 attribute_category ,
269 attribute2 ,
270 attribute3 ,
271 attribute4 ,
272 attribute5 ,
273 attribute7 ,
274 attribute8 ,
275 attribute9 ,
276 attribute11 ,
277 attribute12 ,
278 attribute13 ,
279 attribute14 ,
280 attribute15 ,
281 status_type ,
282 scheduled_date ,
283 bill_sequence_id ,
284 mrp_active ,
285 request_id ,
286 program_application_id ,
287 program_id ,
288 program_update_date ,
289 update_wip ,
290 use_up ,
291 use_up_item_id ,
292 revised_item_sequence_id ,
293 use_up_plan_name ,
294 descriptive_text ,
295 auto_implement_date ,
296 attribute1 ,
297 attribute6 ,
298 attribute10 ,
299 requestor_id ,
300 comments ,
301 process_flag ,
302 transaction_id ,
303 organization_code ,
304 revised_item_number ,
305 new_rtg_revision ,
306 use_up_item_number ,
307 alternate_bom_designator ,
308 transaction_type ,
309 ENG_REVISED_ITEMS_IFCE_KEY,
310 eng_changes_ifce_key ,
311 parent_revised_item_name ,
312 parent_alternate_name ,
313 updated_item_revision ,
314 New_scheduled_date -- Bug 3432944
315 ,
316 from_item_revision -- 11.5.10E
317 ,
318 new_revision_label ,
319 New_Revised_Item_Rev_Desc ,
320 new_revision_reason ,
321 from_end_item_unit_number
322 /*Bug 6377841*/
323 FROM eng_revised_items_interface
324 WHERE process_flag = 1
325 AND (g_all_org = 1
326 OR (g_all_org = 2
327 AND organization_id = g_org_id))
328 ORDER BY parent_revised_item_name desc ;
329
330 -- Get revised comps with the current Header ifce key
331
332 CURSOR GetCompWithCurrECOifce
333 IS
334 SELECT supply_subinventory ,
335 operation_lead_time_percent ,
336 revised_item_sequence_id ,
337 cost_factor ,
338 required_for_revenue ,
339 high_quantity ,
340 component_sequence_id ,
341 program_application_id ,
342 wip_supply_type ,
343 supply_locator_id ,
344 bom_item_type ,
345 operation_seq_num ,
346 component_item_id ,
347 last_update_date ,
348 last_updated_by ,
349 creation_date ,
350 created_by ,
351 last_update_login ,
352 item_num ,
353 component_quantity ,
354 component_yield_factor ,
355 component_remarks ,
356 revised_item_number ,
357 effectivity_date ,
358 change_notice ,
359 implementation_date ,
360 disable_date ,
361 attribute_category ,
362 attribute1 ,
363 attribute2 ,
364 attribute3 ,
365 attribute4 ,
366 attribute5 ,
367 attribute6 ,
368 attribute7 ,
369 attribute8 ,
370 attribute9 ,
371 attribute10 ,
372 attribute11 ,
373 attribute12 ,
374 attribute13 ,
375 attribute14 ,
376 attribute15 ,
377 planning_factor ,
378 quantity_related ,
379 so_basis ,
380 optional ,
381 mutually_exclusive_options ,
382 include_in_cost_rollup ,
383 check_atp ,
384 shipping_allowed ,
385 required_to_ship ,
386 include_on_ship_docs ,
387 include_on_bill_docs ,
388 low_quantity ,
389 acd_type ,
390 old_component_sequence_id ,
391 bill_sequence_id ,
392 request_id ,
393 program_id ,
394 program_update_date ,
395 pick_components ,
396 assembly_type ,
397 interface_entity_type ,
398 reference_designator ,
399 new_effectivity_date ,
400 old_effectivity_date ,
401 substitute_comp_id ,
402 new_operation_seq_num ,
403 old_operation_seq_num ,
404 process_flag ,
405 transaction_id ,
406 SUBSTITUTE_COMP_NUMBER ,
407 ORGANIZATION_CODE ,
408 ASSEMBLY_ITEM_NUMBER ,
409 COMPONENT_ITEM_NUMBER ,
410 LOCATION_NAME ,
411 ORGANIZATION_ID ,
412 ASSEMBLY_ITEM_ID ,
413 ALTERNATE_BOM_DESIGNATOR ,
414 transaction_type ,
415 BOM_INVENTORY_COMPS_IFCE_KEY,
416 eng_changes_ifce_key ,
417 eng_revised_items_ifce_key
418 --Bug 3396529: Added New_revised_Item_Revision
419 ,
420 New_revised_Item_Revision,
421 basis_type ,
422 from_end_item_unit_number, /*Bug 6377841*/
423 to_end_item_unit_number
424 /*Bug 6377841*/
425 FROM bom_inventory_comps_interface
426 WHERE eng_changes_ifce_key = g_ECO_ifce_key
427 AND interface_entity_type = 'ECO'
428 AND process_flag = 1
429 AND (g_all_org = 1
430 OR (g_all_org = 2
431 AND organization_id = g_org_id));
432
433 -- Called when there are no more ECO headers.
434 -- Group revised comps by ECO Header ifce values
435
436 CURSOR GetCompWithSameECOifce IS
437 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
438 FROM bom_inventory_comps_interface
439 WHERE process_flag = 1
440 AND (g_all_org = 1
441 OR
442 (g_all_org = 2 AND organization_id = g_org_id));
443
444 -- Get revised comps with the current revised item's ifce key
445
446 CURSOR GetCompWithCurrItemifce
447 IS
448 SELECT supply_subinventory ,
449 operation_lead_time_percent ,
450 revised_item_sequence_id ,
451 cost_factor ,
452 required_for_revenue ,
453 high_quantity ,
454 component_sequence_id ,
455 program_application_id ,
456 wip_supply_type ,
457 supply_locator_id ,
458 bom_item_type ,
459 operation_seq_num ,
460 component_item_id ,
461 last_update_date ,
462 last_updated_by ,
463 creation_date ,
464 created_by ,
465 last_update_login ,
466 item_num ,
467 component_quantity ,
468 component_yield_factor ,
469 component_remarks ,
470 effectivity_date ,
471 change_notice ,
472 implementation_date ,
473 disable_date ,
474 attribute_category ,
475 attribute1 ,
476 attribute2 ,
477 attribute3 ,
478 attribute4 ,
479 attribute5 ,
480 attribute6 ,
481 attribute7 ,
482 attribute8 ,
483 attribute9 ,
484 attribute10 ,
485 attribute11 ,
486 attribute12 ,
487 attribute13 ,
488 attribute14 ,
489 attribute15 ,
490 planning_factor ,
491 quantity_related ,
492 so_basis ,
493 optional ,
494 mutually_exclusive_options ,
495 include_in_cost_rollup ,
496 check_atp ,
497 shipping_allowed ,
498 required_to_ship ,
499 include_on_ship_docs ,
500 include_on_bill_docs ,
501 low_quantity ,
502 acd_type ,
503 old_component_sequence_id ,
504 bill_sequence_id ,
505 request_id ,
506 program_id ,
507 program_update_date ,
508 pick_components ,
509 assembly_type ,
510 interface_entity_type ,
511 reference_designator ,
512 new_effectivity_date ,
513 old_effectivity_date ,
514 substitute_comp_id ,
515 new_operation_seq_num ,
516 old_operation_seq_num ,
517 process_flag ,
518 transaction_id ,
519 SUBSTITUTE_COMP_NUMBER ,
520 ORGANIZATION_CODE ,
521 ASSEMBLY_ITEM_NUMBER ,
522 COMPONENT_ITEM_NUMBER ,
523 LOCATION_NAME ,
524 ORGANIZATION_ID ,
525 ASSEMBLY_ITEM_ID ,
526 ALTERNATE_BOM_DESIGNATOR ,
527 transaction_type ,
528 BOM_INVENTORY_COMPS_IFCE_KEY,
529 eng_changes_ifce_key ,
530 eng_revised_items_ifce_key
531 --Bug 3396529: Added New_revised_Item_Revision
532 ,
533 New_revised_Item_Revision,
534 basis_type ,
535 from_end_item_unit_number,
536 /*Bug 6377841*/
537 to_end_item_unit_number
538 /*Bug 6377841*/
539 FROM bom_inventory_comps_interface
540 WHERE eng_revised_items_ifce_key = g_revised_item_ifce_key
541 AND interface_entity_type = 'ECO'
542 AND process_flag = 1
543 AND (g_all_org = 1
544 OR (g_all_org = 2
545 AND organization_id = g_org_id));
546
547 -- Called when there are no more revised items.
548 -- Group revised comps by revised item ifce values
549
550 CURSOR GetCompWithSameItemifce IS
551 SELECT DISTINCT(ENG_REVISED_ITEMS_IFCE_KEY) item_ifce_key
552 FROM bom_inventory_comps_interface
553 WHERE process_flag = 1
554 AND (g_all_org = 1
555 OR
556 (g_all_org = 2 AND organization_id = g_org_id));
557
558 -- Get all other revised comps
559
560 CURSOR GetComp
561 IS
562 SELECT supply_subinventory ,
563 operation_lead_time_percent ,
564 revised_item_sequence_id ,
565 cost_factor ,
566 required_for_revenue ,
567 high_quantity ,
568 component_sequence_id ,
569 program_application_id ,
570 wip_supply_type ,
571 supply_locator_id ,
572 bom_item_type ,
573 operation_seq_num ,
574 component_item_id ,
575 last_update_date ,
576 last_updated_by ,
577 creation_date ,
578 created_by ,
579 last_update_login ,
580 item_num ,
581 component_quantity ,
582 component_yield_factor ,
583 component_remarks ,
584 effectivity_date ,
585 change_notice ,
586 implementation_date ,
587 disable_date ,
588 attribute_category ,
589 attribute1 ,
590 attribute2 ,
591 attribute3 ,
592 attribute4 ,
593 attribute5 ,
594 attribute6 ,
595 attribute7 ,
596 attribute8 ,
597 attribute9 ,
598 attribute10 ,
599 attribute11 ,
600 attribute12 ,
601 attribute13 ,
602 attribute14 ,
603 attribute15 ,
604 planning_factor ,
605 quantity_related ,
606 so_basis ,
607 optional ,
608 mutually_exclusive_options ,
609 include_in_cost_rollup ,
610 check_atp ,
611 shipping_allowed ,
612 required_to_ship ,
613 include_on_ship_docs ,
614 include_on_bill_docs ,
615 low_quantity ,
616 acd_type ,
617 old_component_sequence_id ,
618 bill_sequence_id ,
619 request_id ,
620 program_id ,
621 program_update_date ,
622 pick_components ,
623 assembly_type ,
624 interface_entity_type ,
625 reference_designator ,
626 new_effectivity_date ,
627 old_effectivity_date ,
628 substitute_comp_id ,
629 new_operation_seq_num ,
630 old_operation_seq_num ,
631 process_flag ,
632 transaction_id ,
633 SUBSTITUTE_COMP_NUMBER ,
634 ORGANIZATION_CODE ,
635 ASSEMBLY_ITEM_NUMBER ,
636 COMPONENT_ITEM_NUMBER ,
637 LOCATION_NAME ,
638 ORGANIZATION_ID ,
639 ASSEMBLY_ITEM_ID ,
640 ALTERNATE_BOM_DESIGNATOR ,
641 transaction_type ,
642 BOM_INVENTORY_COMPS_IFCE_KEY,
643 eng_changes_ifce_key ,
644 eng_revised_items_ifce_key
645 --Bug 3396529: Added New_revised_Item_Revision
646 ,
647 New_revised_Item_Revision,
648 basis_type ,
649 from_end_item_unit_number, /*Bug 6377841*/
650 to_end_item_unit_number
651 /*Bug 6377841*/
652 FROM bom_inventory_comps_interface
653 WHERE interface_entity_type = 'ECO'
654 AND process_flag = 1
655 AND (g_all_org = 1
656 OR (g_all_org = 2
657 AND organization_id = g_org_id));
658
659 -- Get reference designators with the current ECO Header's ifce key
660
661 CURSOR GetRfdWithCurrECOifce IS
662 SELECT COMPONENT_REFERENCE_DESIGNATOR,last_update_date,last_update_login,
663 ref_designator_comment, change_notice, component_sequence_id,acd_type,
664 request_id, program_application_id, program_id, program_update_date,
665 attribute_category, attribute1, attribute2, attribute3, attribute4,
666 attribute5, attribute6, attribute7, attribute8, attribute9, attribute10,
667 attribute11, attribute12, attribute13, attribute14, attribute15,
668 new_designator, process_flag, transaction_id, ASSEMBLY_ITEM_NUMBER,
669 COMPONENT_ITEM_NUMBER, ORGANIZATION_CODE, ORGANIZATION_ID,last_updated_by,
670 creation_date, created_by, ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR,
671 COMPONENT_ITEM_ID, BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
672 interface_entity_type, transaction_type, eng_changes_ifce_key,
673 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
674 bom_ref_desgs_ifce_key
675 --Bug 3396529: Added New_revised_Item_Revision
676 , New_revised_Item_Revision
677 FROM bom_ref_desgs_interface
678 WHERE eng_changes_ifce_key = g_ECO_ifce_key
679 and process_flag = 1
680 AND (g_all_org = 1
681 OR
682 (g_all_org = 2 AND organization_id = g_org_id));
683
684 -- Called when there are no more ECO headers.
685 -- Group reference desgs by ECO Header ifce values
686
687 CURSOR GetRfdWithSameECOifce IS
688 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
689 FROM bom_ref_desgs_interface
690 WHERE process_flag = 1
691 AND (g_all_org = 1
692 OR
693 (g_all_org = 2 AND organization_id = g_org_id));
694
695 -- Get reference desgs with the current revised item's ifce key
696
697 CURSOR GetRfdWithCurrItemifce IS
698 SELECT COMPONENT_REFERENCE_DESIGNATOR,last_update_date,last_update_login,
699 last_updated_by, creation_date,created_by, ref_designator_comment,
700 change_notice, component_sequence_id,acd_type, request_id,
701 program_application_id, program_id, program_update_date,
702 attribute_category, attribute1, attribute2, attribute3, attribute4,
703 attribute5, attribute6, attribute7, attribute8, attribute9, attribute10,
704 attribute11, attribute12, attribute13, attribute14, attribute15,
705 new_designator, process_flag, transaction_id, ASSEMBLY_ITEM_NUMBER,
706 COMPONENT_ITEM_NUMBER, ORGANIZATION_CODE, ORGANIZATION_ID,
707 ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR, COMPONENT_ITEM_ID,
708 BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
709 interface_entity_type, transaction_type, eng_changes_ifce_key,
710 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
711 bom_ref_desgs_ifce_key
712 --Bug 3396529: Added New_revised_Item_Revision
713 , New_revised_Item_Revision
714 FROM bom_ref_desgs_interface
715 WHERE eng_revised_items_ifce_key = g_revised_item_ifce_key
716 AND interface_entity_type = 'ECO'
717 AND process_flag = 1
718 AND (g_all_org = 1
719 OR
720 (g_all_org = 2 AND organization_id = g_org_id));
721
722 -- Called when there are no more revised items.
723 -- Group reference desgs by revised item ifce values
724
725 CURSOR GetRfdWithSameItemifce IS
726 SELECT DISTINCT(eng_revised_items_ifce_key) item_ifce_key
727 FROM bom_ref_desgs_interface
728 WHERE process_flag = 1
729 AND (g_all_org = 1
730 OR
731 (g_all_org = 2 AND organization_id = g_org_id));
732
733 -- Get reference designators with the current revised component's ifce key
734
735 CURSOR GetRfdWithCurrCompifce IS
736 SELECT COMPONENT_REFERENCE_DESIGNATOR,last_update_date,last_update_login,
737 last_updated_by, creation_date,created_by, ref_designator_comment,
738 change_notice, component_sequence_id,acd_type, request_id,
739 program_application_id, program_id, program_update_date,
740 attribute_category, attribute1, attribute2, attribute3, attribute4,
741 attribute5, attribute6, attribute7, attribute8, attribute9, attribute10,
742 attribute11, attribute12, attribute13, attribute14, attribute15,
743 new_designator, process_flag, transaction_id, ASSEMBLY_ITEM_NUMBER,
744 COMPONENT_ITEM_NUMBER, ORGANIZATION_CODE, ORGANIZATION_ID,
745 ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR, COMPONENT_ITEM_ID,
746 BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
747 interface_entity_type, transaction_type, eng_changes_ifce_key,
748 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
749 bom_ref_desgs_ifce_key
750 --Bug 3396529: Added New_revised_Item_Revision
751 , New_revised_Item_Revision
752 FROM bom_ref_desgs_interface
753 WHERE bom_inventory_comps_ifce_key = g_revised_comp_ifce_key
754 AND interface_entity_type = 'ECO'
755 AND process_flag = 1
756 AND (g_all_org = 1
757 OR
758 (g_all_org = 2 AND organization_id = g_org_id));
759
760 -- Called when there are no more revised components.
761 -- Group reference desgs by revised component ifce values
762
763 CURSOR GetRfdWithSameCompifce IS
764 SELECT DISTINCT(bom_inventory_comps_ifce_key) comp_ifce_key
765 FROM bom_ref_desgs_interface
766 WHERE process_flag = 1
767 AND (g_all_org = 1
768 OR
769 (g_all_org = 2 AND organization_id = g_org_id));
770
771 -- Get all other reference designators
772
773 CURSOR GetRfd IS
774 SELECT COMPONENT_REFERENCE_DESIGNATOR,last_update_date,last_update_login,
775 last_updated_by, creation_date,created_by, ref_designator_comment,
776 change_notice, component_sequence_id,acd_type, request_id,
777 program_application_id, program_id, program_update_date,
778 attribute_category, attribute1, attribute2, attribute3, attribute4,
779 attribute5, attribute6, attribute7, attribute8, attribute9, attribute10,
780 attribute11, attribute12, attribute13, attribute14, attribute15,
781 new_designator, process_flag, transaction_id, ASSEMBLY_ITEM_NUMBER,
782 COMPONENT_ITEM_NUMBER, ORGANIZATION_CODE, ORGANIZATION_ID,
783 ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR, COMPONENT_ITEM_ID,
784 BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
785 interface_entity_type, transaction_type, eng_changes_ifce_key,
786 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
787 bom_ref_desgs_ifce_key
788 --Bug 3396529: Added New_revised_Item_Revision
789 , New_revised_Item_Revision
790 FROM bom_ref_desgs_interface
791 WHERE process_flag = 1
792 AND (g_all_org = 1
793 OR
794 (g_all_org = 2 AND organization_id = g_org_id));
795
796 -- Get substitute components with the current ECO Header's ifce key
797
798 CURSOR GetSbcWithCurrECOifce IS
799 SELECT substitute_component_id, last_update_date, last_updated_by, creation_date,
800 created_by, last_update_login, substitute_item_quantity,
801 component_sequence_id, acd_type, change_notice, request_id,
802 program_application_id, program_update_date, attribute_category, attribute1,
803 attribute2, attribute4, attribute5, attribute6, attribute8, attribute9,
804 attribute10, attribute12, attribute13, attribute14, attribute15, program_id,
805 attribute3, attribute7, attribute11, new_sub_comp_id, process_flag,
806 transaction_id, NEW_SUB_COMP_NUMBER, ASSEMBLY_ITEM_NUMBER,
807 COMPONENT_ITEM_NUMBER, SUBSTITUTE_COMP_NUMBER, ORGANIZATION_CODE,
808 ORGANIZATION_ID, ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR,
809 COMPONENT_ITEM_ID, BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
810 interface_entity_type, transaction_type, eng_changes_ifce_key,
811 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
812 bom_sub_comps_ifce_key
813 --Bug 3396529: Added New_revised_Item_Revision
814 , New_revised_Item_Revision
815 FROM bom_sub_comps_interface
816 WHERE eng_changes_ifce_key = g_ECO_ifce_key
817 and process_flag = 1
818 AND (g_all_org = 1
819 OR
820 (g_all_org = 2 AND organization_id = g_org_id));
821
822 -- Called when there are no more ECO headers.
823 -- Group substitute components by ECO Header ifce values
824
825 CURSOR GetSbcWithSameECOifce IS
826 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
827 FROM bom_sub_comps_interface
828 WHERE process_flag = 1
829 AND (g_all_org = 1
830 OR
831 (g_all_org = 2 AND organization_id = g_org_id));
832
833 -- Get substitute components with the current revised item's ifce key
834
835 CURSOR GetSbcWithCurrItemifce IS
836 SELECT substitute_component_id, last_update_date, last_updated_by, creation_date,
837 created_by, last_update_login, substitute_item_quantity,
838 component_sequence_id, acd_type, change_notice, request_id,
839 program_application_id, program_update_date, attribute_category, attribute1,
840 attribute2, attribute4, attribute5, attribute6, attribute8, attribute9,
841 attribute10, attribute12, attribute13, attribute14, attribute15, program_id,
842 attribute3, attribute7, attribute11, new_sub_comp_id, process_flag,
843 transaction_id, NEW_SUB_COMP_NUMBER, ASSEMBLY_ITEM_NUMBER,
844 COMPONENT_ITEM_NUMBER, SUBSTITUTE_COMP_NUMBER, ORGANIZATION_CODE,
845 ORGANIZATION_ID, ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR,
846 COMPONENT_ITEM_ID, BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
847 interface_entity_type, transaction_type, eng_changes_ifce_key,
848 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
849 bom_sub_comps_ifce_key
850 --Bug 3396529: Added New_revised_Item_Revision
851 , New_revised_Item_Revision
852 FROM bom_sub_comps_interface
853 WHERE eng_revised_items_ifce_key = g_revised_item_ifce_key
854 AND interface_entity_type = 'ECO'
855 AND process_flag = 1
856 AND (g_all_org = 1
857 OR
858 (g_all_org = 2 AND organization_id = g_org_id));
859
860 -- Called when there are no more revised items.
861 -- Group substitute components by revised item ifce values
862
863 CURSOR GetSbcWithSameItemifce IS
864 SELECT DISTINCT(eng_revised_items_ifce_key) item_ifce_key
865 FROM bom_sub_comps_interface
866 WHERE process_flag = 1
867 AND (g_all_org = 1
868 OR
869 (g_all_org = 2 AND organization_id = g_org_id));
870
871 -- Get substitute components with the current revised component's ifce key
872
873 CURSOR GetSbcWithCurrCompifce IS
874 SELECT substitute_component_id, last_update_date, last_updated_by, creation_date,
875 created_by, last_update_login, substitute_item_quantity,
876 component_sequence_id, acd_type, change_notice, request_id,
877 program_application_id, program_update_date, attribute_category, attribute1,
878 attribute2, attribute4, attribute5, attribute6, attribute8, attribute9,
879 attribute10, attribute12, attribute13, attribute14, attribute15, program_id,
880 attribute3, attribute7, attribute11, new_sub_comp_id, process_flag,
881 transaction_id, NEW_SUB_COMP_NUMBER, ASSEMBLY_ITEM_NUMBER,
882 COMPONENT_ITEM_NUMBER, SUBSTITUTE_COMP_NUMBER, ORGANIZATION_CODE,
883 ORGANIZATION_ID, ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR,
884 COMPONENT_ITEM_ID, BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
885 interface_entity_type, transaction_type, eng_changes_ifce_key,
886 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
887 bom_sub_comps_ifce_key
888 --Bug 3396529: Added New_revised_Item_Revision
889 , New_revised_Item_Revision
890 FROM bom_sub_comps_interface
891 WHERE bom_inventory_comps_ifce_key = g_revised_comp_ifce_key
892 AND interface_entity_type = 'ECO'
893 AND process_flag = 1
894 AND (g_all_org = 1
895 OR
896 (g_all_org = 2 AND organization_id = g_org_id));
897
898 -- Called when there are no more revised components.
899 -- Group substitute components by revised component ifce values
900
901 CURSOR GetSbcWithSameCompifce IS
902 SELECT DISTINCT(bom_inventory_comps_ifce_key) comp_ifce_key
903 FROM bom_sub_comps_interface
904 WHERE process_flag = 1
905 AND (g_all_org = 1
906 OR
907 (g_all_org = 2 AND organization_id = g_org_id));
908
909 -- Get all other substitute components
910
911 CURSOR GetSbc IS
912 SELECT substitute_component_id, last_update_date, last_updated_by, creation_date,
913 created_by, last_update_login, substitute_item_quantity,
914 component_sequence_id, acd_type, change_notice, request_id,
915 program_application_id, program_update_date, attribute_category, attribute1,
916 attribute2, attribute4, attribute5, attribute6, attribute8, attribute9,
917 attribute10, attribute12, attribute13, attribute14, attribute15, program_id,
918 attribute3, attribute7, attribute11, new_sub_comp_id, process_flag,
919 transaction_id, NEW_SUB_COMP_NUMBER, ASSEMBLY_ITEM_NUMBER,
920 COMPONENT_ITEM_NUMBER, SUBSTITUTE_COMP_NUMBER, ORGANIZATION_CODE,
921 ORGANIZATION_ID, ASSEMBLY_ITEM_ID, ALTERNATE_BOM_DESIGNATOR,
922 COMPONENT_ITEM_ID, BILL_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE,
923 interface_entity_type, transaction_type, eng_changes_ifce_key,
924 eng_revised_items_ifce_key, bom_inventory_comps_ifce_key,
925 bom_sub_comps_ifce_key
926 --Bug 3396529: Added New_revised_Item_Revision
927 , New_revised_Item_Revision
928 FROM bom_sub_comps_interface
929 WHERE process_flag = 1
930 AND (g_all_org = 1
931 OR
932 (g_all_org = 2 AND organization_id = g_org_id));
933
934
935 -- Called when there are no more ECO headers.
936 -- Group ECO Revised Resources by ECO Header ifce values
937
938 CURSOR GetRevResWithSameECOifce IS
939 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
940 FROM bom_op_resources_interface
941 WHERE process_flag = 1
942 AND (g_all_org = 1
943 OR
944 (g_all_org = 2 AND organization_id = g_org_id));
945
946 -- Called when there are no more ECO headers.
947 -- Group ECO Revised Operations by ECO Header ifce values
948
949 CURSOR GetRevOpWithSameECOifce IS
950 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key
951 FROM bom_op_sequences_interface
952 WHERE process_flag = 1
953 AND (g_all_org = 1
954 OR
955 (g_all_org = 2 AND organization_id = g_org_id));
956
957 -- Called when there are no more ECO headers.
958 -- Group ECO revisions by ECO Header ifce values
959
960 CURSOR GetLinesWithSameECOifce IS
961 SELECT DISTINCT(eng_changes_ifce_key) eco_ifce_key -- Bug 4033384
962 FROM eng_change_lines_interface
963 WHERE process_flag = 1
964 AND (g_all_org = 1
965 OR
966 (g_all_org = 2 AND organization_id = g_org_id));
967
968
969 PROCEDURE Update_Interface_Tables(p_return_status VARCHAR2)
970 IS
971 l_process_flag NUMBER;
972 BEGIN
973 IF p_return_status = FND_API.G_RET_STS_SUCCESS THEN
974 l_process_flag := G_PF_SUCCESS;
975 ELSE
976 l_process_flag := G_PF_ERROR;
977 END IF;
978
979 UPDATE eng_eng_changes_interface
980 SET PROCESS_FLAG = l_process_flag
981 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
982
983 UPDATE eng_eco_revisions_interface
984 SET PROCESS_FLAG = l_process_flag
985 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
986
987 UPDATE eng_change_lines_interface
988 SET PROCESS_FLAG = l_process_flag
989 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
990
991 UPDATE eng_revised_items_interface
992 SET PROCESS_FLAG = l_process_flag
993 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
994
995 UPDATE bom_inventory_comps_interface
996 SET PROCESS_FLAG = l_process_flag
997 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
998
999 UPDATE bom_sub_comps_interface
1000 SET PROCESS_FLAG = l_process_flag
1001 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
1002
1003 UPDATE bom_ref_desgs_interface
1004 SET PROCESS_FLAG = l_process_flag
1005 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
1006
1007 UPDATE bom_op_resources_interface
1008 SET PROCESS_FLAG = l_process_flag
1009 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
1010
1011 UPDATE bom_op_sequences_interface
1012 SET PROCESS_FLAG = l_process_flag
1013 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
1014
1015 UPDATE bom_sub_op_resources_interface
1016 SET PROCESS_FLAG = l_process_flag
1017 WHERE ENG_CHANGES_IFCE_KEY = g_ECO_ifce_key;
1018
1019 --Bug No: 3737881
1020 --Updating the Error interface tables and the concurrent log
1021 Error_Handler.Write_To_ConcurrentLog;
1022 Error_Handler.WRITE_TO_INTERFACETABLE;
1023 END Update_Interface_Tables;
1024
1025
1026 PROCEDURE Update_Eco_Interface (
1027 p_eco_rec ENG_Eco_PUB.Eco_Rec_Type
1028 ) IS
1029 BEGIN
1030 UPDATE eng_eng_changes_interface
1031 SET ATTRIBUTE7 = p_eco_rec.attribute7
1032 , ATTRIBUTE8 = p_eco_rec.attribute8
1033 , ATTRIBUTE9 = p_eco_rec.attribute9
1034 , ATTRIBUTE10 = p_eco_rec.attribute10
1035 , ATTRIBUTE11 = p_eco_rec.attribute11
1036 , ATTRIBUTE12 = p_eco_rec.attribute12
1037 , ATTRIBUTE13 = p_eco_rec.attribute13
1038 , ATTRIBUTE14 = p_eco_rec.attribute14
1039 , ATTRIBUTE15 = p_eco_rec.attribute15
1040 -- , REQUEST_ID = p_eco_rec.request_id
1041 -- , PROGRAM_APPLICATION_ID = p_eco_rec.program_application_id
1042 -- , PROGRAM_ID = p_eco_rec.program_id
1043 -- , PROGRAM_UPDATE_DATE = p_eco_rec.program_update_date
1044 -- , APPROVAL_STATUS_TYPE = p_eco_rec.approval_status_type
1045 , APPROVAL_DATE = p_eco_rec.approval_date
1046 -- , APPROVAL_LIST_ID = p_eco_rec.approval_list_id
1047 -- , CHANGE_ORDER_TYPE_ID = p_eco_rec.change_order_type_id
1048 -- , RESPONSIBLE_ORGANIZATION_ID = p_eco_rec.responsible_org_id
1049 , APPROVAL_REQUEST_DATE = p_eco_rec.approval_request_date
1050 -- , CHANGE_NOTICE = p_eco_rec.change_notice
1051 -- , ORGANIZATION_ID = p_eco_rec.organization_id
1052 -- , LAST_UPDATE_DATE = p_eco_rec.last_update_date
1053 -- , LAST_UPDATED_BY = p_eco_rec.last_updated_by
1054 -- , CREATION_DATE = p_eco_rec.creation_date
1055 -- , CREATED_BY = p_eco_rec.created_by
1056 -- , LAST_UPDATE_LOGIN = p_eco_rec.last_update_login
1057 , DESCRIPTION = p_eco_rec.description
1058 -- , STATUS_TYPE = p_eco_rec.status_type
1059 -- , INITIATION_DATE = p_eco_rec.initiation_date
1060 -- , IMPLEMENTATION_DATE = p_eco_rec.implementation_date
1061 -- , CANCELLATION_DATE = p_eco_rec.cancellation_date
1062 , CANCELLATION_COMMENTS = p_eco_rec.cancellation_comments
1063 , PRIORITY_CODE = p_eco_rec.priority_code
1064 , REASON_CODE = p_eco_rec.reason_code
1065 -- , ESTIMATED_ENG_COST = p_eco_rec.estimated_eng_cost
1066 -- , ESTIMATED_MFG_COST = p_eco_rec.estimated_mfg_cost
1067 -- , REQUESTOR_ID = p_eco_rec.requestor_id
1068 , ATTRIBUTE_CATEGORY = p_eco_rec.attribute_category
1069 , ATTRIBUTE1 = p_eco_rec.attribute1
1070 , ATTRIBUTE2 = p_eco_rec.attribute2
1071 , ATTRIBUTE3 = p_eco_rec.attribute3
1072 , ATTRIBUTE4 = p_eco_rec.attribute4
1073 , ATTRIBUTE5 = p_eco_rec.attribute5
1074 , ATTRIBUTE6 = p_eco_rec.attribute6
1075 , process_flag = G_PF_SUCCESS --, p_eco_rec.process_flag
1076 , APPROVAL_LIST_NAME = p_eco_rec.approval_list_name
1077 -- , CHANGE_ORDER_TYPE = p_eco_rec.change_order_type
1078 , ORGANIZATION_CODE = p_eco_rec.organization_code
1079 -- , RESPONSIBLE_ORG_CODE = p_eco_rec.responsible_org_code
1080 WHERE transaction_id = p_eco_rec.transaction_id
1081 ;
1082 END Update_Eco_Interface;
1083
1084
1085 PROCEDURE Update_Eco_Revisions_Interface (
1086 p_rev_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type
1087 ) IS
1088 BEGIN
1089 FOR i IN 1..p_rev_tbl.COUNT LOOP
1090 UPDATE eng_eco_revisions_interface SET
1091 attribute11 = p_rev_tbl(i).attribute11,
1092 attribute12 = p_rev_tbl(i).attribute12,
1093 attribute13 = p_rev_tbl(i).attribute13,
1094 attribute14 = p_rev_tbl(i).attribute14,
1095 attribute15 = p_rev_tbl(i).attribute15,
1096 -- revision_id = p_rev_tbl(i).revision_id,
1097 comments = p_rev_tbl(i).comments,
1098 -- program_application_id = p_rev_tbl(i).program_application_id,
1099 -- program_id = p_rev_tbl(i).program_id,
1100 -- program_update_date = p_rev_tbl(i).program_update_date,
1101 -- request_id = p_rev_tbl(i).request_id,
1102 -- change_notice = p_rev_tbl(i).change_notice,
1103 -- organization_id = p_rev_tbl(i).organization_id,
1104 -- revision = p_rev_tbl(i).rev,
1105 -- last_update_date = p_rev_tbl(i).last_update_date,
1106 -- last_updated_by = p_rev_tbl(i).last_updated_by,
1107 -- creation_date = p_rev_tbl(i).creation_date,
1108 -- created_by = p_rev_tbl(i).created_by,
1109 -- last_update_login = p_rev_tbl(i).last_update_login,
1110 attribute_category = p_rev_tbl(i).attribute_category,
1111 attribute1 = p_rev_tbl(i).attribute1,
1112 attribute2 = p_rev_tbl(i).attribute2,
1113 attribute3 = p_rev_tbl(i).attribute3,
1114 attribute4 = p_rev_tbl(i).attribute4,
1115 attribute5 = p_rev_tbl(i).attribute5,
1116 attribute6 = p_rev_tbl(i).attribute6,
1117 attribute7 = p_rev_tbl(i).attribute7,
1118 attribute8 = p_rev_tbl(i).attribute8,
1119 attribute9 = p_rev_tbl(i).attribute9,
1120 attribute10 = p_rev_tbl(i).attribute10,
1121 new_revision = p_rev_tbl(i).new_revision,
1122 organization_code = p_rev_tbl(i).organization_code,
1123 process_flag = G_PF_SUCCESS --, p_rev_tbl(i).process_flag
1124 WHERE transaction_id = p_rev_tbl(i).transaction_id;
1125 END LOOP;
1126 END Update_Eco_Revisions_Interface;
1127
1128
1129 PROCEDURE Update_Revised_Items_Interface (
1130 p_rev_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type
1131 ) IS
1132 BEGIN
1133 FOR i IN 1..p_rev_item_tbl.COUNT LOOP
1134 UPDATE eng_revised_items_interface SET
1135 -- change_notice = p_rev_item_tbl(i).change_notice,
1136 -- organization_id = p_rev_item_tbl(i).organization_id,
1137 -- revised_item_id = p_rev_item_tbl(i).revised_item_id,
1138 -- last_update_date = p_rev_item_tbl(i).last_update_date,
1139 -- last_updated_by = p_rev_item_tbl(i).last_updated_by,
1140 -- creation_date = p_rev_item_tbl(i).creation_date,
1141 -- created_by = p_rev_item_tbl(i).created_by,
1142 -- last_update_login = p_rev_item_tbl(i).last_update_login,
1143 -- implementation_date = p_rev_item_tbl(i).implementation_date,
1144 -- cancellation_date = p_rev_item_tbl(i).cancellation_date,
1145 cancel_comments = p_rev_item_tbl(i).cancel_comments,
1146 disposition_type = p_rev_item_tbl(i).disposition_type,
1147 -- new_item_revision = p_rev_item_tbl(i).new_item_revision,
1148 -- early_schedule_date = p_rev_item_tbl(i).early_schedule_date,
1149 attribute_category = p_rev_item_tbl(i).attribute_category,
1150 attribute1 = p_rev_item_tbl(i).attribute1,
1151 attribute2 = p_rev_item_tbl(i).attribute2,
1152 attribute3 = p_rev_item_tbl(i).attribute3,
1153 attribute4 = p_rev_item_tbl(i).attribute4,
1154 attribute5 = p_rev_item_tbl(i).attribute5,
1155 attribute6 = p_rev_item_tbl(i).attribute6,
1156 attribute7 = p_rev_item_tbl(i).attribute7,
1157 attribute8 = p_rev_item_tbl(i).attribute8,
1158 attribute9 = p_rev_item_tbl(i).attribute9,
1159 attribute10 = p_rev_item_tbl(i).attribute10,
1160 attribute11 = p_rev_item_tbl(i).attribute11,
1161 attribute12 = p_rev_item_tbl(i).attribute12,
1162 attribute13 = p_rev_item_tbl(i).attribute13,
1163 attribute14 = p_rev_item_tbl(i).attribute14,
1164 attribute15 = p_rev_item_tbl(i).attribute15,
1165 status_type = p_rev_item_tbl(i).status_type,
1166 -- scheduled_date = p_rev_item_tbl(i).scheduled_date,
1167 -- bill_sequence_id = p_rev_item_tbl(i).bill_sequence_id,
1168 mrp_active = p_rev_item_tbl(i).mrp_active,
1169 -- request_id = p_rev_item_tbl(i).request_id,
1170 -- program_application_id = p_rev_item_tbl(i).program_application_id,
1171 -- program_id = p_rev_item_tbl(i).program_id,
1172 -- program_update_date = p_rev_item_tbl(i).program_update_date,
1173 update_wip = p_rev_item_tbl(i).update_wip,
1174 -- use_up = p_rev_item_tbl(i).use_up,
1175 -- use_up_item_id = p_rev_item_tbl(i).use_up_item_id,
1176 -- revised_item_sequence_id = p_rev_item_tbl(i).revised_item_sequence_id,
1177 use_up_plan_name = p_rev_item_tbl(i).use_up_plan_name,
1178 -- descriptive_text = p_rev_item_tbl(i).descriptive_text,
1179 -- auto_implement_date = p_rev_item_tbl(i).auto_implement_date,
1180 -- requestor_id = p_rev_item_tbl(i).requestor_id,
1181 -- comments = p_rev_item_tbl(i).comments,
1182 process_flag = G_PF_SUCCESS, --p_rev_item_tbl(i).process_flag,
1183 organization_code = p_rev_item_tbl(i).organization_code,
1184 revised_item_number = p_rev_item_tbl(i).revised_item_name,
1185 use_up_item_number = p_rev_item_tbl(i).use_up_item_name --,
1186 -- alternate_bom_designator = p_rev_item_tbl(i).alternate_bom_designator
1187 WHERE transaction_id = p_rev_item_tbl(i).transaction_id;
1188 END LOOP;
1189 END Update_Revised_Items_Interface;
1190
1191
1192 PROCEDURE Update_Revised_Comps_Interface (
1193 p_rev_comp_tbl BOM_Bo_PUB.Rev_Component_Tbl_Type
1194 ) IS
1195 BEGIN
1196 FOR i IN 1..p_rev_comp_tbl.COUNT LOOP
1197 UPDATE bom_inventory_comps_interface SET
1198 supply_subinventory = p_rev_comp_tbl(i).supply_subinventory,
1199 -- operation_lead_time_percent = p_rev_comp_tbl(i).op_lead_time_percent,
1200 -- revised_item_sequence_id = p_rev_comp_tbl(i).revised_item_sequence_id,
1201 -- cost_factor = p_rev_comp_tbl(i).cost_factor,
1202 required_for_revenue = p_rev_comp_tbl(i).required_for_revenue,
1203 -- high_quantity = p_rev_comp_tbl(i).high_quantity,
1204 -- component_sequence_id = p_rev_comp_tbl(i).component_sequence_id,
1205 -- program_application_id = p_rev_comp_tbl(i).program_application_id,
1206 wip_supply_type = p_rev_comp_tbl(i).wip_supply_type,
1207 -- supply_locator_id = p_rev_comp_tbl(i).supply_locator_id,
1208 -- bom_item_type = p_rev_comp_tbl(i).bom_item_type,
1209 -- operation_seq_num = p_rev_comp_tbl(i).operation_seq_num,
1210 -- component_item_id = p_rev_comp_tbl(i).component_item_id,
1211 -- last_update_date = p_rev_comp_tbl(i).last_update_date,
1212 -- last_updated_by = p_rev_comp_tbl(i).last_updated_by,
1213 -- creation_date = p_rev_comp_tbl(i).creation_date,
1214 -- created_by = p_rev_comp_tbl(i).created_by,
1215 -- last_update_login = p_rev_comp_tbl(i).last_update_login,
1216 -- item_num = p_rev_comp_tbl(i).item_num,
1217 -- component_quantity = p_rev_comp_tbl(i).component_quantity,
1218 -- component_yield_factor = p_rev_comp_tbl(i).component_yield_factor,
1219 -- component_remarks = p_rev_comp_tbl(i).component_remarks,
1220 -- effectivity_date = p_rev_comp_tbl(i).effectivity_date,
1221 -- change_notice = p_rev_comp_tbl(i).change_notice,
1222 -- implementation_date = p_rev_comp_tbl(i).implementation_date,
1223 disable_date = p_rev_comp_tbl(i).disable_date,
1224 attribute_category = p_rev_comp_tbl(i).attribute_category,
1225 attribute1 = p_rev_comp_tbl(i).attribute1,
1226 attribute2 = p_rev_comp_tbl(i).attribute2,
1227 attribute3 = p_rev_comp_tbl(i).attribute3,
1228 attribute4 = p_rev_comp_tbl(i).attribute4,
1229 attribute5 = p_rev_comp_tbl(i).attribute5,
1230 attribute6 = p_rev_comp_tbl(i).attribute6,
1231 attribute7 = p_rev_comp_tbl(i).attribute7,
1232 attribute8 = p_rev_comp_tbl(i).attribute8,
1233 attribute9 = p_rev_comp_tbl(i).attribute9,
1234 attribute10 = p_rev_comp_tbl(i).attribute10,
1235 attribute11 = p_rev_comp_tbl(i).attribute11,
1236 attribute12 = p_rev_comp_tbl(i).attribute12,
1237 attribute13 = p_rev_comp_tbl(i).attribute13,
1238 attribute14 = p_rev_comp_tbl(i).attribute14,
1239 attribute15 = p_rev_comp_tbl(i).attribute15,
1240 -- planning_factor = p_rev_comp_tbl(i).planning_factor,
1241 quantity_related = p_rev_comp_tbl(i).quantity_related,
1242 so_basis = p_rev_comp_tbl(i).so_basis,
1243 optional = p_rev_comp_tbl(i).optional,
1244 -- mutually_exclusive_options = p_rev_comp_tbl(i).mutually_exclusive_opt,
1245 include_in_cost_rollup = p_rev_comp_tbl(i).include_in_cost_rollup,
1246 check_atp = p_rev_comp_tbl(i).check_atp,
1247 shipping_allowed = p_rev_comp_tbl(i).shipping_allowed,
1248 required_to_ship = p_rev_comp_tbl(i).required_to_ship,
1249 include_on_ship_docs = p_rev_comp_tbl(i).include_on_ship_docs,
1250 -- include_on_bill_docs = p_rev_comp_tbl(i).include_on_bill_docs,
1251 -- low_quantity = p_rev_comp_tbl(i).low_quantity,
1252 acd_type = p_rev_comp_tbl(i).acd_type,
1253 -- old_component_sequence_id = p_rev_comp_tbl(i).old_component_sequence_id,
1254 -- bill_sequence_id = p_rev_comp_tbl(i).bill_sequence_id,
1255 -- request_id = p_rev_comp_tbl(i).request_id,
1256 -- program_id = p_rev_comp_tbl(i).program_id,
1257 -- program_update_date = p_rev_comp_tbl(i).program_update_date,
1258 -- pick_components = p_rev_comp_tbl(i).pick_components,
1259 -- assembly_type = p_rev_comp_tbl(i).assembly_type,
1260 -- interface_entity_type = p_rev_comp_tbl(i).interface_entity_type,
1261 -- reference_designator = p_rev_comp_tbl(i).reference_designator,
1262 new_effectivity_date = p_rev_comp_tbl(i).new_effectivity_date,
1263 old_effectivity_date = p_rev_comp_tbl(i).old_effectivity_date,
1264 -- substitute_comp_id = p_rev_comp_tbl(i).substitute_comp_id,
1265 -- new_operation_seq_num = p_rev_comp_tbl(i).new_operation_seq_num,
1266 -- old_operation_seq_num = p_rev_comp_tbl(i).old_operation_seq_num,
1267 -- substitute_comp_number = p_rev_comp_tbl(i).substitute_comp_number,
1268 organization_code = p_rev_comp_tbl(i).organization_code,
1269 -- assembly_item_number = p_rev_comp_tbl(i).assembly_item_number,
1270 -- component_item_number = p_rev_comp_tbl(i).component_item_number,
1271 location_name = p_rev_comp_tbl(i).location_name ,
1272 -- organization_id = p_rev_comp_tbl(i).organization_id,
1273 -- assembly_item_id = p_rev_comp_tbl(i).assembly_item_id,
1274 -- alternate_bom_designator = p_rev_comp_tbl(i).alternate_bom_designator,
1275 -- process_flag = p_rev_comp_tbl(i).process_flag,
1276 basis_type = p_rev_comp_tbl(i).basis_type
1277 WHERE transaction_id = p_rev_comp_tbl(i).row_identifier;
1278 END LOOP;
1279 END Update_Revised_Comps_Interface;
1280
1281
1282 PROCEDURE Update_Sub_Comps_Interface (
1283 p_sub_comp_tbl BOM_Bo_PUB.Sub_Component_Tbl_Type
1284 ) IS
1285 BEGIN
1286 FOR i IN 1..p_sub_comp_tbl.COUNT LOOP
1287 UPDATE bom_sub_comps_interface SET
1288 -- substitute_component_id = p_sub_comp_tbl(i).substitute_component_id,
1289 -- last_update_date = p_sub_comp_tbl(i).last_update_date,
1290 -- last_updated_by = p_sub_comp_tbl(i).last_updated_by,
1291 -- creation_date = p_sub_comp_tbl(i).creation_date,
1292 -- created_by = p_sub_comp_tbl(i).created_by,
1293 -- last_update_login = p_sub_comp_tbl(i).last_update_login,
1294 substitute_item_quantity = p_sub_comp_tbl(i).substitute_item_quantity,
1295 -- component_sequence_id = p_sub_comp_tbl(i).component_sequence_id,
1296 acd_type = p_sub_comp_tbl(i).acd_type,
1297 -- change_notice = p_sub_comp_tbl(i).change_notice,
1298 -- request_id = p_sub_comp_tbl(i).request_id,
1299 -- program_application_id = p_sub_comp_tbl(i).program_application_id,
1300 -- program_update_date = p_sub_comp_tbl(i).program_update_date,
1301 attribute_category = p_sub_comp_tbl(i).attribute_category,
1302 attribute1 = p_sub_comp_tbl(i).attribute1,
1303 attribute2 = p_sub_comp_tbl(i).attribute2,
1304 attribute3 = p_sub_comp_tbl(i).attribute3,
1305 attribute4 = p_sub_comp_tbl(i).attribute4,
1306 attribute5 = p_sub_comp_tbl(i).attribute5,
1307 attribute6 = p_sub_comp_tbl(i).attribute6,
1308 attribute7 = p_sub_comp_tbl(i).attribute7,
1309 attribute8 = p_sub_comp_tbl(i).attribute8,
1310 attribute9 = p_sub_comp_tbl(i).attribute9,
1311 attribute10 = p_sub_comp_tbl(i).attribute10,
1312 attribute11 = p_sub_comp_tbl(i).attribute11,
1313 attribute12 = p_sub_comp_tbl(i).attribute12,
1314 attribute13 = p_sub_comp_tbl(i).attribute13,
1315 attribute14 = p_sub_comp_tbl(i).attribute14,
1316 attribute15 = p_sub_comp_tbl(i).attribute15,
1317 program_id = p_sub_comp_tbl(i).program_id,
1318 -- new_sub_comp_id = p_sub_comp_tbl(i).new_sub_comp_id,
1319 -- process_flag = p_sub_comp_tbl(i).process_flag,
1320 -- new_sub_comp_number = p_sub_comp_tbl(i).new_sub_comp_number,
1321 -- assembly_item_number = p_sub_comp_tbl(i).assembly_item_number,
1322 -- component_item_number = p_sub_comp_tbl(i).component_item_number,
1323 -- substitute_comp_number = p_sub_comp_tbl(i).substitute_comp_number,
1324 organization_code = p_sub_comp_tbl(i).organization_code --,
1325 -- organization_id = p_sub_comp_tbl(i).organization_id,
1326 -- assembly_item_id = p_sub_comp_tbl(i).assembly_item_id,
1327 -- alternate_bom_designator = p_sub_comp_tbl(i).alternate_bom_designator,
1328 -- component_item_id = p_sub_comp_tbl(i).component_item_id,
1329 -- bill_sequence_id = p_sub_comp_tbl(i).bill_sequence_id,
1330 -- operation_seq_num = p_sub_comp_tbl(i).operation_seq_num,
1331 -- effectivity_date = p_sub_comp_tbl(i).effectivity_date,
1332 -- interface_entity_type = p_sub_comp_tbl(i).interface_entity_type
1333 WHERE transaction_id = p_sub_comp_tbl(i).row_identifier;
1334 END LOOP;
1335 END Update_Sub_Comps_Interface;
1336
1337
1338 PROCEDURE Update_Ref_Desig_Interface (
1339 p_ref_desg_tbl BOM_Bo_PUB.Ref_Designator_Tbl_Type
1340 ) IS
1341 BEGIN
1342 FOR i IN 1..p_ref_desg_tbl.COUNT LOOP
1343 UPDATE bom_ref_desgs_interface SET
1344 -- component_reference_designator = p_ref_desg_tbl(i).ref_designator,
1345 -- last_update_date = p_ref_desg_tbl(i).last_update_date,
1346 -- last_updated_by = p_ref_desg_tbl(i).last_updated_by,
1347 -- creation_date = p_ref_desg_tbl(i).creation_date,
1348 -- created_by = p_ref_desg_tbl(i).created_by,
1349 -- last_update_login = p_ref_desg_tbl(i).last_update_login,
1350 ref_designator_comment = p_ref_desg_tbl(i).ref_designator_comment,
1351 -- change_notice = p_ref_desg_tbl(i).change_notice,
1352 -- component_sequence_id = p_ref_desg_tbl(i).component_sequence_id,
1353 acd_type = p_ref_desg_tbl(i).acd_type,
1354 -- request_id = p_ref_desg_tbl(i).request_id,
1355 -- program_application_id = p_ref_desg_tbl(i).program_application_id,
1356 -- program_id = p_ref_desg_tbl(i).program_id,
1357 -- program_update_date = p_ref_desg_tbl(i).program_update_date,
1358 attribute_category = p_ref_desg_tbl(i).attribute_category,
1359 attribute1 = p_ref_desg_tbl(i).attribute1,
1360 attribute2 = p_ref_desg_tbl(i).attribute2,
1361 attribute3 = p_ref_desg_tbl(i).attribute3,
1362 attribute4 = p_ref_desg_tbl(i).attribute4,
1363 attribute5 = p_ref_desg_tbl(i).attribute5,
1364 attribute6 = p_ref_desg_tbl(i).attribute6,
1365 attribute7 = p_ref_desg_tbl(i).attribute7,
1366 attribute8 = p_ref_desg_tbl(i).attribute8,
1367 attribute9 = p_ref_desg_tbl(i).attribute9,
1368 attribute10 = p_ref_desg_tbl(i).attribute10,
1369 attribute11 = p_ref_desg_tbl(i).attribute11,
1370 attribute12 = p_ref_desg_tbl(i).attribute12,
1371 attribute13 = p_ref_desg_tbl(i).attribute13,
1372 attribute14 = p_ref_desg_tbl(i).attribute14,
1373 attribute15 = p_ref_desg_tbl(i).attribute15,
1374 -- new_designator = p_ref_desg_tbl(i).new_designator,
1375 -- process_flag = p_ref_desg_tbl(i).process_flag,
1376 -- assembly_item_number = p_ref_desg_tbl(i).assembly_item_number,
1377 -- component_item_number = p_ref_desg_tbl(i).component_item_number,
1378 organization_code = p_ref_desg_tbl(i).organization_code --,
1379 -- organization_id = p_ref_desg_tbl(i).organization_id,
1380 -- assembly_item_id = p_ref_desg_tbl(i).assembly_item_id,
1381 -- alternate_bom_designator = p_ref_desg_tbl(i).alternate_bom_designator,
1382 -- component_item_id = p_ref_desg_tbl(i).component_item_id,
1383 -- bill_sequence_id = p_ref_desg_tbl(i).bill_sequence_id,
1384 -- operation_seq_num = p_ref_desg_tbl(i).operation_seq_num,
1385 -- effectivity_date = p_ref_desg_tbl(i).effectivity_date,
1386 -- interface_entity_type = p_ref_desg_tbl(i).interface_entity_type
1387 WHERE transaction_id = p_ref_desg_tbl(i).row_identifier;
1388 END LOOP;
1389 END Update_Ref_Desig_Interface;
1390
1391 /*
1392 PROCEDURE Update_Error_Table (
1393 p_error_tbl ENG_Eco_PUB.Error_Tbl_Type,
1394 p_top_ifce_key VARCHAR2 DEFAULT NULL,
1395 x_unexp_error OUT NOCOPY VARCHAR2
1396 ) IS
1397 BEGIN
1398 FOR i IN 1..p_error_tbl.COUNT LOOP
1399 IF (p_error_tbl(i).message_name is NOT NULL) THEN
1400 INSERT INTO mtl_interface_errors
1401 (ORGANIZATION_ID,
1402 UNIQUE_ID,
1403 LAST_UPDATE_DATE,
1404 LAST_UPDATED_BY,
1405 CREATION_DATE,
1406 CREATED_BY,
1407 LAST_UPDATE_LOGIN,
1408 TABLE_NAME,
1409 MESSAGE_NAME,
1410 REQUEST_ID,
1411 PROGRAM_APPLICATION_ID,
1412 PROGRAM_ID,
1413 PROGRAM_UPDATE_DATE,
1414 ERROR_MESSAGE,
1415 TRANSACTION_ID)
1416 VALUES
1417 (p_error_tbl(i).organization_id,
1418 mtl_system_items_interface_s.nextval,
1419 sysdate,
1420 FND_GLOBAL.USER_ID,
1421 sysdate,
1422 FND_GLOBAL.USER_ID,
1423 FND_GLOBAL.USER_ID,
1424 p_error_tbl(i).table_name,
1425 p_error_tbl(i).message_name,
1426 FND_GLOBAL.CONC_REQUEST_ID,
1427 FND_GLOBAL.PROG_APPL_ID,
1428 FND_GLOBAL.CONC_PROGRAM_ID,
1429 sysdate,
1430 p_error_tbl(i).error_message,
1431 p_error_tbl(i).transaction_id);
1432 ELSE
1433 FND_MESSAGE.Set_Name('ENG', 'ENG_ECOOI_UNEXPECTED_ERROR');
1434 FND_MESSAGE.Set_Token('ERROR', p_error_tbl(i).error_message);
1435 FND_MESSAGE.Set_Token('TRANSACTION_ID',
1436 to_char(p_error_tbl(i).transaction_id));
1437 FND_MESSAGE.Set_Token('IFCE_KEY', p_top_ifce_key);
1438
1439 x_unexp_error := substr(FND_MESSAGE.Get, 1, 1000);
1440 EXIT;
1441 END IF;
1442 END LOOP;
1443 END Update_Error_Table;
1444 */
1445 -- Procedure Get_Revs_With_Curr_ECO_Ifce
1446 -- Pick up all ECO revisions with the current ECO ifce key value
1447
1448 PROCEDURE Get_Revs_With_Curr_ECO_Ifce
1449 IS
1450 q number;
1451 stmt_num number;
1452 BEGIN
1453 q := 0;
1454 FOR c7rec IN GetRevWithCurrECOifce LOOP
1455 q := q + 1;
1456 g_public_rev_tbl(q).attribute11 := c7rec.attribute11;
1457 g_public_rev_tbl(q).attribute12 := c7rec.attribute12;
1458 g_public_rev_tbl(q).attribute13 := c7rec.attribute13;
1459 g_public_rev_tbl(q).attribute14 := c7rec.attribute14;
1460 g_public_rev_tbl(q).attribute15 := c7rec.attribute15;
1461 -- g_public_rev_tbl(q).program_application_id := c7rec.program_application_id;
1462 -- g_public_rev_tbl(q).program_id := c7rec.program_id;
1463 -- g_public_rev_tbl(q).program_update_date := c7rec.program_update_date;
1464 -- g_public_rev_tbl(q).request_id := c7rec.request_id;
1465 -- g_public_rev_tbl(q).revision_id := c7rec.revision_id;
1466 g_public_rev_tbl(q).eco_name := c7rec.change_notice;
1467 -- g_public_rev_tbl(q).organization_id := c7rec.organization_id;
1468 g_public_rev_tbl(q).revision := c7rec.revision;
1469 -- g_public_rev_tbl(q).last_update_date := c7rec.last_update_date;
1470 -- g_public_rev_tbl(q).last_updated_by := c7rec.last_updated_by;
1471 -- g_public_rev_tbl(q).creation_date := c7rec.creation_date;
1472 -- g_public_rev_tbl(q).created_by := c7rec.created_by;
1473 -- g_public_rev_tbl(q).last_update_login := c7rec.last_update_login;
1474 g_public_rev_tbl(q).comments := c7rec.comments;
1475 g_public_rev_tbl(q).attribute_category := c7rec.attribute_category;
1476 g_public_rev_tbl(q).attribute1 := c7rec.attribute1;
1477 g_public_rev_tbl(q).attribute2 := c7rec.attribute2;
1478 g_public_rev_tbl(q).attribute3 := c7rec.attribute3;
1479 g_public_rev_tbl(q).attribute4 := c7rec.attribute4;
1480 g_public_rev_tbl(q).attribute5 := c7rec.attribute5;
1481 g_public_rev_tbl(q).attribute6 := c7rec.attribute6;
1482 g_public_rev_tbl(q).attribute7 := c7rec.attribute7;
1483 g_public_rev_tbl(q).attribute8 := c7rec.attribute8;
1484 g_public_rev_tbl(q).attribute9 := c7rec.attribute9;
1485 g_public_rev_tbl(q).attribute10 := c7rec.attribute10;
1486 g_public_rev_tbl(q).new_revision := c7rec.new_revision;
1487 g_public_rev_tbl(q).organization_code := c7rec.organization_code;
1488 -- g_public_rev_tbl(q).process_flag := c7rec.process_flag;
1489 g_public_rev_tbl(q).transaction_id := c7rec.transaction_id;
1490 g_public_rev_tbl(q).transaction_type := c7rec.transaction_type;
1491 END LOOP; -- END ECO REV LOOP
1492 END Get_Revs_With_Curr_ECO_Ifce;
1493
1494 -- Procedure Get_Items_With_Curr_ECO_Ifce
1495 -- Pick up all revised items with ECO ifce key = g_ECO_ifce_key
1496
1497 PROCEDURE Get_Items_With_Curr_ECO_Ifce
1498 IS
1499 k number;
1500 BEGIN
1501 k := 0;
1502 FOR c3rec IN GetItemWithCurrECOifce LOOP
1503 k := k + 1;
1504 g_encoin_rev_item_tbl(k).change_notice := c3rec.change_notice;
1505 g_encoin_rev_item_tbl(k).organization_id := c3rec.organization_id;
1506 g_encoin_rev_item_tbl(k).revised_item_id := c3rec.revised_item_id;
1507 g_encoin_rev_item_tbl(k).last_update_date := c3rec.last_update_date;
1508 g_encoin_rev_item_tbl(k).last_updated_by := c3rec.last_updated_by;
1509 g_encoin_rev_item_tbl(k).creation_date := c3rec.creation_date;
1510 g_encoin_rev_item_tbl(k).created_by := c3rec.created_by;
1511 g_encoin_rev_item_tbl(k).last_update_login := c3rec.last_update_login;
1512 g_encoin_rev_item_tbl(k).implementation_date := c3rec.implementation_date;
1513 g_encoin_rev_item_tbl(k).cancellation_date := c3rec.cancellation_date;
1514 g_encoin_rev_item_tbl(k).cancel_comments := c3rec.cancel_comments;
1515 g_encoin_rev_item_tbl(k).disposition_type := c3rec.disposition_type;
1516 g_encoin_rev_item_tbl(k).new_item_revision := c3rec.new_item_revision;
1517 g_encoin_rev_item_tbl(k).early_schedule_date := c3rec.early_schedule_date;
1518 g_encoin_rev_item_tbl(k).attribute_category := c3rec.attribute_category;
1519 g_encoin_rev_item_tbl(k).attribute2 := c3rec.attribute2;
1520 g_encoin_rev_item_tbl(k).attribute3 := c3rec.attribute3;
1521 g_encoin_rev_item_tbl(k).attribute4 := c3rec.attribute4;
1522 g_encoin_rev_item_tbl(k).attribute5 := c3rec.attribute5;
1523 g_encoin_rev_item_tbl(k).attribute7 := c3rec.attribute7;
1524 g_encoin_rev_item_tbl(k).attribute8 := c3rec.attribute8;
1525 g_encoin_rev_item_tbl(k).attribute9 := c3rec.attribute9;
1526 g_encoin_rev_item_tbl(k).attribute11 := c3rec.attribute11;
1527 g_encoin_rev_item_tbl(k).attribute12 := c3rec.attribute12;
1528 g_encoin_rev_item_tbl(k).attribute13 := c3rec.attribute13;
1529 g_encoin_rev_item_tbl(k).attribute14 := c3rec.attribute14;
1530 g_encoin_rev_item_tbl(k).attribute15 := c3rec.attribute15;
1531 g_encoin_rev_item_tbl(k).status_type := c3rec.status_type;
1532 g_encoin_rev_item_tbl(k).scheduled_date := c3rec.scheduled_date;
1533 g_encoin_rev_item_tbl(k).bill_sequence_id := c3rec.bill_sequence_id;
1534 g_encoin_rev_item_tbl(k).mrp_active := c3rec.mrp_active;
1535 g_encoin_rev_item_tbl(k).request_id := c3rec.request_id;
1536 g_encoin_rev_item_tbl(k).program_application_id := c3rec.program_application_id;
1537 g_encoin_rev_item_tbl(k).program_id := c3rec.program_id;
1538 g_encoin_rev_item_tbl(k).program_update_date := c3rec.program_update_date;
1539 g_encoin_rev_item_tbl(k).update_wip := c3rec.update_wip;
1540 g_encoin_rev_item_tbl(k).use_up := c3rec.use_up;
1541 g_encoin_rev_item_tbl(k).use_up_item_id := c3rec.use_up_item_id;
1542 g_encoin_rev_item_tbl(k).revised_item_sequence_id := c3rec.revised_item_sequence_id;
1543 g_encoin_rev_item_tbl(k).use_up_plan_name := c3rec.use_up_plan_name;
1544 g_encoin_rev_item_tbl(k).descriptive_text := c3rec.descriptive_text;
1545 g_encoin_rev_item_tbl(k).auto_implement_date := c3rec.auto_implement_date;
1546 g_encoin_rev_item_tbl(k).attribute1 := c3rec.attribute1;
1547 g_encoin_rev_item_tbl(k).attribute6 := c3rec.attribute6;
1548 g_encoin_rev_item_tbl(k).attribute10 := c3rec.attribute10;
1549 g_encoin_rev_item_tbl(k).requestor_id := c3rec.requestor_id;
1550 g_encoin_rev_item_tbl(k).comments := c3rec.comments;
1551 g_encoin_rev_item_tbl(k).process_flag := c3rec.process_flag;
1552 g_encoin_rev_item_tbl(k).transaction_id := c3rec.transaction_id;
1553 g_encoin_rev_item_tbl(k).organization_code := c3rec.organization_code;
1554 g_encoin_rev_item_tbl(k).revised_item_number := c3rec.revised_item_number;
1555 g_encoin_rev_item_tbl(k).new_rtg_revision := c3rec.new_rtg_revision;
1556 g_encoin_rev_item_tbl(k).use_up_item_number := c3rec.use_up_item_number;
1557 g_encoin_rev_item_tbl(k).alternate_bom_designator := c3rec.alternate_bom_designator;
1558 g_encoin_rev_item_tbl(k).operation := c3rec.transaction_type;
1559 g_encoin_rev_item_tbl(k).eng_revised_items_ifce_key := c3rec.ENG_REVISED_ITEMS_IFCE_KEY;
1560 g_encoin_rev_item_tbl(k).parent_revised_item_name :=c3rec.parent_revised_item_name;
1561 g_encoin_rev_item_tbl(k).parent_alternate_name :=c3rec.parent_alternate_name;
1562 g_encoin_rev_item_tbl(k).updated_item_revision := c3rec.updated_item_revision; -- Bug 3432944
1563 g_encoin_rev_item_tbl(k).New_scheduled_date := c3rec.New_scheduled_date; -- Bug 3432944
1564 g_encoin_rev_item_tbl(k).from_item_revision := c3rec.from_item_revision; -- 11.5.10E
1565 g_encoin_rev_item_tbl(k).new_revision_label := c3rec.new_revision_label;
1566 g_encoin_rev_item_tbl(k).New_Revised_Item_Rev_Desc := c3rec.New_Revised_Item_Rev_Desc;
1567 g_encoin_rev_item_tbl(k).new_revision_reason := c3rec.new_revision_reason;
1568 g_encoin_rev_item_tbl(k).from_end_item_unit_number := c3rec.from_end_item_unit_number; /*Bug 6377841*/
1569 END LOOP; -- End Rev Items Loop
1570 END Get_Items_With_Curr_ECO_Ifce;
1571
1572 -- Procedure Get_Comps_With_Curr_ECO_Ifce
1573 -- Pick up all revised components with ECO ifce key = g_ECO_ifce_key
1574
1575 PROCEDURE Get_Comps_With_Curr_ECO_Ifce
1576 IS
1577 v number;
1578 stmt_num number;
1579 BEGIN
1580 v := 0;
1581 FOR c12rec IN GetCompWithCurrECOifce LOOP
1582 v := v + 1;
1583 g_encoin_rev_comp_tbl(v).supply_subinventory := c12rec.supply_subinventory;
1584 g_encoin_rev_comp_tbl(v).OP_LEAD_TIME_PERCENT := c12rec.OPERATION_LEAD_TIME_PERCENT;
1585 g_encoin_rev_comp_tbl(v).revised_item_sequence_id := c12rec.revised_item_sequence_id;
1586 g_encoin_rev_comp_tbl(v).cost_factor := c12rec.cost_factor;
1587 g_encoin_rev_comp_tbl(v).required_for_revenue := c12rec.required_for_revenue;
1588 g_encoin_rev_comp_tbl(v).high_quantity := c12rec.high_quantity;
1589 g_encoin_rev_comp_tbl(v).component_sequence_id := c12rec.component_sequence_id;
1590 g_encoin_rev_comp_tbl(v).program_application_id := c12rec.program_application_id;
1591 g_encoin_rev_comp_tbl(v).wip_supply_type := c12rec.wip_supply_type;
1592 g_encoin_rev_comp_tbl(v).supply_locator_id := c12rec.supply_locator_id;
1593 g_encoin_rev_comp_tbl(v).bom_item_type := c12rec.bom_item_type;
1594 g_encoin_rev_comp_tbl(v).operation_seq_num := c12rec.operation_seq_num;
1595 g_encoin_rev_comp_tbl(v).component_item_id := c12rec.component_item_id;
1596 g_encoin_rev_comp_tbl(v).last_update_date := c12rec.last_update_date;
1597 g_encoin_rev_comp_tbl(v).last_updated_by := c12rec.last_updated_by;
1598 g_encoin_rev_comp_tbl(v).creation_date := c12rec.creation_date;
1599 g_encoin_rev_comp_tbl(v).created_by := c12rec.created_by;
1600 g_encoin_rev_comp_tbl(v).last_update_login := c12rec.last_update_login;
1601 g_encoin_rev_comp_tbl(v).item_num := c12rec.item_num;
1602 g_encoin_rev_comp_tbl(v).component_quantity := c12rec.component_quantity;
1603 g_encoin_rev_comp_tbl(v).component_yield_factor := c12rec.component_yield_factor;
1604 g_encoin_rev_comp_tbl(v).component_remarks := c12rec.component_remarks;
1605 g_encoin_rev_comp_tbl(v).effectivity_date := c12rec.effectivity_date;
1606 g_encoin_rev_comp_tbl(v).revised_item_number := c12rec.revised_item_number;
1607 g_encoin_rev_comp_tbl(v).change_notice := c12rec.change_notice;
1608 g_encoin_rev_comp_tbl(v).implementation_date := c12rec.implementation_date;
1609 g_encoin_rev_comp_tbl(v).disable_date := c12rec.disable_date;
1610 g_encoin_rev_comp_tbl(v).attribute_category := c12rec.attribute_category;
1611 g_encoin_rev_comp_tbl(v).attribute1 := c12rec.attribute1;
1612 g_encoin_rev_comp_tbl(v).attribute2 := c12rec.attribute2;
1613 g_encoin_rev_comp_tbl(v).attribute3 := c12rec.attribute3;
1614 g_encoin_rev_comp_tbl(v).attribute4 := c12rec.attribute4;
1615 g_encoin_rev_comp_tbl(v).attribute5 := c12rec.attribute5;
1616 g_encoin_rev_comp_tbl(v).attribute6 := c12rec.attribute6;
1617 g_encoin_rev_comp_tbl(v).attribute7 := c12rec.attribute7;
1618 g_encoin_rev_comp_tbl(v).attribute8 := c12rec.attribute8;
1619 g_encoin_rev_comp_tbl(v).attribute9 := c12rec.attribute9;
1620 g_encoin_rev_comp_tbl(v).attribute10 := c12rec.attribute10;
1621 g_encoin_rev_comp_tbl(v).attribute11 := c12rec.attribute11;
1622 g_encoin_rev_comp_tbl(v).attribute12 := c12rec.attribute12;
1623 g_encoin_rev_comp_tbl(v).attribute13 := c12rec.attribute13;
1624 g_encoin_rev_comp_tbl(v).attribute14 := c12rec.attribute14;
1625 g_encoin_rev_comp_tbl(v).attribute15 := c12rec.attribute15;
1626 g_encoin_rev_comp_tbl(v).planning_factor := c12rec.planning_factor;
1627 g_encoin_rev_comp_tbl(v).quantity_related := c12rec.quantity_related;
1628 g_encoin_rev_comp_tbl(v).so_basis := c12rec.so_basis;
1629 g_encoin_rev_comp_tbl(v).optional := c12rec.optional;
1630 g_encoin_rev_comp_tbl(v).MUTUALLY_EXCLUSIVE_OPT := c12rec.MUTUALLY_EXCLUSIVE_OPTIONS;
1631 g_encoin_rev_comp_tbl(v).include_in_cost_rollup := c12rec.include_in_cost_rollup;
1632 g_encoin_rev_comp_tbl(v).check_atp := c12rec.check_atp;
1633 g_encoin_rev_comp_tbl(v).shipping_allowed := c12rec.shipping_allowed;
1634 g_encoin_rev_comp_tbl(v).required_to_ship := c12rec.required_to_ship;
1635 g_encoin_rev_comp_tbl(v).include_on_ship_docs := c12rec.include_on_ship_docs;
1636 g_encoin_rev_comp_tbl(v).include_on_bill_docs := c12rec.include_on_bill_docs;
1637 g_encoin_rev_comp_tbl(v).low_quantity := c12rec.low_quantity;
1638 g_encoin_rev_comp_tbl(v).acd_type := c12rec.acd_type;
1639 g_encoin_rev_comp_tbl(v).old_component_sequence_id := c12rec.old_component_sequence_id;
1640 g_encoin_rev_comp_tbl(v).bill_sequence_id := c12rec.bill_sequence_id;
1641 g_encoin_rev_comp_tbl(v).request_id := c12rec.request_id;
1642 g_encoin_rev_comp_tbl(v).program_id := c12rec.program_id;
1643 g_encoin_rev_comp_tbl(v).program_update_date := c12rec.program_update_date;
1644 g_encoin_rev_comp_tbl(v).pick_components := c12rec.pick_components;
1645 g_encoin_rev_comp_tbl(v).assembly_type := c12rec.assembly_type;
1646 g_encoin_rev_comp_tbl(v).interface_entity_type := c12rec.interface_entity_type;
1647 g_encoin_rev_comp_tbl(v).reference_designator := c12rec.reference_designator;
1648 g_encoin_rev_comp_tbl(v).new_effectivity_date := c12rec.new_effectivity_date;
1649 g_encoin_rev_comp_tbl(v).old_effectivity_date := c12rec.old_effectivity_date;
1650 g_encoin_rev_comp_tbl(v).substitute_comp_id := c12rec.substitute_comp_id;
1651 g_encoin_rev_comp_tbl(v).new_operation_seq_num := c12rec.new_operation_seq_num;
1652 g_encoin_rev_comp_tbl(v).old_operation_seq_num := c12rec.old_operation_seq_num;
1653 g_encoin_rev_comp_tbl(v).process_flag := c12rec.process_flag;
1654 g_encoin_rev_comp_tbl(v).transaction_id := c12rec.transaction_id;
1655 g_encoin_rev_comp_tbl(v).SUBSTITUTE_COMP_NUMBER := c12rec.SUBSTITUTE_COMP_NUMBER;
1656 g_encoin_rev_comp_tbl(v).ORGANIZATION_CODE := c12rec.ORGANIZATION_CODE;
1657 g_encoin_rev_comp_tbl(v).ASSEMBLY_ITEM_NUMBER := c12rec.ASSEMBLY_ITEM_NUMBER;
1658 g_encoin_rev_comp_tbl(v).COMPONENT_ITEM_NUMBER := c12rec.COMPONENT_ITEM_NUMBER;
1659 g_encoin_rev_comp_tbl(v).LOCATION_NAME := c12rec.LOCATION_NAME;
1660 g_encoin_rev_comp_tbl(v).ORGANIZATION_ID := c12rec.ORGANIZATION_ID;
1661 g_encoin_rev_comp_tbl(v).ASSEMBLY_ITEM_ID := c12rec.ASSEMBLY_ITEM_ID;
1662 g_encoin_rev_comp_tbl(v).ALTERNATE_BOM_DESIGNATOR := c12rec.ALTERNATE_BOM_DESIGNATOR;
1663 g_encoin_rev_comp_tbl(v).operation := c12rec.transaction_type;
1664 g_encoin_rev_comp_tbl(v).eng_changes_ifce_key := c12rec.ENG_CHANGES_IFCE_KEY;
1665 g_encoin_rev_comp_tbl(v).eng_revised_items_ifce_key := c12rec.ENG_REVISED_ITEMS_IFCE_KEY;
1666 g_encoin_rev_comp_tbl(v).bom_inventory_comps_ifce_key := c12rec.BOM_INVENTORY_COMPS_IFCE_KEY;
1667 g_encoin_rev_comp_tbl(v).basis_type := c12rec.basis_type;
1668 --Bug 3396529: Added New_revised_Item_Revision
1669 g_encoin_rev_comp_tbl(v).New_revised_Item_Revision := c12rec.New_revised_Item_Revision;
1670 g_encoin_rev_comp_tbl(v).from_end_item_unit_number := c12rec.from_end_item_unit_number; /*Bug 6377841*/
1671 g_encoin_rev_comp_tbl(v).to_end_item_unit_number := c12rec.to_end_item_unit_number; /*Bug 6377841*/
1672
1673 END LOOP; -- End Rev comps loop
1674 END Get_Comps_With_Curr_ECO_Ifce;
1675
1676 -- Procedure Get_Comps_With_Curr_Item_Ifce
1677 -- Pick up all revised components with item ifce key = g_revised_item_key
1678
1679 PROCEDURE Get_Comps_With_Curr_Item_Ifce
1680 IS
1681 v number;
1682 stmt_num number;
1683 BEGIN
1684 v := 0;
1685 FOR c12rec IN GetCompWithCurrItemifce LOOP
1686 v := v + 1;
1687 g_encoin_rev_comp_tbl(v).supply_subinventory := c12rec.supply_subinventory;
1688 g_encoin_rev_comp_tbl(v).OP_LEAD_TIME_PERCENT := c12rec.OPERATION_LEAD_TIME_PERCENT;
1689 g_encoin_rev_comp_tbl(v).revised_item_sequence_id := c12rec.revised_item_sequence_id;
1690 g_encoin_rev_comp_tbl(v).cost_factor := c12rec.cost_factor;
1691 g_encoin_rev_comp_tbl(v).required_for_revenue := c12rec.required_for_revenue;
1692 g_encoin_rev_comp_tbl(v).high_quantity := c12rec.high_quantity;
1693 g_encoin_rev_comp_tbl(v).component_sequence_id := c12rec.component_sequence_id;
1694 g_encoin_rev_comp_tbl(v).program_application_id := c12rec.program_application_id;
1695 g_encoin_rev_comp_tbl(v).wip_supply_type := c12rec.wip_supply_type;
1696 g_encoin_rev_comp_tbl(v).supply_locator_id := c12rec.supply_locator_id;
1697 g_encoin_rev_comp_tbl(v).bom_item_type := c12rec.bom_item_type;
1698 g_encoin_rev_comp_tbl(v).operation_seq_num := c12rec.operation_seq_num;
1699 g_encoin_rev_comp_tbl(v).component_item_id := c12rec.component_item_id;
1700 g_encoin_rev_comp_tbl(v).last_update_date := c12rec.last_update_date;
1701 g_encoin_rev_comp_tbl(v).last_updated_by := c12rec.last_updated_by;
1702 g_encoin_rev_comp_tbl(v).creation_date := c12rec.creation_date;
1703 g_encoin_rev_comp_tbl(v).created_by := c12rec.created_by;
1704 g_encoin_rev_comp_tbl(v).last_update_login := c12rec.last_update_login;
1705 g_encoin_rev_comp_tbl(v).item_num := c12rec.item_num;
1706 g_encoin_rev_comp_tbl(v).component_quantity := c12rec.component_quantity;
1707 g_encoin_rev_comp_tbl(v).component_yield_factor := c12rec.component_yield_factor;
1708 g_encoin_rev_comp_tbl(v).component_remarks := c12rec.component_remarks;
1709 g_encoin_rev_comp_tbl(v).effectivity_date := c12rec.effectivity_date;
1710 g_encoin_rev_comp_tbl(v).change_notice := c12rec.change_notice;
1711 g_encoin_rev_comp_tbl(v).implementation_date := c12rec.implementation_date;
1712 g_encoin_rev_comp_tbl(v).disable_date := c12rec.disable_date;
1713 g_encoin_rev_comp_tbl(v).attribute_category := c12rec.attribute_category;
1714 g_encoin_rev_comp_tbl(v).attribute1 := c12rec.attribute1;
1715 g_encoin_rev_comp_tbl(v).attribute2 := c12rec.attribute2;
1716 g_encoin_rev_comp_tbl(v).attribute3 := c12rec.attribute3;
1717 g_encoin_rev_comp_tbl(v).attribute4 := c12rec.attribute4;
1718 g_encoin_rev_comp_tbl(v).attribute5 := c12rec.attribute5;
1719 g_encoin_rev_comp_tbl(v).attribute6 := c12rec.attribute6;
1720 g_encoin_rev_comp_tbl(v).attribute7 := c12rec.attribute7;
1721 g_encoin_rev_comp_tbl(v).attribute8 := c12rec.attribute8;
1722 g_encoin_rev_comp_tbl(v).attribute9 := c12rec.attribute9;
1723 g_encoin_rev_comp_tbl(v).attribute10 := c12rec.attribute10;
1724 g_encoin_rev_comp_tbl(v).attribute11 := c12rec.attribute11;
1725 g_encoin_rev_comp_tbl(v).attribute12 := c12rec.attribute12;
1726 g_encoin_rev_comp_tbl(v).attribute13 := c12rec.attribute13;
1727 g_encoin_rev_comp_tbl(v).attribute14 := c12rec.attribute14;
1728 g_encoin_rev_comp_tbl(v).attribute15 := c12rec.attribute15;
1729 g_encoin_rev_comp_tbl(v).planning_factor := c12rec.planning_factor;
1730 g_encoin_rev_comp_tbl(v).quantity_related := c12rec.quantity_related;
1731 g_encoin_rev_comp_tbl(v).so_basis := c12rec.so_basis;
1732 g_encoin_rev_comp_tbl(v).optional := c12rec.optional;
1733 g_encoin_rev_comp_tbl(v).MUTUALLY_EXCLUSIVE_OPT := c12rec.MUTUALLY_EXCLUSIVE_OPTIONS;
1734 g_encoin_rev_comp_tbl(v).include_in_cost_rollup := c12rec.include_in_cost_rollup;
1735 g_encoin_rev_comp_tbl(v).check_atp := c12rec.check_atp;
1736 g_encoin_rev_comp_tbl(v).shipping_allowed := c12rec.shipping_allowed;
1737 g_encoin_rev_comp_tbl(v).required_to_ship := c12rec.required_to_ship;
1738 g_encoin_rev_comp_tbl(v).include_on_ship_docs := c12rec.include_on_ship_docs;
1739 g_encoin_rev_comp_tbl(v).include_on_bill_docs := c12rec.include_on_bill_docs;
1740 g_encoin_rev_comp_tbl(v).low_quantity := c12rec.low_quantity;
1741 g_encoin_rev_comp_tbl(v).acd_type := c12rec.acd_type;
1742 g_encoin_rev_comp_tbl(v).old_component_sequence_id := c12rec.old_component_sequence_id;
1743 g_encoin_rev_comp_tbl(v).bill_sequence_id := c12rec.bill_sequence_id;
1744 g_encoin_rev_comp_tbl(v).request_id := c12rec.request_id;
1745 g_encoin_rev_comp_tbl(v).program_id := c12rec.program_id;
1746 g_encoin_rev_comp_tbl(v).program_update_date := c12rec.program_update_date;
1747 g_encoin_rev_comp_tbl(v).pick_components := c12rec.pick_components;
1748 g_encoin_rev_comp_tbl(v).assembly_type := c12rec.assembly_type;
1749 g_encoin_rev_comp_tbl(v).interface_entity_type := c12rec.interface_entity_type;
1750 g_encoin_rev_comp_tbl(v).reference_designator := c12rec.reference_designator;
1751 g_encoin_rev_comp_tbl(v).new_effectivity_date := c12rec.new_effectivity_date;
1752 g_encoin_rev_comp_tbl(v).old_effectivity_date := c12rec.old_effectivity_date;
1753 g_encoin_rev_comp_tbl(v).substitute_comp_id := c12rec.substitute_comp_id;
1754 g_encoin_rev_comp_tbl(v).new_operation_seq_num := c12rec.new_operation_seq_num;
1755 g_encoin_rev_comp_tbl(v).old_operation_seq_num := c12rec.old_operation_seq_num;
1756 g_encoin_rev_comp_tbl(v).process_flag := c12rec.process_flag;
1757 g_encoin_rev_comp_tbl(v).transaction_id := c12rec.transaction_id;
1758 g_encoin_rev_comp_tbl(v).SUBSTITUTE_COMP_NUMBER := c12rec.SUBSTITUTE_COMP_NUMBER;
1759 g_encoin_rev_comp_tbl(v).ORGANIZATION_CODE := c12rec.ORGANIZATION_CODE;
1760 g_encoin_rev_comp_tbl(v).ASSEMBLY_ITEM_NUMBER := c12rec.ASSEMBLY_ITEM_NUMBER;
1761 g_encoin_rev_comp_tbl(v).COMPONENT_ITEM_NUMBER := c12rec.COMPONENT_ITEM_NUMBER;
1762 g_encoin_rev_comp_tbl(v).LOCATION_NAME := c12rec.LOCATION_NAME;
1763 g_encoin_rev_comp_tbl(v).ORGANIZATION_ID := c12rec.ORGANIZATION_ID;
1764 g_encoin_rev_comp_tbl(v).ASSEMBLY_ITEM_ID := c12rec.ASSEMBLY_ITEM_ID;
1765 g_encoin_rev_comp_tbl(v).ALTERNATE_BOM_DESIGNATOR := c12rec.ALTERNATE_BOM_DESIGNATOR;
1766 g_encoin_rev_comp_tbl(v).operation := c12rec.transaction_type;
1767 g_encoin_rev_comp_tbl(v).eng_revised_items_ifce_key := c12rec.ENG_REVISED_ITEMS_IFCE_KEY;
1768 g_encoin_rev_comp_tbl(v).bom_inventory_comps_ifce_key := c12rec.BOM_INVENTORY_COMPS_IFCE_KEY;
1769 --Bug 3396529: Added New_revised_Item_Revision
1770 g_encoin_rev_comp_tbl(v).New_revised_Item_Revision := c12rec.New_revised_Item_Revision;
1771 g_encoin_rev_comp_tbl(v).from_end_item_unit_number := c12rec.from_end_item_unit_number; /*Bug 6377841*/
1772 g_encoin_rev_comp_tbl(v).to_end_item_unit_number := c12rec.to_end_item_unit_number; /*Bug 6377841*/
1773 END LOOP; -- End Rev comps loop
1774 END Get_Comps_With_Curr_Item_Ifce;
1775
1776 -- Procedure Get_Rfds_With_Curr_ECO_Ifce
1777 -- Pick up all reference designators with ECO ifce key = g_ECO_ifce_key
1778
1779 PROCEDURE Get_Rfds_With_Curr_ECO_Ifce
1780 IS
1781 y number;
1782 stmt_num number;
1783 BEGIN
1784 y := 0;
1785 FOR c15rec IN GetRfdWithCurrECOifce LOOP
1786 y := y + 1;
1787 g_encoin_ref_des_tbl(y).REF_DESIGNATOR := c15rec.COMPONENT_REFERENCE_DESIGNATOR;
1788 g_encoin_ref_des_tbl(y).last_update_date := c15rec.last_update_date;
1789 g_encoin_ref_des_tbl(y).last_updated_by := c15rec.last_updated_by;
1790 g_encoin_ref_des_tbl(y).creation_date := c15rec.creation_date;
1791 g_encoin_ref_des_tbl(y).created_by := c15rec.created_by;
1792 g_encoin_ref_des_tbl(y).last_update_login := c15rec.last_update_login;
1793 g_encoin_ref_des_tbl(y).ref_designator_comment := c15rec.ref_designator_comment;
1794 g_encoin_ref_des_tbl(y).change_notice := c15rec.change_notice;
1795 g_encoin_ref_des_tbl(y).component_sequence_id := c15rec.component_sequence_id;
1796 g_encoin_ref_des_tbl(y).acd_type := c15rec.acd_type;
1797 g_encoin_ref_des_tbl(y).request_id := c15rec.request_id;
1798 g_encoin_ref_des_tbl(y).program_application_id := c15rec.program_application_id;
1799 g_encoin_ref_des_tbl(y).program_id := c15rec.program_id;
1800 g_encoin_ref_des_tbl(y).program_update_date := c15rec.program_update_date;
1801 g_encoin_ref_des_tbl(y).attribute_category := c15rec.attribute_category;
1802 g_encoin_ref_des_tbl(y).attribute1 := c15rec.attribute1;
1803 g_encoin_ref_des_tbl(y).attribute2 := c15rec.attribute2;
1804 g_encoin_ref_des_tbl(y).attribute3 := c15rec.attribute3;
1805 g_encoin_ref_des_tbl(y).attribute4 := c15rec.attribute4;
1806 g_encoin_ref_des_tbl(y).attribute5 := c15rec.attribute5;
1807 g_encoin_ref_des_tbl(y).attribute6 := c15rec.attribute6;
1808 g_encoin_ref_des_tbl(y).attribute7 := c15rec.attribute7;
1809 g_encoin_ref_des_tbl(y).attribute8 := c15rec.attribute8;
1810 g_encoin_ref_des_tbl(y).attribute9 := c15rec.attribute9;
1811 g_encoin_ref_des_tbl(y).attribute10 := c15rec.attribute10;
1812 g_encoin_ref_des_tbl(y).attribute11 := c15rec.attribute11;
1813 g_encoin_ref_des_tbl(y).attribute12 := c15rec.attribute12;
1814 g_encoin_ref_des_tbl(y).attribute13 := c15rec.attribute13;
1815 g_encoin_ref_des_tbl(y).attribute14 := c15rec.attribute14;
1816 g_encoin_ref_des_tbl(y).attribute15 := c15rec.attribute15;
1817 g_encoin_ref_des_tbl(y).new_designator := c15rec.new_designator;
1818 g_encoin_ref_des_tbl(y).process_flag := c15rec.process_flag;
1819 g_encoin_ref_des_tbl(y).transaction_id := c15rec.transaction_id;
1820 g_encoin_ref_des_tbl(y).ASSEMBLY_ITEM_NUMBER := c15rec.ASSEMBLY_ITEM_NUMBER;
1821 g_encoin_ref_des_tbl(y).COMPONENT_ITEM_NUMBER := c15rec.COMPONENT_ITEM_NUMBER;
1822 g_encoin_ref_des_tbl(y).ORGANIZATION_CODE := c15rec.ORGANIZATION_CODE;
1823 g_encoin_ref_des_tbl(y).ORGANIZATION_ID := c15rec.ORGANIZATION_ID;
1824 g_encoin_ref_des_tbl(y).ASSEMBLY_ITEM_ID := c15rec.ASSEMBLY_ITEM_ID;
1825 g_encoin_ref_des_tbl(y).ALTERNATE_BOM_DESIGNATOR := c15rec.ALTERNATE_BOM_DESIGNATOR;
1826 g_encoin_ref_des_tbl(y).COMPONENT_ITEM_ID := c15rec.COMPONENT_ITEM_ID;
1827 g_encoin_ref_des_tbl(y).BILL_SEQUENCE_ID := c15rec.BILL_SEQUENCE_ID;
1828 g_encoin_ref_des_tbl(y).OPERATION_SEQ_NUM := c15rec.OPERATION_SEQ_NUM;
1829 g_encoin_ref_des_tbl(y).EFFECTIVITY_DATE := c15rec.EFFECTIVITY_DATE;
1830 g_encoin_ref_des_tbl(y).interface_entity_type := c15rec.interface_entity_type;
1831 g_encoin_ref_des_tbl(y).operation := c15rec.transaction_type;
1832 g_encoin_ref_des_tbl(y).eng_changes_ifce_key := c15rec.eng_changes_ifce_key;
1833 g_encoin_ref_des_tbl(y).eng_revised_items_ifce_key := c15rec.eng_revised_items_ifce_key;
1834 g_encoin_ref_des_tbl(y).bom_inventory_comps_ifce_key := c15rec.bom_inventory_comps_ifce_key;
1835 --Bug 3396529: Added New_revised_Item_Revision
1836 g_encoin_ref_des_tbl(y).New_revised_Item_Revision := c15rec.New_revised_Item_Revision;
1837
1838 END LOOP; -- END Ref Desgs loop
1839 END Get_Rfds_With_Curr_ECO_Ifce;
1840
1841 -- Procedure Get_Rfds_With_Curr_Item_Ifce
1842 -- Pick up all reference designators with item ifce key = g_revised_item_key
1843
1844 PROCEDURE Get_Rfds_With_Curr_Item_Ifce
1845 IS
1846 y number;
1847 stmt_num number;
1848 BEGIN
1849 y := 0;
1850 FOR c15rec IN GetRfdWithCurrItemifce LOOP
1851 y := y + 1;
1852 g_encoin_ref_des_tbl(y).REF_DESIGNATOR := c15rec.COMPONENT_REFERENCE_DESIGNATOR;
1853 g_encoin_ref_des_tbl(y).last_update_date := c15rec.last_update_date;
1854 g_encoin_ref_des_tbl(y).last_updated_by := c15rec.last_updated_by;
1855 g_encoin_ref_des_tbl(y).creation_date := c15rec.creation_date;
1856 g_encoin_ref_des_tbl(y).created_by := c15rec.created_by;
1857 g_encoin_ref_des_tbl(y).last_update_login := c15rec.last_update_login;
1858 g_encoin_ref_des_tbl(y).ref_designator_comment := c15rec.ref_designator_comment;
1859 g_encoin_ref_des_tbl(y).change_notice := c15rec.change_notice;
1860 g_encoin_ref_des_tbl(y).component_sequence_id := c15rec.component_sequence_id;
1861 g_encoin_ref_des_tbl(y).acd_type := c15rec.acd_type;
1862 g_encoin_ref_des_tbl(y).request_id := c15rec.request_id;
1863 g_encoin_ref_des_tbl(y).program_application_id := c15rec.program_application_id;
1864 g_encoin_ref_des_tbl(y).program_id := c15rec.program_id;
1865 g_encoin_ref_des_tbl(y).program_update_date := c15rec.program_update_date;
1866 g_encoin_ref_des_tbl(y).attribute_category := c15rec.attribute_category;
1867 g_encoin_ref_des_tbl(y).attribute1 := c15rec.attribute1;
1868 g_encoin_ref_des_tbl(y).attribute2 := c15rec.attribute2;
1869 g_encoin_ref_des_tbl(y).attribute3 := c15rec.attribute3;
1870 g_encoin_ref_des_tbl(y).attribute4 := c15rec.attribute4;
1871 g_encoin_ref_des_tbl(y).attribute5 := c15rec.attribute5;
1872 g_encoin_ref_des_tbl(y).attribute6 := c15rec.attribute6;
1873 g_encoin_ref_des_tbl(y).attribute7 := c15rec.attribute7;
1874 g_encoin_ref_des_tbl(y).attribute8 := c15rec.attribute8;
1875 g_encoin_ref_des_tbl(y).attribute9 := c15rec.attribute9;
1876 g_encoin_ref_des_tbl(y).attribute10 := c15rec.attribute10;
1877 g_encoin_ref_des_tbl(y).attribute11 := c15rec.attribute11;
1878 g_encoin_ref_des_tbl(y).attribute12 := c15rec.attribute12;
1879 g_encoin_ref_des_tbl(y).attribute13 := c15rec.attribute13;
1880 g_encoin_ref_des_tbl(y).attribute14 := c15rec.attribute14;
1881 g_encoin_ref_des_tbl(y).attribute15 := c15rec.attribute15;
1882 g_encoin_ref_des_tbl(y).new_designator := c15rec.new_designator;
1883 g_encoin_ref_des_tbl(y).process_flag := c15rec.process_flag;
1884 g_encoin_ref_des_tbl(y).transaction_id := c15rec.transaction_id;
1885 g_encoin_ref_des_tbl(y).ASSEMBLY_ITEM_NUMBER := c15rec.ASSEMBLY_ITEM_NUMBER;
1886 g_encoin_ref_des_tbl(y).COMPONENT_ITEM_NUMBER := c15rec.COMPONENT_ITEM_NUMBER;
1887 g_encoin_ref_des_tbl(y).ORGANIZATION_CODE := c15rec.ORGANIZATION_CODE;
1888 g_encoin_ref_des_tbl(y).ORGANIZATION_ID := c15rec.ORGANIZATION_ID;
1889 g_encoin_ref_des_tbl(y).ASSEMBLY_ITEM_ID := c15rec.ASSEMBLY_ITEM_ID;
1890 g_encoin_ref_des_tbl(y).ALTERNATE_BOM_DESIGNATOR := c15rec.ALTERNATE_BOM_DESIGNATOR;
1891 g_encoin_ref_des_tbl(y).COMPONENT_ITEM_ID := c15rec.COMPONENT_ITEM_ID;
1892 g_encoin_ref_des_tbl(y).BILL_SEQUENCE_ID := c15rec.BILL_SEQUENCE_ID;
1893 g_encoin_ref_des_tbl(y).OPERATION_SEQ_NUM := c15rec.OPERATION_SEQ_NUM;
1894 g_encoin_ref_des_tbl(y).EFFECTIVITY_DATE := c15rec.EFFECTIVITY_DATE;
1895 g_encoin_ref_des_tbl(y).interface_entity_type := c15rec.interface_entity_type;
1896 g_encoin_ref_des_tbl(y).operation := c15rec.transaction_type;
1897 g_encoin_ref_des_tbl(y).eng_changes_ifce_key := c15rec.eng_changes_ifce_key;
1898 g_encoin_ref_des_tbl(y).eng_revised_items_ifce_key := c15rec.eng_revised_items_ifce_key;
1899 g_encoin_ref_des_tbl(y).bom_inventory_comps_ifce_key := c15rec.bom_inventory_comps_ifce_key;
1900 --Bug 3396529: Added New_revised_Item_Revision
1901 g_encoin_ref_des_tbl(y).New_revised_Item_Revision := c15rec.New_revised_Item_Revision;
1902
1903 END LOOP; -- END Ref Desgs loop
1904 END Get_Rfds_With_Curr_Item_Ifce;
1905
1906 -- Procedure Get_Rfds_With_Curr_Comp_Ifce
1907 -- Pick up all reference designators with comp ifce key = g_revised_comp_ifce_key
1908
1909 PROCEDURE Get_Rfds_With_Curr_Comp_Ifce
1910 IS
1911 y number;
1912 stmt_num number;
1913 BEGIN
1914 y := 0;
1915 FOR c15rec IN GetRfdWithCurrCompifce LOOP
1916 y := y + 1;
1917 g_encoin_ref_des_tbl(y).REF_DESIGNATOR := c15rec.COMPONENT_REFERENCE_DESIGNATOR;
1918 g_encoin_ref_des_tbl(y).last_update_date := c15rec.last_update_date;
1919 g_encoin_ref_des_tbl(y).last_updated_by := c15rec.last_updated_by;
1920 g_encoin_ref_des_tbl(y).creation_date := c15rec.creation_date;
1921 g_encoin_ref_des_tbl(y).created_by := c15rec.created_by;
1922 g_encoin_ref_des_tbl(y).last_update_login := c15rec.last_update_login;
1923 g_encoin_ref_des_tbl(y).ref_designator_comment := c15rec.ref_designator_comment;
1924 g_encoin_ref_des_tbl(y).change_notice := c15rec.change_notice;
1925 g_encoin_ref_des_tbl(y).component_sequence_id := c15rec.component_sequence_id;
1926 g_encoin_ref_des_tbl(y).acd_type := c15rec.acd_type;
1927 g_encoin_ref_des_tbl(y).request_id := c15rec.request_id;
1928 g_encoin_ref_des_tbl(y).program_application_id := c15rec.program_application_id;
1929 g_encoin_ref_des_tbl(y).program_id := c15rec.program_id;
1930 g_encoin_ref_des_tbl(y).program_update_date := c15rec.program_update_date;
1931 g_encoin_ref_des_tbl(y).attribute_category := c15rec.attribute_category;
1932 g_encoin_ref_des_tbl(y).attribute1 := c15rec.attribute1;
1933 g_encoin_ref_des_tbl(y).attribute2 := c15rec.attribute2;
1934 g_encoin_ref_des_tbl(y).attribute3 := c15rec.attribute3;
1935 g_encoin_ref_des_tbl(y).attribute4 := c15rec.attribute4;
1936 g_encoin_ref_des_tbl(y).attribute5 := c15rec.attribute5;
1937 g_encoin_ref_des_tbl(y).attribute6 := c15rec.attribute6;
1938 g_encoin_ref_des_tbl(y).attribute7 := c15rec.attribute7;
1939 g_encoin_ref_des_tbl(y).attribute8 := c15rec.attribute8;
1940 g_encoin_ref_des_tbl(y).attribute9 := c15rec.attribute9;
1941 g_encoin_ref_des_tbl(y).attribute10 := c15rec.attribute10;
1942 g_encoin_ref_des_tbl(y).attribute11 := c15rec.attribute11;
1943 g_encoin_ref_des_tbl(y).attribute12 := c15rec.attribute12;
1944 g_encoin_ref_des_tbl(y).attribute13 := c15rec.attribute13;
1945 g_encoin_ref_des_tbl(y).attribute14 := c15rec.attribute14;
1946 g_encoin_ref_des_tbl(y).attribute15 := c15rec.attribute15;
1947 g_encoin_ref_des_tbl(y).new_designator := c15rec.new_designator;
1948 g_encoin_ref_des_tbl(y).process_flag := c15rec.process_flag;
1949 g_encoin_ref_des_tbl(y).transaction_id := c15rec.transaction_id;
1950 g_encoin_ref_des_tbl(y).ASSEMBLY_ITEM_NUMBER := c15rec.ASSEMBLY_ITEM_NUMBER;
1951 g_encoin_ref_des_tbl(y).COMPONENT_ITEM_NUMBER := c15rec.COMPONENT_ITEM_NUMBER;
1952 g_encoin_ref_des_tbl(y).ORGANIZATION_CODE := c15rec.ORGANIZATION_CODE;
1953 g_encoin_ref_des_tbl(y).ORGANIZATION_ID := c15rec.ORGANIZATION_ID;
1954 g_encoin_ref_des_tbl(y).ASSEMBLY_ITEM_ID := c15rec.ASSEMBLY_ITEM_ID;
1955 g_encoin_ref_des_tbl(y).ALTERNATE_BOM_DESIGNATOR := c15rec.ALTERNATE_BOM_DESIGNATOR;
1956 g_encoin_ref_des_tbl(y).COMPONENT_ITEM_ID := c15rec.COMPONENT_ITEM_ID;
1957 g_encoin_ref_des_tbl(y).BILL_SEQUENCE_ID := c15rec.BILL_SEQUENCE_ID;
1958 g_encoin_ref_des_tbl(y).OPERATION_SEQ_NUM := c15rec.OPERATION_SEQ_NUM;
1959 g_encoin_ref_des_tbl(y).EFFECTIVITY_DATE := c15rec.EFFECTIVITY_DATE;
1960 g_encoin_ref_des_tbl(y).interface_entity_type := c15rec.interface_entity_type;
1961 g_encoin_ref_des_tbl(y).operation := c15rec.transaction_type;
1962 g_encoin_ref_des_tbl(y).eng_changes_ifce_key := c15rec.eng_changes_ifce_key;
1963 g_encoin_ref_des_tbl(y).eng_revised_items_ifce_key := c15rec.eng_revised_items_ifce_key;
1964 g_encoin_ref_des_tbl(y).bom_inventory_comps_ifce_key := c15rec.bom_inventory_comps_ifce_key;
1965 --Bug 3396529: Added New_revised_Item_Revision
1966 g_encoin_ref_des_tbl(y).New_revised_Item_Revision := c15rec.New_revised_Item_Revision;
1967 END LOOP; -- END Ref Desgs loop
1968 END Get_Rfds_With_Curr_Comp_Ifce;
1969
1970 -- Procedure Get_Sbcs_With_Curr_ECO_Ifce
1971 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
1972
1973 PROCEDURE Get_Sbcs_With_Curr_ECO_Ifce
1974 IS
1975 z number;
1976 stmt_num number;
1977 BEGIN
1978 z := 0;
1979 FOR c16rec IN GetSbcWithCurrECOifce LOOP
1980 z := z + 1;
1981 g_encoin_sub_comp_tbl(z).substitute_component_id := c16rec.substitute_component_id;
1982 g_encoin_sub_comp_tbl(z).last_update_date := c16rec.last_update_date;
1983 g_encoin_sub_comp_tbl(z).last_updated_by := c16rec.last_updated_by;
1984 g_encoin_sub_comp_tbl(z).creation_date := c16rec.creation_date;
1985 g_encoin_sub_comp_tbl(z).created_by := c16rec.created_by;
1986 g_encoin_sub_comp_tbl(z).last_update_login := c16rec.last_update_login;
1987 g_encoin_sub_comp_tbl(z).substitute_item_quantity := c16rec.substitute_item_quantity;
1988 g_encoin_sub_comp_tbl(z).component_sequence_id := c16rec.component_sequence_id;
1989 g_encoin_sub_comp_tbl(z).acd_type := c16rec.acd_type;
1990 g_encoin_sub_comp_tbl(z).change_notice := c16rec.change_notice;
1991 g_encoin_sub_comp_tbl(z).request_id := c16rec.request_id;
1992 g_encoin_sub_comp_tbl(z).program_application_id := c16rec.program_application_id;
1993 g_encoin_sub_comp_tbl(z).program_update_date := c16rec.program_update_date;
1994 g_encoin_sub_comp_tbl(z).attribute_category := c16rec.attribute_category;
1995 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute1;
1996 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute2;
1997 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute4;
1998 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute5;
1999 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute6;
2000 g_encoin_sub_comp_tbl(z).attribute8 := c16rec.attribute8;
2001 g_encoin_sub_comp_tbl(z).attribute9 := c16rec.attribute9;
2002 g_encoin_sub_comp_tbl(z).attribute10 := c16rec.attribute10;
2003 g_encoin_sub_comp_tbl(z).attribute12 := c16rec.attribute12;
2004 g_encoin_sub_comp_tbl(z).attribute13 := c16rec.attribute13;
2005 g_encoin_sub_comp_tbl(z).attribute14 := c16rec.attribute14;
2006 g_encoin_sub_comp_tbl(z).attribute15 := c16rec.attribute15;
2007 g_encoin_sub_comp_tbl(z).program_id := c16rec.program_id;
2008 g_encoin_sub_comp_tbl(z).attribute3 := c16rec.attribute3;
2009 g_encoin_sub_comp_tbl(z).attribute7 := c16rec.attribute7;
2010 g_encoin_sub_comp_tbl(z).attribute11 := c16rec.attribute11;
2011 g_encoin_sub_comp_tbl(z).new_sub_comp_id := c16rec.new_sub_comp_id;
2012 g_encoin_sub_comp_tbl(z).process_flag := c16rec.process_flag;
2013 g_encoin_sub_comp_tbl(z).transaction_id := c16rec.transaction_id;
2014 g_encoin_sub_comp_tbl(z).NEW_SUB_COMP_NUMBER := c16rec.NEW_SUB_COMP_NUMBER;
2015 g_encoin_sub_comp_tbl(z).ASSEMBLY_ITEM_NUMBER := c16rec.ASSEMBLY_ITEM_NUMBER;
2016 g_encoin_sub_comp_tbl(z).COMPONENT_ITEM_NUMBER := c16rec.COMPONENT_ITEM_NUMBER;
2017 g_encoin_sub_comp_tbl(z).SUBSTITUTE_COMP_NUMBER := c16rec.SUBSTITUTE_COMP_NUMBER;
2018 g_encoin_sub_comp_tbl(z).ORGANIZATION_CODE := c16rec.ORGANIZATION_CODE;
2019 g_encoin_sub_comp_tbl(z).ORGANIZATION_ID := c16rec.ORGANIZATION_ID;
2020 g_encoin_sub_comp_tbl(z).ASSEMBLY_ITEM_ID := c16rec.ASSEMBLY_ITEM_ID;
2021 g_encoin_sub_comp_tbl(z).ALTERNATE_BOM_DESIGNATOR := c16rec.ALTERNATE_BOM_DESIGNATOR;
2022 g_encoin_sub_comp_tbl(z).COMPONENT_ITEM_ID := c16rec.COMPONENT_ITEM_ID;
2023 g_encoin_sub_comp_tbl(z).BILL_SEQUENCE_ID := c16rec.BILL_SEQUENCE_ID;
2024 g_encoin_sub_comp_tbl(z).OPERATION_SEQ_NUM := c16rec.OPERATION_SEQ_NUM;
2025 g_encoin_sub_comp_tbl(z).EFFECTIVITY_DATE := c16rec.EFFECTIVITY_DATE;
2026 g_encoin_sub_comp_tbl(z).interface_entity_type := c16rec.interface_entity_type;
2027 g_encoin_sub_comp_tbl(z).operation := c16rec.transaction_type;
2028 g_encoin_sub_comp_tbl(z).eng_changes_ifce_key := c16rec.eng_changes_ifce_key;
2029 g_encoin_sub_comp_tbl(z).eng_revised_items_ifce_key := c16rec.eng_revised_items_ifce_key;
2030 g_encoin_sub_comp_tbl(z).bom_inventory_comps_ifce_key := c16rec.bom_inventory_comps_ifce_key;
2031 --Bug 3396529: Added New_revised_Item_Revision
2032 g_encoin_sub_comp_tbl(z).New_revised_Item_Revision := c16rec.New_revised_Item_Revision;
2033 END LOOP; -- END Sub Comps Loop
2034 END Get_Sbcs_With_Curr_ECO_Ifce;
2035
2036 -- Procedure Get_Sbcs_With_Curr_Item_Ifce
2037 -- Pick up all substitute components with item ifce key = g_revised_item_ifce_key
2038
2039 PROCEDURE Get_Sbcs_With_Curr_Item_Ifce
2040 IS
2041 z number;
2042 stmt_num number;
2043 BEGIN
2044 z := 0;
2045 FOR c16rec IN GetSbcWithCurrItemifce LOOP
2046 z := z + 1;
2047 g_encoin_sub_comp_tbl(z).substitute_component_id := c16rec.substitute_component_id;
2048 g_encoin_sub_comp_tbl(z).last_update_date := c16rec.last_update_date;
2049 g_encoin_sub_comp_tbl(z).last_updated_by := c16rec.last_updated_by;
2050 g_encoin_sub_comp_tbl(z).creation_date := c16rec.creation_date;
2051 g_encoin_sub_comp_tbl(z).created_by := c16rec.created_by;
2052 g_encoin_sub_comp_tbl(z).last_update_login := c16rec.last_update_login;
2053 g_encoin_sub_comp_tbl(z).substitute_item_quantity := c16rec.substitute_item_quantity;
2054 g_encoin_sub_comp_tbl(z).component_sequence_id := c16rec.component_sequence_id;
2055 g_encoin_sub_comp_tbl(z).acd_type := c16rec.acd_type;
2056 g_encoin_sub_comp_tbl(z).change_notice := c16rec.change_notice;
2057 g_encoin_sub_comp_tbl(z).request_id := c16rec.request_id;
2058 g_encoin_sub_comp_tbl(z).program_application_id := c16rec.program_application_id;
2059 g_encoin_sub_comp_tbl(z).program_update_date := c16rec.program_update_date;
2060 g_encoin_sub_comp_tbl(z).attribute_category := c16rec.attribute_category;
2061 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute1;
2062 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute2;
2063 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute4;
2064 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute5;
2065 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute6;
2066 g_encoin_sub_comp_tbl(z).attribute8 := c16rec.attribute8;
2067 g_encoin_sub_comp_tbl(z).attribute9 := c16rec.attribute9;
2068 g_encoin_sub_comp_tbl(z).attribute10 := c16rec.attribute10;
2069 g_encoin_sub_comp_tbl(z).attribute12 := c16rec.attribute12;
2070 g_encoin_sub_comp_tbl(z).attribute13 := c16rec.attribute13;
2071 g_encoin_sub_comp_tbl(z).attribute14 := c16rec.attribute14;
2072 g_encoin_sub_comp_tbl(z).attribute15 := c16rec.attribute15;
2073 g_encoin_sub_comp_tbl(z).program_id := c16rec.program_id;
2074 g_encoin_sub_comp_tbl(z).attribute3 := c16rec.attribute3;
2075 g_encoin_sub_comp_tbl(z).attribute7 := c16rec.attribute7;
2076 g_encoin_sub_comp_tbl(z).attribute11 := c16rec.attribute11;
2077 g_encoin_sub_comp_tbl(z).new_sub_comp_id := c16rec.new_sub_comp_id;
2078 g_encoin_sub_comp_tbl(z).process_flag := c16rec.process_flag;
2079 g_encoin_sub_comp_tbl(z).transaction_id := c16rec.transaction_id;
2080 g_encoin_sub_comp_tbl(z).NEW_SUB_COMP_NUMBER := c16rec.NEW_SUB_COMP_NUMBER;
2081 g_encoin_sub_comp_tbl(z).ASSEMBLY_ITEM_NUMBER := c16rec.ASSEMBLY_ITEM_NUMBER;
2082 g_encoin_sub_comp_tbl(z).COMPONENT_ITEM_NUMBER := c16rec.COMPONENT_ITEM_NUMBER;
2083 g_encoin_sub_comp_tbl(z).SUBSTITUTE_COMP_NUMBER := c16rec.SUBSTITUTE_COMP_NUMBER;
2084 g_encoin_sub_comp_tbl(z).ORGANIZATION_CODE := c16rec.ORGANIZATION_CODE;
2085 g_encoin_sub_comp_tbl(z).ORGANIZATION_ID := c16rec.ORGANIZATION_ID;
2086 g_encoin_sub_comp_tbl(z).ASSEMBLY_ITEM_ID := c16rec.ASSEMBLY_ITEM_ID;
2087 g_encoin_sub_comp_tbl(z).ALTERNATE_BOM_DESIGNATOR := c16rec.ALTERNATE_BOM_DESIGNATOR;
2088 g_encoin_sub_comp_tbl(z).COMPONENT_ITEM_ID := c16rec.COMPONENT_ITEM_ID;
2089 g_encoin_sub_comp_tbl(z).BILL_SEQUENCE_ID := c16rec.BILL_SEQUENCE_ID;
2090 g_encoin_sub_comp_tbl(z).OPERATION_SEQ_NUM := c16rec.OPERATION_SEQ_NUM;
2091 g_encoin_sub_comp_tbl(z).EFFECTIVITY_DATE := c16rec.EFFECTIVITY_DATE;
2092 g_encoin_sub_comp_tbl(z).interface_entity_type := c16rec.interface_entity_type;
2093 g_encoin_sub_comp_tbl(z).operation := c16rec.transaction_type;
2094 g_encoin_sub_comp_tbl(z).eng_changes_ifce_key := c16rec.eng_changes_ifce_key;
2095 g_encoin_sub_comp_tbl(z).eng_revised_items_ifce_key := c16rec.eng_revised_items_ifce_key;
2096 g_encoin_sub_comp_tbl(z).bom_inventory_comps_ifce_key := c16rec.bom_inventory_comps_ifce_key;
2097 --Bug 3396529: Added New_revised_Item_Revision
2098 g_encoin_sub_comp_tbl(z).New_revised_Item_Revision := c16rec.New_revised_Item_Revision;
2099 END LOOP; -- END Sub Comps Loop
2100 END Get_Sbcs_With_Curr_Item_Ifce;
2101
2102 -- Procedure Get_Sbcs_With_Curr_Comp_Ifce
2103 -- Pick up all substitute components with comp ifce key = g_revised_comp_ifce_key
2104
2105 PROCEDURE Get_Sbcs_With_Curr_Comp_Ifce
2106 IS
2107 z number;
2108 stmt_num number;
2109 BEGIN
2110 z := 0;
2111 FOR c16rec IN GetSbcWithCurrCompifce LOOP
2112 z := z + 1;
2113 g_encoin_sub_comp_tbl(z).substitute_component_id := c16rec.substitute_component_id;
2114 g_encoin_sub_comp_tbl(z).last_update_date := c16rec.last_update_date;
2115 g_encoin_sub_comp_tbl(z).last_updated_by := c16rec.last_updated_by;
2116 g_encoin_sub_comp_tbl(z).creation_date := c16rec.creation_date;
2117 g_encoin_sub_comp_tbl(z).created_by := c16rec.created_by;
2118 g_encoin_sub_comp_tbl(z).last_update_login := c16rec.last_update_login;
2119 g_encoin_sub_comp_tbl(z).substitute_item_quantity := c16rec.substitute_item_quantity;
2120 g_encoin_sub_comp_tbl(z).component_sequence_id := c16rec.component_sequence_id;
2121 g_encoin_sub_comp_tbl(z).acd_type := c16rec.acd_type;
2122 g_encoin_sub_comp_tbl(z).change_notice := c16rec.change_notice;
2123 g_encoin_sub_comp_tbl(z).request_id := c16rec.request_id;
2124 g_encoin_sub_comp_tbl(z).program_application_id := c16rec.program_application_id;
2125 g_encoin_sub_comp_tbl(z).program_update_date := c16rec.program_update_date;
2126 g_encoin_sub_comp_tbl(z).attribute_category := c16rec.attribute_category;
2127 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute1;
2128 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute2;
2129 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute4;
2130 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute5;
2131 g_encoin_sub_comp_tbl(z).attribute1 := c16rec.attribute6;
2132 g_encoin_sub_comp_tbl(z).attribute8 := c16rec.attribute8;
2133 g_encoin_sub_comp_tbl(z).attribute9 := c16rec.attribute9;
2134 g_encoin_sub_comp_tbl(z).attribute10 := c16rec.attribute10;
2135 g_encoin_sub_comp_tbl(z).attribute12 := c16rec.attribute12;
2136 g_encoin_sub_comp_tbl(z).attribute13 := c16rec.attribute13;
2137 g_encoin_sub_comp_tbl(z).attribute14 := c16rec.attribute14;
2138 g_encoin_sub_comp_tbl(z).attribute15 := c16rec.attribute15;
2139 g_encoin_sub_comp_tbl(z).program_id := c16rec.program_id;
2140 g_encoin_sub_comp_tbl(z).attribute3 := c16rec.attribute3;
2141 g_encoin_sub_comp_tbl(z).attribute7 := c16rec.attribute7;
2142 g_encoin_sub_comp_tbl(z).attribute11 := c16rec.attribute11;
2143 g_encoin_sub_comp_tbl(z).new_sub_comp_id := c16rec.new_sub_comp_id;
2144 g_encoin_sub_comp_tbl(z).process_flag := c16rec.process_flag;
2145 g_encoin_sub_comp_tbl(z).transaction_id := c16rec.transaction_id;
2146 g_encoin_sub_comp_tbl(z).NEW_SUB_COMP_NUMBER := c16rec.NEW_SUB_COMP_NUMBER;
2147 g_encoin_sub_comp_tbl(z).ASSEMBLY_ITEM_NUMBER := c16rec.ASSEMBLY_ITEM_NUMBER;
2148 g_encoin_sub_comp_tbl(z).COMPONENT_ITEM_NUMBER := c16rec.COMPONENT_ITEM_NUMBER;
2149 g_encoin_sub_comp_tbl(z).SUBSTITUTE_COMP_NUMBER := c16rec.SUBSTITUTE_COMP_NUMBER;
2150 g_encoin_sub_comp_tbl(z).ORGANIZATION_CODE := c16rec.ORGANIZATION_CODE;
2151 g_encoin_sub_comp_tbl(z).ORGANIZATION_ID := c16rec.ORGANIZATION_ID;
2152 g_encoin_sub_comp_tbl(z).ASSEMBLY_ITEM_ID := c16rec.ASSEMBLY_ITEM_ID;
2153 g_encoin_sub_comp_tbl(z).ALTERNATE_BOM_DESIGNATOR := c16rec.ALTERNATE_BOM_DESIGNATOR;
2154 g_encoin_sub_comp_tbl(z).COMPONENT_ITEM_ID := c16rec.COMPONENT_ITEM_ID;
2155 g_encoin_sub_comp_tbl(z).BILL_SEQUENCE_ID := c16rec.BILL_SEQUENCE_ID;
2156 g_encoin_sub_comp_tbl(z).OPERATION_SEQ_NUM := c16rec.OPERATION_SEQ_NUM;
2157 g_encoin_sub_comp_tbl(z).EFFECTIVITY_DATE := c16rec.EFFECTIVITY_DATE;
2158 g_encoin_sub_comp_tbl(z).interface_entity_type := c16rec.interface_entity_type;
2159 g_encoin_sub_comp_tbl(z).operation := c16rec.transaction_type;
2160 g_encoin_sub_comp_tbl(z).eng_changes_ifce_key := c16rec.eng_changes_ifce_key;
2161 g_encoin_sub_comp_tbl(z).eng_revised_items_ifce_key := c16rec.eng_revised_items_ifce_key;
2162 g_encoin_sub_comp_tbl(z).bom_inventory_comps_ifce_key := c16rec.bom_inventory_comps_ifce_key;
2163 --Bug 3396529: Added New_revised_Item_Revision
2164 g_encoin_sub_comp_tbl(z).New_revised_Item_Revision := c16rec.New_revised_Item_Revision;
2165 END LOOP; -- END Sub Comps Loop
2166 END Get_Sbcs_With_Curr_Comp_Ifce;
2167
2168
2169 PROCEDURE Get_Lines_With_Curr_ECO_Ifce
2170 IS
2171 cursor GetLines IS
2172 SELECT eco_name, organization_code, change_type_code,
2173 change_mgmt_type_name, name, description, sequence_number,
2174 status_name, object_display_name, pk1_name, pk2_name, pk3_name,
2175 pk4_name, pk5_name, assignee_name, need_by_date, scheduled_date,
2176 implementation_date, cancelation_date, original_system_reference,
2177 return_status, transaction_type
2178 FROM eng_change_lines_interface
2179 WHERE eng_changes_ifce_key = g_ECO_ifce_key
2180 AND process_flag = 1
2181 AND (g_all_org = 1
2182 OR
2183 (g_all_org = 2 AND organization_id = g_org_id));
2184
2185 i NUMBER;
2186 BEGIN
2187 i := 0;
2188 FOR c17rec IN GetLines LOOP
2189 i := i + 1;
2190 g_public_lines_tbl(i).eco_name := c17rec.eco_name;
2191 g_public_lines_tbl(i).organization_code := c17rec.organization_code;
2192 g_public_lines_tbl(i).change_type_code := c17rec.change_type_code;
2193 g_public_lines_tbl(i).change_management_type := c17rec.change_mgmt_type_name;
2194 g_public_lines_tbl(i).name := c17rec.name;
2195 g_public_lines_tbl(i).description := c17rec.description;
2196 g_public_lines_tbl(i).sequence_number := c17rec.sequence_number;
2197 --g_public_lines_tbl(i).item_name := c17rec.item_name;
2198 --g_public_lines_tbl(i).item_revision := c17rec.item_revision;
2199 g_public_lines_tbl(i).object_display_name := c17rec.object_display_name;
2200 g_public_lines_tbl(i).pk1_name := c17rec.pk1_name;
2201 g_public_lines_tbl(i).pk2_name := c17rec.pk2_name;
2202 g_public_lines_tbl(i).pk3_name := c17rec.pk3_name;
2203 g_public_lines_tbl(i).pk4_name := c17rec.pk4_name;
2204 g_public_lines_tbl(i).pk5_name := c17rec.pk5_name;
2205 g_public_lines_tbl(i).assignee_name := c17rec.assignee_name;
2206 g_public_lines_tbl(i).need_by_date := c17rec.need_by_date;
2207 g_public_lines_tbl(i).scheduled_date := c17rec.scheduled_date;
2208 g_public_lines_tbl(i).implementation_date := c17rec.implementation_date;
2209 g_public_lines_tbl(i).cancelation_date := c17rec.cancelation_date;
2210 g_public_lines_tbl(i).original_system_reference := c17rec.original_system_reference;
2211 g_public_lines_tbl(i).return_status := c17rec.return_status;
2212 g_public_lines_tbl(i).transaction_type := c17rec.transaction_type;
2213 --Bug 2908248
2214 g_public_lines_tbl(i).status_name := c17rec.status_name;
2215 END LOOP;
2216 END Get_Lines_With_Curr_ECO_Ifce;
2217
2218
2219 PROCEDURE Get_Rev_Op_With_Curr_ECO_Ifce
2220 IS
2221 cursor GetOperations IS
2222 SELECT change_notice, organization_code, assembly_item_number,
2223 new_routing_revision, acd_type, alternate_routing_designator,
2224 operation_seq_num, operation_type, effectivity_date,
2225 new_operation_seq_num, old_start_effective_date, operation_code,
2226 department_code, operation_lead_time_percent,
2227 minimum_transfer_quantity, count_point_type, operation_description,
2228 disable_date, backflush_flag, option_dependent_flag, reference_flag,
2229 yield, cumulative_yield, cancel_comments, attribute_category,
2230 attribute1, attribute2, attribute3, attribute4, attribute5,
2231 attribute6, attribute7, attribute8, attribute9, attribute10,
2232 attribute11, attribute12, attribute13, attribute14, attribute15,
2233 original_system_reference, transaction_type
2234 -- Bug 3412268: Added New_Revised_Item_Revision
2235 , New_Revised_Item_Revision
2236 FROM bom_op_sequences_interface
2237 WHERE eng_changes_ifce_key = g_ECO_ifce_key;
2238 i NUMBER;
2239 BEGIN
2240 i := 0;
2241 FOR c18rec IN GetOperations LOOP
2242 i := i + 1;
2243 g_public_rev_operation_tbl(i).Eco_Name := c18rec.change_notice;
2244 g_public_rev_operation_tbl(i).Organization_Code := c18rec.organization_code;
2245 g_public_rev_operation_tbl(i).Revised_Item_Name := c18rec.assembly_item_number;
2246 g_public_rev_operation_tbl(i).New_Routing_Revision := c18rec.new_routing_revision;
2247 g_public_rev_operation_tbl(i).ACD_Type := c18rec.acd_type;
2248 g_public_rev_operation_tbl(i).Alternate_Routing_Code := c18rec.alternate_routing_designator;
2249 g_public_rev_operation_tbl(i).Operation_Sequence_Number := c18rec.operation_seq_num;
2250 g_public_rev_operation_tbl(i).Operation_Type := c18rec.operation_type;
2251 g_public_rev_operation_tbl(i).Start_Effective_Date := c18rec.effectivity_date;
2252 g_public_rev_operation_tbl(i).New_Operation_Sequence_Number := c18rec.new_operation_seq_num;
2253 g_public_rev_operation_tbl(i).Old_Start_Effective_Date := c18rec.old_start_effective_date;
2254 g_public_rev_operation_tbl(i).Standard_Operation_Code := c18rec.operation_code;
2255 g_public_rev_operation_tbl(i).Department_Code := c18rec.department_code;
2256 g_public_rev_operation_tbl(i).Op_Lead_Time_Percent := c18rec.operation_lead_time_percent;
2257 g_public_rev_operation_tbl(i).Minimum_Transfer_Quantity := c18rec.minimum_transfer_quantity;
2258 g_public_rev_operation_tbl(i).Count_Point_Type := c18rec.count_point_type;
2259 g_public_rev_operation_tbl(i).Operation_Description := c18rec.operation_description;
2260 g_public_rev_operation_tbl(i).Disable_Date := c18rec.disable_date;
2261 g_public_rev_operation_tbl(i).Backflush_Flag := c18rec.backflush_flag;
2262 g_public_rev_operation_tbl(i).Option_Dependent_Flag := c18rec.option_dependent_flag;
2263 g_public_rev_operation_tbl(i).Reference_Flag := c18rec.reference_flag;
2264 g_public_rev_operation_tbl(i).Yield := c18rec.yield;
2265 g_public_rev_operation_tbl(i).Cumulative_Yield := c18rec.cumulative_yield;
2266 g_public_rev_operation_tbl(i).Yield := c18rec.yield;
2267 g_public_rev_operation_tbl(i).Cancel_Comments := c18rec.cancel_comments;
2268 g_public_rev_operation_tbl(i).Attribute_Category := c18rec.attribute_category;
2269 g_public_rev_operation_tbl(i).Attribute1 := c18rec.attribute1;
2270 g_public_rev_operation_tbl(i).Attribute2 := c18rec.attribute2;
2271 g_public_rev_operation_tbl(i).Attribute3 := c18rec.attribute3;
2272 g_public_rev_operation_tbl(i).Attribute4 := c18rec.attribute4;
2273 g_public_rev_operation_tbl(i).Attribute5 := c18rec.attribute5;
2274 g_public_rev_operation_tbl(i).Attribute6 := c18rec.attribute6;
2275 g_public_rev_operation_tbl(i).Attribute7 := c18rec.attribute7;
2276 g_public_rev_operation_tbl(i).Attribute8 := c18rec.attribute8;
2277 g_public_rev_operation_tbl(i).Attribute9 := c18rec.attribute9;
2278 g_public_rev_operation_tbl(i).Attribute10 := c18rec.attribute10;
2279 g_public_rev_operation_tbl(i).Attribute11 := c18rec.attribute11;
2280 g_public_rev_operation_tbl(i).Attribute12 := c18rec.attribute12;
2281 g_public_rev_operation_tbl(i).Attribute13 := c18rec.attribute13;
2282 g_public_rev_operation_tbl(i).Attribute14 := c18rec.attribute14;
2283 g_public_rev_operation_tbl(i).Attribute15 := c18rec.attribute15;
2284 g_public_rev_operation_tbl(i).Original_System_Reference := c18rec.original_system_reference;
2285 g_public_rev_operation_tbl(i).Return_Status := null;
2286 g_public_rev_operation_tbl(i).Transaction_Type := c18rec.transaction_type;
2287 -- Bug 3412268: Added New_Revised_Item_Revision
2288 g_public_rev_operation_tbl(i).New_Revised_Item_Revision := c18rec.New_Revised_Item_Revision;
2289 END LOOP;
2290 END Get_Rev_Op_With_Curr_ECO_Ifce;
2291
2292
2293 PROCEDURE Get_Op_Res_With_Curr_ECO_Ifce
2294 IS
2295 cursor GetResources IS
2296 SELECT eco_name, organization_code, assembly_item_number,
2297 new_routing_revision, acd_type, alternate_routing_designator,
2298 operation_seq_num, operation_type, effectivity_date, resource_seq_num,
2299 resource_code, activity, standard_rate_flag, assigned_units,
2300 usage_rate_or_amount, usage_rate_or_amount_inverse, basis_type,
2301 schedule_flag, resource_offset_percent, autocharge_type,
2302 schedule_seq_num, principle_flag, attribute_category, attribute1,
2303 attribute2, attribute3, attribute4, attribute5, attribute6,
2304 attribute7, attribute8, attribute9, attribute10, attribute11,
2305 attribute12, attribute13, attribute14, attribute15,
2306 original_system_reference, transaction_type, setup_code
2307 -- Bug 3412268: Added New_Revised_Item_Revision
2308 , New_Revised_Item_Revision
2309 FROM bom_op_resources_interface
2310 WHERE eng_changes_ifce_key = g_ECO_ifce_key;
2311 i NUMBER;
2312 BEGIN
2313 i := 0;
2314 FOR c19rec IN GetResources LOOP
2315 i := i + 1;
2316 /*
2317 Eco_Name VARCHAR2(10) -- eco_name
2318 , Organization_Code VARCHAR2(3) -- organization_code
2319 , Revised_Item_Name VARCHAR2(81) -- assembly_item_number
2320 , New_Revised_Item_Revision VARCHAR2(3)
2321 , From_End_Item_Unit_Number VARCHAR2(30)
2322 , New_Routing_Revision VARCHAR2(3) -- new_routing_revision
2323 , ACD_Type NUMBER -- acd_type
2324 , Alternate_Routing_Code VARCHAR2(10) -- alternate_routing_designator
2325 , Operation_Sequence_Number NUMBER -- operation_seq_num
2326 , Operation_Type NUMBER -- operation_type
2327 , Op_Start_Effective_Date DATE -- effectivity_date
2328 , Resource_Sequence_Number NUMBER -- resource_seq_num
2329 , Resource_Code VARCHAR2(10) -- resource_code
2330 , Activity VARCHAR2(10) -- activity
2331 , Standard_Rate_Flag NUMBER -- standard_rate_flag
2332 , Assigned_Units NUMBER -- assigned_units
2333 , Usage_Rate_Or_Amount NUMBER -- usage_rate_or_amount
2334 , Usage_Rate_Or_Amount_Inverse NUMBER -- usage_rate_or_amount_inverse
2335 , Basis_Type NUMBER -- basis_type
2336 , Schedule_Flag NUMBER -- schedule_flag
2337 , Resource_Offset_Percent NUMBER -- resource_offset_percent
2338 , Autocharge_Type NUMBER -- autocharge_type
2339 , Schedule_Sequence_Number NUMBER -- schedule_seq_num
2340 , Principle_Flag NUMBER -- principle_flag
2341 , Attribute_category VARCHAR2(30) -- attribute_category
2342 , Attribute1 VARCHAR2(150) --
2343 , Attribute2 VARCHAR2(150) -- attribute2
2344 , Attribute3 VARCHAR2(150) -- attribute3
2345 , Attribute4 VARCHAR2(150) -- attribute4
2346 , Attribute5 VARCHAR2(150) -- attribute5
2347 , Attribute6 VARCHAR2(150) -- attribute6
2348 , Attribute7 VARCHAR2(150) -- attribute7
2349 , Attribute8 VARCHAR2(150) -- attribute8
2350 , Attribute9 VARCHAR2(150) -- attribute9
2351 , Attribute10 VARCHAR2(150) -- attribute10
2352 , Attribute11 VARCHAR2(150) -- attribute11
2353 , Attribute12 VARCHAR2(150) -- attribute12
2354 , Attribute13 VARCHAR2(150) -- attribute13
2355 , Attribute14 VARCHAR2(150) -- attribute14
2356 , Attribute15 VARCHAR2(150) -- attribute15
2357 , Original_System_Reference VARCHAR2(50) -- original_system_reference
2358 , Transaction_Type VARCHAR2(30) -- transaction_type
2359 , Return_Status VARCHAR2(1)
2360 , Setup_Type VARCHAR2(30) -- setup_code
2361 */
2362 g_public_rev_op_res_tbl(i).Eco_Name := c19rec.eco_name;
2363 g_public_rev_op_res_tbl(i).Organization_Code := c19rec.organization_code;
2364 g_public_rev_op_res_tbl(i).Revised_Item_Name := c19rec.assembly_item_number;
2365 g_public_rev_op_res_tbl(i).New_Routing_Revision := c19rec.new_routing_revision;
2366 g_public_rev_op_res_tbl(i).ACD_Type := c19rec.acd_type;
2367 g_public_rev_op_res_tbl(i).Alternate_Routing_Code := c19rec.alternate_routing_designator;
2368 g_public_rev_op_res_tbl(i).Operation_Sequence_Number := c19rec.operation_seq_num;
2369 g_public_rev_op_res_tbl(i).Operation_Type := c19rec.operation_type;
2370 g_public_rev_op_res_tbl(i).Op_Start_Effective_Date := c19rec.effectivity_date;
2371 g_public_rev_op_res_tbl(i).Resource_Sequence_Number := c19rec.resource_seq_num;
2372 g_public_rev_op_res_tbl(i).Resource_Code := c19rec.resource_code;
2373 g_public_rev_op_res_tbl(i).Activity := c19rec.activity;
2374 g_public_rev_op_res_tbl(i).Standard_Rate_Flag := c19rec.standard_rate_flag;
2375 g_public_rev_op_res_tbl(i).Assigned_Units := c19rec.assigned_units;
2376 g_public_rev_op_res_tbl(i).Usage_Rate_Or_Amount := c19rec.usage_rate_or_amount;
2377 g_public_rev_op_res_tbl(i).Usage_Rate_Or_Amount_Inverse := c19rec.usage_rate_or_amount_inverse;
2378 g_public_rev_op_res_tbl(i).Basis_Type := c19rec.basis_type;
2379 g_public_rev_op_res_tbl(i).Schedule_Flag := c19rec.schedule_flag;
2380 g_public_rev_op_res_tbl(i).Resource_Offset_Percent := c19rec.resource_offset_percent;
2381 g_public_rev_op_res_tbl(i).Autocharge_Type := c19rec.autocharge_type;
2382 g_public_rev_op_res_tbl(i).Schedule_Sequence_Number := c19rec.schedule_seq_num;
2383 g_public_rev_op_res_tbl(i).Principle_Flag := c19rec.principle_flag;
2384 g_public_rev_op_res_tbl(i).Attribute_category := c19rec.attribute_category;
2385 g_public_rev_op_res_tbl(i).Attribute1 := c19rec.attribute1;
2386 g_public_rev_op_res_tbl(i).Attribute2 := c19rec.attribute2;
2387 g_public_rev_op_res_tbl(i).Attribute3 := c19rec.attribute3;
2388 g_public_rev_op_res_tbl(i).Attribute4 := c19rec.attribute4;
2389 g_public_rev_op_res_tbl(i).Attribute5 := c19rec.attribute5;
2390 g_public_rev_op_res_tbl(i).Attribute6 := c19rec.attribute6;
2391 g_public_rev_op_res_tbl(i).Attribute7 := c19rec.attribute7;
2392 g_public_rev_op_res_tbl(i).Attribute8 := c19rec.attribute8;
2393 g_public_rev_op_res_tbl(i).Attribute9 := c19rec.attribute9;
2394 g_public_rev_op_res_tbl(i).Attribute10 := c19rec.attribute10;
2395 g_public_rev_op_res_tbl(i).Attribute11 := c19rec.attribute11;
2396 g_public_rev_op_res_tbl(i).Attribute12 := c19rec.attribute12;
2397 g_public_rev_op_res_tbl(i).Attribute13 := c19rec.attribute13;
2398 g_public_rev_op_res_tbl(i).Attribute14 := c19rec.attribute14;
2399 g_public_rev_op_res_tbl(i).Attribute15 := c19rec.attribute15;
2400 g_public_rev_op_res_tbl(i).Original_System_Reference := c19rec.original_system_reference;
2401 g_public_rev_op_res_tbl(i).Transaction_Type := c19rec.transaction_type;
2402 g_public_rev_op_res_tbl(i).Setup_Type := c19rec.setup_code;
2403 -- Bug 3412268: Added New_Revised_Item_Revision
2404 g_public_rev_op_res_tbl(i).New_Revised_Item_Revision := c19rec.New_Revised_Item_Revision;
2405 END LOOP;
2406 END Get_Op_Res_With_Curr_ECO_Ifce;
2407
2408
2409 PROCEDURE Get_Sub_Op_Res_With_ECO_Ifce
2410 IS
2411 cursor GetSubResources IS
2412 SELECT eco_name, organization_code, assembly_item_number,
2413 new_revised_item_revision, new_routing_revision, acd_type,
2414 alternate_routing_designator, operation_seq_num, operation_type,
2415 effectivity_date, sub_resource_code, new_sub_resource_code,
2416 schedule_seq_num, replacement_group_num, activity, standard_rate_flag,
2417 assigned_units, usage_rate_or_amount, usage_rate_or_amount_inverse,
2418 basis_type, schedule_flag, resource_offset_percent, autocharge_type,
2419 principle_flag, attribute_category, attribute1, attribute2,
2420 attribute3, attribute4, attribute5, attribute6, attribute7,
2421 attribute8, attribute9, attribute10, attribute11, attribute12,
2422 attribute13, attribute14, attribute15, original_system_reference,
2423 transaction_type, setup_code
2424 , new_basis_type -- Bug: 5067990
2425 FROM bom_sub_op_resources_interface
2426 WHERE eng_changes_ifce_key = g_ECO_ifce_key;
2427
2428 i NUMBER;
2429 BEGIN
2430 i := 0;
2431 FOR c20rec IN GetSubResources LOOP
2432 i := i + 1;
2433 /*
2434 Eco_Name VARCHAR2(10) -- TBA eco_name
2435 , Organization_Code VARCHAR2(3) -- organization_code
2436 , Revised_Item_Name VARCHAR2(81) -- assembly_item_number
2437 , New_Revised_Item_Revision VARCHAR2(3) -- TBA new_revised_item_revision
2438 , From_End_Item_Unit_Number VARCHAR2(30)
2439 , New_Routing_Revision VARCHAR2(3) -- TBA new_routing_revision
2440 , ACD_Type NUMBER -- TBA acd_type
2441 , Alternate_Routing_Code VARCHAR2(10) -- alternate_routing_designator
2442 , Operation_Sequence_Number NUMBER -- operation_seq_num
2443 , Operation_Type NUMBER -- operation_type
2444 , Op_Start_Effective_Date DATE -- effectivity_date
2445 , Sub_Resource_Code VARCHAR2(10) -- sub_resource_code
2446 , New_Sub_Resource_Code VARCHAR2(10) -- new_sub_resource_code
2447 , Schedule_Sequence_Number NUMBER -- schedule_seq_num
2448 , Replacement_Group_Number NUMBER -- replacement_group_num
2449 , Activity VARCHAR2(10) -- activity
2450 , Standard_Rate_Flag NUMBER -- standard_rate_flag
2451 , Assigned_Units NUMBER -- assigned_units
2452 , Usage_Rate_Or_Amount NUMBER -- usage_rate_or_amount
2453 , Usage_Rate_Or_Amount_Inverse NUMBER -- usage_rate_or_amount_inverse
2454 , Basis_Type NUMBER -- basis_type
2455 , Schedule_Flag NUMBER -- schedule_flag
2456 , Resource_Offset_Percent NUMBER -- resource_offset_percent
2457 , Autocharge_Type NUMBER -- autocharge_type
2458 , Principle_Flag NUMBER -- principle_flag
2459 , Attribute_category VARCHAR2(30) -- attribute_category
2460 , Attribute1 VARCHAR2(150) -- attribute1
2461 , Attribute2 VARCHAR2(150) -- attribute2
2462 , Attribute3 VARCHAR2(150) -- attribute3
2463 , Attribute4 VARCHAR2(150) -- attribute4
2464 , Attribute5 VARCHAR2(150) -- attribute5
2465 , Attribute6 VARCHAR2(150) -- attribute6
2466 , Attribute7 VARCHAR2(150) -- attribute7
2467 , Attribute8 VARCHAR2(150) -- attribute8
2468 , Attribute9 VARCHAR2(150) -- attribute9
2469 , Attribute10 VARCHAR2(150) -- attribute10
2470 , Attribute11 VARCHAR2(150) -- attribute11
2471 , Attribute12 VARCHAR2(150) -- attribute12
2472 , Attribute13 VARCHAR2(150) -- attribute13
2473 , Attribute14 VARCHAR2(150) -- attribute14
2474 , Attribute15 VARCHAR2(150) -- attribute15
2475 , Original_System_Reference VARCHAR2(50) -- original_system_reference
2476 , Transaction_Type VARCHAR2(30) -- transaction_type
2477 , Return_Status VARCHAR2(1)
2478 , Setup_Type VARCHAR2(30) -- setup_code
2479 */
2480 g_public_rev_sub_res_tbl(i).Eco_Name := c20rec.eco_name;
2481 g_public_rev_sub_res_tbl(i).Organization_Code := c20rec.organization_code;
2482 g_public_rev_sub_res_tbl(i).Revised_Item_Name := c20rec.assembly_item_number;
2483 g_public_rev_sub_res_tbl(i).New_Revised_Item_Revision := c20rec.new_revised_item_revision;
2484 g_public_rev_sub_res_tbl(i).New_Routing_Revision := c20rec.new_routing_revision;
2485 g_public_rev_sub_res_tbl(i).ACD_Type := c20rec.acd_type;
2486 g_public_rev_sub_res_tbl(i).Alternate_Routing_Code := c20rec.alternate_routing_designator;
2487 g_public_rev_sub_res_tbl(i).Operation_Sequence_Number := c20rec.operation_seq_num;
2488 g_public_rev_sub_res_tbl(i).Operation_Type := c20rec.operation_type;
2489 g_public_rev_sub_res_tbl(i).Op_Start_Effective_Date := c20rec.effectivity_date;
2490 g_public_rev_sub_res_tbl(i).Sub_Resource_Code := c20rec.sub_resource_code;
2491 g_public_rev_sub_res_tbl(i).New_Sub_Resource_Code := c20rec.new_sub_resource_code;
2492 g_public_rev_sub_res_tbl(i).Schedule_Sequence_Number := c20rec.schedule_seq_num;
2493 g_public_rev_sub_res_tbl(i).Replacement_Group_Number := c20rec.replacement_group_num;
2494 g_public_rev_sub_res_tbl(i).Activity := c20rec.activity;
2495 g_public_rev_sub_res_tbl(i).Standard_Rate_Flag := c20rec.standard_rate_flag;
2496 g_public_rev_sub_res_tbl(i).Assigned_Units := c20rec.assigned_units;
2497 g_public_rev_sub_res_tbl(i).Usage_Rate_Or_Amount := c20rec.usage_rate_or_amount;
2498 g_public_rev_sub_res_tbl(i).Usage_Rate_Or_Amount_Inverse := c20rec.usage_rate_or_amount_inverse;
2499 g_public_rev_sub_res_tbl(i).Basis_Type := c20rec.basis_type;
2500 g_public_rev_sub_res_tbl(i).Schedule_Flag := c20rec.schedule_flag;
2501 g_public_rev_sub_res_tbl(i).Resource_Offset_Percent := c20rec.resource_offset_percent;
2502 g_public_rev_sub_res_tbl(i).Autocharge_Type := c20rec.autocharge_type;
2503 g_public_rev_sub_res_tbl(i).Principle_Flag := c20rec.principle_flag;
2504 g_public_rev_sub_res_tbl(i).Attribute_category := c20rec.attribute_category;
2505 g_public_rev_sub_res_tbl(i).Attribute1 := c20rec.attribute1;
2506 g_public_rev_sub_res_tbl(i).Attribute2 := c20rec.attribute2;
2507 g_public_rev_sub_res_tbl(i).Attribute3 := c20rec.attribute3;
2508 g_public_rev_sub_res_tbl(i).Attribute4 := c20rec.attribute4;
2509 g_public_rev_sub_res_tbl(i).Attribute5 := c20rec.attribute5;
2510 g_public_rev_sub_res_tbl(i).Attribute6 := c20rec.attribute6;
2511 g_public_rev_sub_res_tbl(i).Attribute7 := c20rec.attribute7;
2512 g_public_rev_sub_res_tbl(i).Attribute8 := c20rec.attribute8;
2513 g_public_rev_sub_res_tbl(i).Attribute9 := c20rec.attribute9;
2514 g_public_rev_sub_res_tbl(i).Attribute10 := c20rec.attribute10;
2515 g_public_rev_sub_res_tbl(i).Attribute11 := c20rec.attribute11;
2516 g_public_rev_sub_res_tbl(i).Attribute12 := c20rec.attribute12;
2517 g_public_rev_sub_res_tbl(i).Attribute13 := c20rec.attribute13;
2518 g_public_rev_sub_res_tbl(i).Attribute14 := c20rec.attribute14;
2519 g_public_rev_sub_res_tbl(i).Attribute15 := c20rec.attribute15;
2520 g_public_rev_sub_res_tbl(i).Original_System_Reference := c20rec.original_system_reference;
2521 g_public_rev_sub_res_tbl(i).Transaction_Type := c20rec.transaction_type;
2522 g_public_rev_sub_res_tbl(i).Setup_Type := c20rec.setup_code;
2523 g_public_rev_sub_res_tbl(i).New_Basis_Type := c20rec.New_Basis_Type; -- Bug: 5067990
2524 END LOOP;
2525
2526 END Get_Sub_Op_Res_With_ECO_Ifce;
2527
2528
2529
2530 -- Procedure Move_Encoin_Struct_To_Public
2531 -- Move all encoin data structures to public API parameter structures
2532
2533 PROCEDURE Move_Encoin_Struct_To_Public
2534 IS
2535 k NUMBER;
2536 l NUMBER;
2537 j NUMBER;
2538 p NUMBER;
2539 BEGIN
2540
2541 -- Move Revised Items
2542
2543 IF g_encoin_rev_item_tbl.COUNT <> 0
2544 THEN
2545 --dbms_output.put_line('Moving item encoin data structures to public data structures');
2546
2547 FOR k in 1..g_encoin_rev_item_tbl.COUNT LOOP
2548 g_public_rev_item_tbl(k).eco_name := g_encoin_rev_item_tbl(k).change_notice;
2549 -- g_public_rev_item_tbl(k).organization_id := g_encoin_rev_item_tbl(k).organization_id;
2550 -- g_public_rev_item_tbl(k).revised_item_id := g_encoin_rev_item_tbl(k).revised_item_id;
2551 -- g_public_rev_item_tbl(k).last_update_date := g_encoin_rev_item_tbl(k).last_update_date;
2552 -- g_public_rev_item_tbl(k).last_updated_by := g_encoin_rev_item_tbl(k).last_updated_by;
2553 -- g_public_rev_item_tbl(k).creation_date := g_encoin_rev_item_tbl(k).creation_date;
2554 -- g_public_rev_item_tbl(k).created_by := g_encoin_rev_item_tbl(k).created_by;
2555 -- g_public_rev_item_tbl(k).last_update_login := g_encoin_rev_item_tbl(k).last_update_login;
2556 -- g_public_rev_item_tbl(k).implementation_date := g_encoin_rev_item_tbl(k).implementation_date;
2557 -- g_public_rev_item_tbl(k).cancellation_date := g_encoin_rev_item_tbl(k).cancellation_date;
2558 g_public_rev_item_tbl(k).cancel_comments := g_encoin_rev_item_tbl(k).cancel_comments;
2559 g_public_rev_item_tbl(k).disposition_type := g_encoin_rev_item_tbl(k).disposition_type;
2560 g_public_rev_item_tbl(k).new_revised_item_revision := g_encoin_rev_item_tbl(k).new_item_revision;
2561 g_public_rev_item_tbl(k).Earliest_Effective_Date := g_encoin_rev_item_tbl(k).early_schedule_date;
2562 g_public_rev_item_tbl(k).attribute_category := g_encoin_rev_item_tbl(k).attribute_category;
2563 g_public_rev_item_tbl(k).attribute2 := g_encoin_rev_item_tbl(k).attribute2;
2564 g_public_rev_item_tbl(k).attribute3 := g_encoin_rev_item_tbl(k).attribute3;
2565 g_public_rev_item_tbl(k).attribute4 := g_encoin_rev_item_tbl(k).attribute4;
2566 g_public_rev_item_tbl(k).attribute5 := g_encoin_rev_item_tbl(k).attribute5;
2567 g_public_rev_item_tbl(k).attribute7 := g_encoin_rev_item_tbl(k).attribute7;
2568 g_public_rev_item_tbl(k).attribute8 := g_encoin_rev_item_tbl(k).attribute8;
2569 g_public_rev_item_tbl(k).attribute9 := g_encoin_rev_item_tbl(k).attribute9;
2570 g_public_rev_item_tbl(k).attribute11 := g_encoin_rev_item_tbl(k).attribute11;
2571 g_public_rev_item_tbl(k).attribute12 := g_encoin_rev_item_tbl(k).attribute12;
2572 g_public_rev_item_tbl(k).attribute13 := g_encoin_rev_item_tbl(k).attribute13;
2573 g_public_rev_item_tbl(k).attribute14 := g_encoin_rev_item_tbl(k).attribute14;
2574 g_public_rev_item_tbl(k).attribute15 := g_encoin_rev_item_tbl(k).attribute15;
2575 g_public_rev_item_tbl(k).status_type := g_encoin_rev_item_tbl(k).status_type;
2576 g_public_rev_item_tbl(k).start_effective_date := g_encoin_rev_item_tbl(k).scheduled_date;
2577 -- g_public_rev_item_tbl(k).bill_sequence_id := g_encoin_rev_item_tbl(k).bill_sequence_id;
2578 g_public_rev_item_tbl(k).mrp_active := g_encoin_rev_item_tbl(k).mrp_active;
2579 -- g_public_rev_item_tbl(k).request_id := g_encoin_rev_item_tbl(k).request_id;
2580 -- g_public_rev_item_tbl(k).program_application_id := g_encoin_rev_item_tbl(k).program_application_id;
2581 -- g_public_rev_item_tbl(k).program_id := g_encoin_rev_item_tbl(k).program_id;
2582 -- g_public_rev_item_tbl(k).program_update_date := g_encoin_rev_item_tbl(k).program_update_date;
2583 g_public_rev_item_tbl(k).update_wip := g_encoin_rev_item_tbl(k).update_wip;
2584 -- g_public_rev_item_tbl(k).use_up := g_encoin_rev_item_tbl(k).use_up;
2585 -- g_public_rev_item_tbl(k).use_up_item_id := g_encoin_rev_item_tbl(k).use_up_item_id;
2586 -- g_public_rev_item_tbl(k).revised_item_sequence_id := g_encoin_rev_item_tbl(k).revised_item_sequence_id;
2587 g_public_rev_item_tbl(k).use_up_plan_name := g_encoin_rev_item_tbl(k).use_up_plan_name;
2588 -- g_public_rev_item_tbl(k).descriptive_text := g_encoin_rev_item_tbl(k).descriptive_text;
2589 -- g_public_rev_item_tbl(k).auto_implement_date := g_encoin_rev_item_tbl(k).auto_implement_date;
2590 g_public_rev_item_tbl(k).attribute1 := g_encoin_rev_item_tbl(k).attribute1;
2591 g_public_rev_item_tbl(k).attribute6 := g_encoin_rev_item_tbl(k).attribute6;
2592 g_public_rev_item_tbl(k).attribute10 := g_encoin_rev_item_tbl(k).attribute10;
2593 -- g_public_rev_item_tbl(k).requestor_id := g_encoin_rev_item_tbl(k).requestor_id;
2594 -- g_public_rev_item_tbl(k).comments := g_encoin_rev_item_tbl(k).comments;
2595 -- g_public_rev_item_tbl(k).process_flag := g_encoin_rev_item_tbl(k).process_flag;
2596 g_public_rev_item_tbl(k).transaction_id := g_encoin_rev_item_tbl(k).transaction_id;
2597 g_public_rev_item_tbl(k).organization_code := g_encoin_rev_item_tbl(k).organization_code;
2598 g_public_rev_item_tbl(k).revised_item_name := g_encoin_rev_item_tbl(k).revised_item_number;
2599 g_public_rev_item_tbl(k).new_routing_revision := g_encoin_rev_item_tbl(k).new_rtg_revision;
2600 g_public_rev_item_tbl(k).use_up_item_name := g_encoin_rev_item_tbl(k).use_up_item_number;
2601 g_public_rev_item_tbl(k).alternate_bom_code := g_encoin_rev_item_tbl(k).alternate_bom_designator; -- Added to Fix 2869146
2602 g_public_rev_item_tbl(k).transaction_type := g_encoin_rev_item_tbl(k).operation;
2603 --11.5.10 chnages
2604 g_public_rev_item_tbl(k).parent_revised_item_name := g_encoin_rev_item_tbl(k).parent_revised_item_name ;
2605 g_public_rev_item_tbl(k).parent_alternate_name := g_encoin_rev_item_tbl(k).parent_alternate_name ;
2606
2607 g_public_rev_item_tbl(k).New_Effective_Date := g_encoin_rev_item_tbl(k).new_scheduled_date; -- Bug 3432944
2608 g_public_rev_item_tbl(k).Updated_Revised_Item_Revision := g_encoin_rev_item_tbl(k).updated_item_revision; -- Bug 3432944
2609 g_public_rev_item_tbl(k).from_item_revision := g_encoin_rev_item_tbl(k).from_item_revision; -- 11.5.10E
2610 g_public_rev_item_tbl(k).new_revision_label := g_encoin_rev_item_tbl(k).new_revision_label;
2611 g_public_rev_item_tbl(k).New_Revised_Item_Rev_Desc := g_encoin_rev_item_tbl(k).New_Revised_Item_Rev_Desc;
2612 g_public_rev_item_tbl(k).new_revision_reason := g_encoin_rev_item_tbl(k).new_revision_reason;
2613 g_public_rev_item_tbl(k).from_end_item_unit_number := g_encoin_rev_item_tbl(k).from_end_item_unit_number; /*Bug 6377841*/
2614 --11.5.10 chnages
2615 g_encoin_rev_item_tbl.DELETE(k);
2616 END LOOP; -- End Rev Items Loop
2617 END IF;
2618
2619 -- Move Revised Components
2620
2621 IF g_encoin_rev_comp_tbl.COUNT <> 0
2622 THEN
2623 --dbms_output.put_line('Moving comp encoin data structures to public data structures');
2624
2625 FOR l in 1..g_encoin_rev_comp_tbl.COUNT LOOP
2626 g_public_rev_comp_tbl(l).supply_subinventory := g_encoin_rev_comp_tbl(l).supply_subinventory;
2627 -- g_public_rev_comp_tbl(l).OP_LEAD_TIME_PERCENT := g_encoin_rev_comp_tbl(l).OP_LEAD_TIME_PERCENT;
2628 -- g_public_rev_comp_tbl(l).revised_item_sequence_id := g_encoin_rev_comp_tbl(l).revised_item_sequence_id;
2629 -- g_public_rev_comp_tbl(l).cost_factor := g_encoin_rev_comp_tbl(l).cost_factor;
2630 g_public_rev_comp_tbl(l).required_for_revenue := g_encoin_rev_comp_tbl(l).required_for_revenue;
2631 g_public_rev_comp_tbl(l).maximum_allowed_quantity := g_encoin_rev_comp_tbl(l).high_quantity;
2632 -- g_public_rev_comp_tbl(l).component_sequence_id := g_encoin_rev_comp_tbl(l).component_sequence_id;
2633 -- g_public_rev_comp_tbl(l).program_application_id := g_encoin_rev_comp_tbl(l).program_application_id;
2634 g_public_rev_comp_tbl(l).wip_supply_type := g_encoin_rev_comp_tbl(l).wip_supply_type;
2635 -- g_public_rev_comp_tbl(l).supply_locator_id := g_encoin_rev_comp_tbl(l).supply_locator_id;
2636 -- g_public_rev_comp_tbl(l).bom_item_type := g_encoin_rev_comp_tbl(l).bom_item_type;
2637 g_public_rev_comp_tbl(l).operation_sequence_number := g_encoin_rev_comp_tbl(l).operation_seq_num;
2638 -- g_public_rev_comp_tbl(l).component_item_id := g_encoin_rev_comp_tbl(l).component_item_id;
2639 -- g_public_rev_comp_tbl(l).last_update_date := g_encoin_rev_comp_tbl(l).last_update_date;
2640 -- g_public_rev_comp_tbl(l).last_updated_by := g_encoin_rev_comp_tbl(l).last_updated_by;
2641 -- g_public_rev_comp_tbl(l).creation_date := g_encoin_rev_comp_tbl(l).creation_date;
2642 -- g_public_rev_comp_tbl(l).created_by := g_encoin_rev_comp_tbl(l).created_by;
2643 -- g_public_rev_comp_tbl(l).last_update_login := g_encoin_rev_comp_tbl(l).last_update_login;
2644 g_public_rev_comp_tbl(l).item_sequence_number := g_encoin_rev_comp_tbl(l).item_num;
2645 g_public_rev_comp_tbl(l).quantity_per_assembly := g_encoin_rev_comp_tbl(l).component_quantity;
2646 g_public_rev_comp_tbl(l).projected_yield := g_encoin_rev_comp_tbl(l).component_yield_factor;
2647 g_public_rev_comp_tbl(l).COMMENTS := g_encoin_rev_comp_tbl(l).component_remarks;
2648 g_public_rev_comp_tbl(l).revised_item_name := g_encoin_rev_comp_tbl(l).revised_item_number;
2649 g_public_rev_comp_tbl(l).start_effective_date := g_encoin_rev_comp_tbl(l).effectivity_date;
2650 g_public_rev_comp_tbl(l).eco_name := g_encoin_rev_comp_tbl(l).change_notice;
2651 -- g_public_rev_comp_tbl(l).implementation_date := g_encoin_rev_comp_tbl(l).implementation_date;
2652 g_public_rev_comp_tbl(l).disable_date := g_encoin_rev_comp_tbl(l).disable_date;
2653 g_public_rev_comp_tbl(l).attribute_category := g_encoin_rev_comp_tbl(l).attribute_category;
2654 g_public_rev_comp_tbl(l).attribute1 := g_encoin_rev_comp_tbl(l).attribute1;
2655 g_public_rev_comp_tbl(l).attribute2 := g_encoin_rev_comp_tbl(l).attribute2;
2656 g_public_rev_comp_tbl(l).attribute3 := g_encoin_rev_comp_tbl(l).attribute3;
2657 g_public_rev_comp_tbl(l).attribute4 := g_encoin_rev_comp_tbl(l).attribute4;
2658 g_public_rev_comp_tbl(l).attribute5 := g_encoin_rev_comp_tbl(l).attribute5;
2659 g_public_rev_comp_tbl(l).attribute6 := g_encoin_rev_comp_tbl(l).attribute6;
2660 g_public_rev_comp_tbl(l).attribute7 := g_encoin_rev_comp_tbl(l).attribute7;
2661 g_public_rev_comp_tbl(l).attribute8 := g_encoin_rev_comp_tbl(l).attribute8;
2662 g_public_rev_comp_tbl(l).attribute9 := g_encoin_rev_comp_tbl(l).attribute9;
2663 g_public_rev_comp_tbl(l).attribute10 := g_encoin_rev_comp_tbl(l).attribute10;
2664 g_public_rev_comp_tbl(l).attribute11 := g_encoin_rev_comp_tbl(l).attribute11;
2665 g_public_rev_comp_tbl(l).attribute12 := g_encoin_rev_comp_tbl(l).attribute12;
2666 g_public_rev_comp_tbl(l).attribute13 := g_encoin_rev_comp_tbl(l).attribute13;
2667 g_public_rev_comp_tbl(l).attribute14 := g_encoin_rev_comp_tbl(l).attribute14;
2668 g_public_rev_comp_tbl(l).attribute15 := g_encoin_rev_comp_tbl(l).attribute15;
2669 g_public_rev_comp_tbl(l).planning_percent := g_encoin_rev_comp_tbl(l).planning_factor;
2670 g_public_rev_comp_tbl(l).quantity_related := g_encoin_rev_comp_tbl(l).quantity_related;
2671 g_public_rev_comp_tbl(l).so_basis := g_encoin_rev_comp_tbl(l).so_basis;
2672 g_public_rev_comp_tbl(l).optional := g_encoin_rev_comp_tbl(l).optional;
2673 g_public_rev_comp_tbl(l).mutually_exclusive := g_encoin_rev_comp_tbl(l).MUTUALLY_EXCLUSIVE_OPT;
2674 g_public_rev_comp_tbl(l).include_in_cost_rollup := g_encoin_rev_comp_tbl(l).include_in_cost_rollup;
2675 g_public_rev_comp_tbl(l).check_atp := g_encoin_rev_comp_tbl(l).check_atp;
2676 g_public_rev_comp_tbl(l).shipping_allowed := g_encoin_rev_comp_tbl(l).shipping_allowed;
2677 g_public_rev_comp_tbl(l).required_to_ship := g_encoin_rev_comp_tbl(l).required_to_ship;
2678 g_public_rev_comp_tbl(l).include_on_ship_docs := g_encoin_rev_comp_tbl(l).include_on_ship_docs;
2679 -- g_public_rev_comp_tbl(l).include_on_bill_docs := g_encoin_rev_comp_tbl(l).include_on_bill_docs;
2680 g_public_rev_comp_tbl(l).minimum_allowed_quantity := g_encoin_rev_comp_tbl(l).low_quantity;
2681 g_public_rev_comp_tbl(l).acd_type := g_encoin_rev_comp_tbl(l).acd_type;
2682 -- g_public_rev_comp_tbl(l).old_component_sequence_id := g_encoin_rev_comp_tbl(l).old_component_sequence_id;
2683 -- g_public_rev_comp_tbl(l).bill_sequence_id := g_encoin_rev_comp_tbl(l).bill_sequence_id;
2684 -- g_public_rev_comp_tbl(l).request_id := g_encoin_rev_comp_tbl(l).request_id;
2685 -- g_public_rev_comp_tbl(l).program_id := g_encoin_rev_comp_tbl(l).program_id;
2686 -- g_public_rev_comp_tbl(l).program_update_date := g_encoin_rev_comp_tbl(l).program_update_date;
2687 -- g_public_rev_comp_tbl(l).pick_components := g_encoin_rev_comp_tbl(l).pick_components;
2688 -- g_public_rev_comp_tbl(l).assembly_type := g_encoin_rev_comp_tbl(l).assembly_type;
2689 -- g_public_rev_comp_tbl(l).interface_entity_type := g_encoin_rev_comp_tbl(l).interface_entity_type;
2690 -- g_public_rev_comp_tbl(l).reference_designator := g_encoin_rev_comp_tbl(l).reference_designator;
2691 g_public_rev_comp_tbl(l).new_effectivity_date := g_encoin_rev_comp_tbl(l).new_effectivity_date;
2692 g_public_rev_comp_tbl(l).old_effectivity_date := g_encoin_rev_comp_tbl(l).old_effectivity_date;
2693 -- g_public_rev_comp_tbl(l).substitute_comp_id := g_encoin_rev_comp_tbl(l).substitute_comp_id;
2694 g_public_rev_comp_tbl(l).new_operation_sequence_number := g_encoin_rev_comp_tbl(l).new_operation_seq_num;
2695 g_public_rev_comp_tbl(l).old_operation_sequence_number := g_encoin_rev_comp_tbl(l).old_operation_seq_num;
2696 -- g_public_rev_comp_tbl(l).process_flag := g_encoin_rev_comp_tbl(l).process_flag;
2697 g_public_rev_comp_tbl(l).row_identifier := g_encoin_rev_comp_tbl(l).transaction_id;
2698 -- g_public_rev_comp_tbl(l).SUBSTITUTE_COMP_NUMBER := g_encoin_rev_comp_tbl(l).SUBSTITUTE_COMP_NUMBER;
2699 g_public_rev_comp_tbl(l).ORGANIZATION_CODE := g_encoin_rev_comp_tbl(l).ORGANIZATION_CODE;
2700 -- g_public_rev_comp_tbl(l).ASSEMBLY_ITEM_NUMBER := g_encoin_rev_comp_tbl(l).ASSEMBLY_ITEM_NUMBER;
2701 g_public_rev_comp_tbl(l).COMPONENT_ITEM_NAME := g_encoin_rev_comp_tbl(l).COMPONENT_ITEM_NUMBER;
2702 g_public_rev_comp_tbl(l).LOCATION_NAME := g_encoin_rev_comp_tbl(l).LOCATION_NAME;
2703 -- g_public_rev_comp_tbl(l).ORGANIZATION_ID := g_encoin_rev_comp_tbl(l).ORGANIZATION_ID;
2704 -- g_public_rev_comp_tbl(l).ASSEMBLY_ITEM_ID := g_encoin_rev_comp_tbl(l).ASSEMBLY_ITEM_ID;
2705 g_public_rev_comp_tbl(l).ALTERNATE_BOM_CODE := g_encoin_rev_comp_tbl(l).ALTERNATE_BOM_DESIGNATOR;
2706 g_public_rev_comp_tbl(l).transaction_type := g_encoin_rev_comp_tbl(l).operation;
2707 -- g_public_rev_comp_tbl(l).revised_item_tbl_index := g_encoin_rev_comp_tbl(l).revised_item_tbl_index;
2708 --Bug 3396529: Added New_revised_Item_Revision
2709 g_public_rev_comp_tbl(l).New_revised_Item_Revision := g_encoin_rev_comp_tbl(l).New_revised_Item_Revision;
2710 g_public_rev_comp_tbl(l).from_end_item_unit_number := g_encoin_rev_comp_tbl(l).from_end_item_unit_number; /*Bug 6377841*/
2711 g_public_rev_comp_tbl(l).to_end_item_unit_number := g_encoin_rev_comp_tbl(l).to_end_item_unit_number; /*Bug 6377841*/
2712
2713 g_encoin_rev_comp_tbl.DELETE(l);
2714 END LOOP; -- End Rev Comps Loop
2715 END IF;
2716
2717 -- Move Reference Designators
2718
2719 IF g_encoin_ref_des_tbl.COUNT <> 0
2720 THEN
2721 --dbms_output.put_line('Moving rfd encoin data structures to public data structures');
2722
2723 FOR k in 1..g_encoin_ref_des_tbl.COUNT LOOP
2724 g_public_ref_des_tbl(k).reference_designator_name := g_encoin_ref_des_tbl(k).REF_DESIGNATOR;
2725 -- g_public_ref_des_tbl(k).last_update_date := g_encoin_ref_des_tbl(k).last_update_date;
2726 -- g_public_ref_des_tbl(k).last_updated_by := g_encoin_ref_des_tbl(k).last_updated_by;
2727 -- g_public_ref_des_tbl(k).creation_date := g_encoin_ref_des_tbl(k).creation_date;
2728 -- g_public_ref_des_tbl(k).created_by := g_encoin_ref_des_tbl(k).created_by;
2729 -- g_public_ref_des_tbl(k).last_update_login := g_encoin_ref_des_tbl(k).last_update_login;
2730 g_public_ref_des_tbl(k).ref_designator_comment := g_encoin_ref_des_tbl(k).ref_designator_comment;
2731 g_public_ref_des_tbl(k).eco_name := g_encoin_ref_des_tbl(k).change_notice;
2732 -- g_public_ref_des_tbl(k).component_sequence_id := g_encoin_ref_des_tbl(k).component_sequence_id;
2733 g_public_ref_des_tbl(k).acd_type := g_encoin_ref_des_tbl(k).acd_type;
2734 -- g_public_ref_des_tbl(k).request_id := g_encoin_ref_des_tbl(k).request_id;
2735 -- g_public_ref_des_tbl(k).program_application_id := g_encoin_ref_des_tbl(k).program_application_id;
2736 -- g_public_ref_des_tbl(k).program_id := g_encoin_ref_des_tbl(k).program_id;
2737 -- g_public_ref_des_tbl(k).program_update_date := g_encoin_ref_des_tbl(k).program_update_date;
2738 g_public_ref_des_tbl(k).attribute_category := g_encoin_ref_des_tbl(k).attribute_category;
2739 g_public_ref_des_tbl(k).attribute1 := g_encoin_ref_des_tbl(k).attribute1;
2740 g_public_ref_des_tbl(k).attribute2 := g_encoin_ref_des_tbl(k).attribute2;
2741 g_public_ref_des_tbl(k).attribute3 := g_encoin_ref_des_tbl(k).attribute3;
2742 g_public_ref_des_tbl(k).attribute4 := g_encoin_ref_des_tbl(k).attribute4;
2743 g_public_ref_des_tbl(k).attribute5 := g_encoin_ref_des_tbl(k).attribute5;
2744 g_public_ref_des_tbl(k).attribute6 := g_encoin_ref_des_tbl(k).attribute6;
2745 g_public_ref_des_tbl(k).attribute7 := g_encoin_ref_des_tbl(k).attribute7;
2746 g_public_ref_des_tbl(k).attribute8 := g_encoin_ref_des_tbl(k).attribute8;
2747 g_public_ref_des_tbl(k).attribute9 := g_encoin_ref_des_tbl(k).attribute9;
2748 g_public_ref_des_tbl(k).attribute10 := g_encoin_ref_des_tbl(k).attribute10;
2749 g_public_ref_des_tbl(k).attribute11 := g_encoin_ref_des_tbl(k).attribute11;
2750 g_public_ref_des_tbl(k).attribute12 := g_encoin_ref_des_tbl(k).attribute12;
2751 g_public_ref_des_tbl(k).attribute13 := g_encoin_ref_des_tbl(k).attribute13;
2752 g_public_ref_des_tbl(k).attribute14 := g_encoin_ref_des_tbl(k).attribute14;
2753 g_public_ref_des_tbl(k).attribute15 := g_encoin_ref_des_tbl(k).attribute15;
2754 -- g_public_ref_des_tbl(k).new_designator := g_encoin_ref_des_tbl(k).new_designator;
2755 -- g_public_ref_des_tbl(k).process_flag := g_encoin_ref_des_tbl(k).process_flag;
2756 -- g_public_ref_des_tbl(k).transaction_id := g_encoin_ref_des_tbl(k).transaction_id;
2757 g_public_ref_des_tbl(k).revised_item_name := g_encoin_ref_des_tbl(k).ASSEMBLY_ITEM_NUMBER;
2758 g_public_ref_des_tbl(k).COMPONENT_ITEM_NAME := g_encoin_ref_des_tbl(k).COMPONENT_ITEM_NUMBER;
2759 g_public_ref_des_tbl(k).ORGANIZATION_CODE := g_encoin_ref_des_tbl(k).ORGANIZATION_CODE;
2760 -- g_public_ref_des_tbl(k).ORGANIZATION_ID := g_encoin_ref_des_tbl(k).ORGANIZATION_ID;
2761 -- g_public_ref_des_tbl(k).ASSEMBLY_ITEM_ID := g_encoin_ref_des_tbl(k).ASSEMBLY_ITEM_ID;
2762 g_public_ref_des_tbl(k).Alternate_Bom_Code := g_encoin_ref_des_tbl(k).ALTERNATE_BOM_DESIGNATOR;
2763 -- g_public_ref_des_tbl(k).COMPONENT_ITEM_ID := g_encoin_ref_des_tbl(k).COMPONENT_ITEM_ID;
2764 -- g_public_ref_des_tbl(k).BILL_SEQUENCE_ID := g_encoin_ref_des_tbl(k).BILL_SEQUENCE_ID;
2765 g_public_ref_des_tbl(k).OPERATION_SEQUENCE_NUMBER := g_encoin_ref_des_tbl(k).OPERATION_SEQ_NUM;
2766 g_public_ref_des_tbl(k).START_EFFECTIVE_DATE := g_encoin_ref_des_tbl(k).EFFECTIVITY_DATE;
2767 -- g_public_ref_des_tbl(k).interface_entity_type := g_encoin_ref_des_tbl(k).interface_entity_type;
2768 g_public_ref_des_tbl(k).transaction_type := g_encoin_ref_des_tbl(k).operation;
2769 --Bug 3396529: Added New_revised_Item_Revision
2770 g_public_ref_des_tbl(k).New_revised_Item_Revision := g_encoin_ref_des_tbl(k).New_revised_Item_Revision;
2771
2772 -- g_public_ref_des_tbl(k).revised_comp_tbl_index := g_encoin_ref_des_tbl(k).revised_comp_tbl_index;
2773 g_encoin_ref_des_tbl.DELETE(k);
2774 END LOOP; -- END Ref Desgs loop
2775 END IF;
2776
2777 -- Move Substitute Components
2778
2779 IF g_encoin_sub_comp_tbl.COUNT <> 0
2780 THEN
2781 --dbms_output.put_line('Moving sbc encoin data structures to public data structures');
2782
2783 FOR p in 1..g_encoin_sub_comp_tbl.COUNT LOOP
2784 -- g_public_sub_comp_tbl(p).substitute_component_id := g_encoin_sub_comp_tbl(p).substitute_component_id;
2785 -- g_public_sub_comp_tbl(p).last_update_date := g_encoin_sub_comp_tbl(p).last_update_date;
2786 -- g_public_sub_comp_tbl(p).last_updated_by := g_encoin_sub_comp_tbl(p).last_updated_by;
2787 -- g_public_sub_comp_tbl(p).creation_date := g_encoin_sub_comp_tbl(p).creation_date;
2788 -- g_public_sub_comp_tbl(p).created_by := g_encoin_sub_comp_tbl(p).created_by;
2789 -- g_public_sub_comp_tbl(p).last_update_login := g_encoin_sub_comp_tbl(p).last_update_login;
2790 g_public_sub_comp_tbl(p).substitute_item_quantity := g_encoin_sub_comp_tbl(p).substitute_item_quantity;
2791 -- g_public_sub_comp_tbl(p).component_sequence_id := g_encoin_sub_comp_tbl(p).component_sequence_id;
2792 g_public_sub_comp_tbl(p).acd_type := g_encoin_sub_comp_tbl(p).acd_type;
2793 g_public_sub_comp_tbl(p).eco_name := g_encoin_sub_comp_tbl(p).change_notice;
2794 -- g_public_sub_comp_tbl(p).request_id := g_encoin_sub_comp_tbl(p).request_id;
2795 -- g_public_sub_comp_tbl(p).program_application_id := g_encoin_sub_comp_tbl(p).program_application_id;
2796 -- g_public_sub_comp_tbl(p).program_update_date := g_encoin_sub_comp_tbl(p).program_update_date;
2797 g_public_sub_comp_tbl(p).attribute_category := g_encoin_sub_comp_tbl(p).attribute_category;
2798 g_public_sub_comp_tbl(p).attribute1 := g_encoin_sub_comp_tbl(p).attribute1;
2799 g_public_sub_comp_tbl(p).attribute1 := g_encoin_sub_comp_tbl(p).attribute2;
2800 g_public_sub_comp_tbl(p).attribute1 := g_encoin_sub_comp_tbl(p).attribute4;
2801 g_public_sub_comp_tbl(p).attribute1 := g_encoin_sub_comp_tbl(p).attribute5;
2802 g_public_sub_comp_tbl(p).attribute1 := g_encoin_sub_comp_tbl(p).attribute6;
2803 g_public_sub_comp_tbl(p).attribute8 := g_encoin_sub_comp_tbl(p).attribute8;
2804 g_public_sub_comp_tbl(p).attribute9 := g_encoin_sub_comp_tbl(p).attribute9;
2805 g_public_sub_comp_tbl(p).attribute10 := g_encoin_sub_comp_tbl(p).attribute10;
2806 g_public_sub_comp_tbl(p).attribute12 := g_encoin_sub_comp_tbl(p).attribute12;
2807 g_public_sub_comp_tbl(p).attribute13 := g_encoin_sub_comp_tbl(p).attribute13;
2808 g_public_sub_comp_tbl(p).attribute14 := g_encoin_sub_comp_tbl(p).attribute14;
2809 g_public_sub_comp_tbl(p).attribute15 := g_encoin_sub_comp_tbl(p).attribute15;
2810 g_public_sub_comp_tbl(p).program_id := g_encoin_sub_comp_tbl(p).program_id;
2811 g_public_sub_comp_tbl(p).attribute3 := g_encoin_sub_comp_tbl(p).attribute3;
2812 g_public_sub_comp_tbl(p).attribute7 := g_encoin_sub_comp_tbl(p).attribute7;
2813 g_public_sub_comp_tbl(p).attribute11 := g_encoin_sub_comp_tbl(p).attribute11;
2814 -- g_public_sub_comp_tbl(p).new_sub_comp_id := g_encoin_sub_comp_tbl(p).new_sub_comp_id;
2815 -- g_public_sub_comp_tbl(p).process_flag := g_encoin_sub_comp_tbl(p).process_flag;
2816 g_public_sub_comp_tbl(p).row_identifier := g_encoin_sub_comp_tbl(p).transaction_id;
2817 -- g_public_sub_comp_tbl(p).NEW_SUB_COMP_NUMBER := g_encoin_sub_comp_tbl(p).NEW_SUB_COMP_NUMBER;
2818 g_public_sub_comp_tbl(p).revised_item_name := g_encoin_sub_comp_tbl(p).ASSEMBLY_ITEM_NUMBER;
2819 g_public_sub_comp_tbl(p).COMPONENT_ITEM_NAME := g_encoin_sub_comp_tbl(p).COMPONENT_ITEM_NUMBER;
2820 g_public_sub_comp_tbl(p).SUBSTITUTE_COMPONENT_NAME := g_encoin_sub_comp_tbl(p).SUBSTITUTE_COMP_NUMBER;
2821 g_public_sub_comp_tbl(p).ORGANIZATION_CODE := g_encoin_sub_comp_tbl(p).ORGANIZATION_CODE;
2822 -- g_public_sub_comp_tbl(p).ORGANIZATION_ID := g_encoin_sub_comp_tbl(p).ORGANIZATION_ID;
2823 -- g_public_sub_comp_tbl(p).ASSEMBLY_ITEM_ID := g_encoin_sub_comp_tbl(p).ASSEMBLY_ITEM_ID;
2824 g_public_sub_comp_tbl(p).Alternate_Bom_Code := g_encoin_sub_comp_tbl(p).ALTERNATE_BOM_DESIGNATOR;
2825 -- g_public_sub_comp_tbl(p).COMPONENT_ITEM_ID := g_encoin_sub_comp_tbl(p).COMPONENT_ITEM_ID;
2826 -- g_public_sub_comp_tbl(p).BILL_SEQUENCE_ID := g_encoin_sub_comp_tbl(p).BILL_SEQUENCE_ID;
2827 g_public_sub_comp_tbl(p).OPERATION_SEQUENCE_NUMBER := g_encoin_sub_comp_tbl(p).OPERATION_SEQ_NUM;
2828 g_public_sub_comp_tbl(p).START_EFFECTIVE_DATE := g_encoin_sub_comp_tbl(p).EFFECTIVITY_DATE;
2829 -- g_public_sub_comp_tbl(p).interface_entity_type := g_encoin_sub_comp_tbl(p).interface_entity_type;
2830 g_public_sub_comp_tbl(p).transaction_type := g_encoin_sub_comp_tbl(p).operation;
2831 --Bug 3396529: Added New_revised_Item_Revision
2832 g_public_sub_comp_tbl(p).New_revised_Item_Revision := g_encoin_sub_comp_tbl(p).New_revised_Item_Revision;
2833
2834 -- g_public_sub_comp_tbl(p).revised_comp_tbl_index := g_encoin_sub_comp_tbl(p).revised_comp_tbl_index;
2835 g_encoin_sub_comp_tbl.DELETE(p);
2836 END LOOP; -- END Sub Comps Loop
2837 END IF;
2838 END Move_Encoin_Struct_To_Public;
2839
2840 -- Procedure ResolveIndexKeys
2841 -- Translate parent ifce keys into parent array indexes
2842
2843 PROCEDURE ResolveIndexKeys
2844 IS
2845 i NUMBER;
2846 j NUMBER;
2847 k NUMBER;
2848 rev_item_count NUMBER;
2849 rev_comp_count NUMBER;
2850 BEGIN
2851
2852 rev_item_count := g_encoin_rev_item_tbl.COUNT;
2853 rev_comp_count := g_encoin_rev_comp_tbl.COUNT;
2854
2855 -- Resolve parent revised item ifce keys for all revised components
2856
2857 FOR i IN 1..rev_item_count
2858 LOOP
2859 IF g_encoin_rev_item_tbl(i).eng_revised_items_ifce_key IS NOT NULL
2860 THEN
2861 FOR j IN 1..rev_comp_count
2862 LOOP
2863 IF g_encoin_rev_comp_tbl(j).eng_revised_items_ifce_key =
2864 g_encoin_rev_item_tbl(i).eng_revised_items_ifce_key
2865 THEN
2866 g_encoin_rev_comp_tbl(j).revised_item_tbl_index := i;
2867 --dbms_output.put_line('rev tbl index : ' ||
2868 --to_char(g_encoin_rev_comp_tbl(j).revised_item_tbl_index));
2869 END IF;
2870 END LOOP;
2871 END IF;
2872 END LOOP;
2873
2874 -- Resolve parent revised component ifce keys for all ref desgs and sub comps
2875
2876 FOR i IN 1..rev_comp_count
2877 LOOP
2878 IF g_encoin_rev_comp_tbl(i).bom_inventory_comps_ifce_key IS NOT NULL
2879 THEN
2880 FOR j IN 1..g_encoin_ref_des_tbl.COUNT
2881 LOOP
2882 IF g_encoin_ref_des_tbl(j).bom_inventory_comps_ifce_key =
2883 g_encoin_rev_comp_tbl(i).bom_inventory_comps_ifce_key
2884 THEN
2885 g_encoin_ref_des_tbl(j).revised_comp_tbl_index := i;
2886 END IF;
2887 END LOOP;
2888
2889 FOR k IN 1..g_encoin_sub_comp_tbl.COUNT
2890 LOOP
2891 IF g_encoin_sub_comp_tbl(k).bom_inventory_comps_ifce_key =
2892 g_encoin_rev_comp_tbl(i).bom_inventory_comps_ifce_key
2893 THEN
2894 g_encoin_sub_comp_tbl(k).revised_comp_tbl_index := i;
2895 END IF;
2896 END LOOP;
2897 END IF;
2898 END LOOP;
2899 END ResolveIndexKeys;
2900
2901 PROCEDURE Clear_Global_Data_Structures
2902 IS
2903 BEGIN
2904 g_ECO_ifce_key := null;
2905 g_encoin_rev_item_tbl.DELETE;
2906 g_encoin_rev_comp_tbl.DELETE;
2907 g_encoin_sub_comp_tbl.DELETE;
2908 g_encoin_ref_des_tbl.DELETE;
2909 g_public_out_eco_rec := null;
2910 g_public_out_rev_tbl.DELETE;
2911 g_public_out_lines_tbl.DELETE;
2912 g_public_out_rev_item_tbl.DELETE;
2913 g_public_out_rev_comp_tbl.DELETE;
2914 g_public_out_sub_comp_tbl.DELETE;
2915 g_public_out_ref_des_tbl.DELETE;
2916 g_public_out_rev_operation_tbl.DELETE;
2917 g_public_out_rev_op_res_tbl.DELETE;
2918 g_public_out_rev_sub_res_tbl.DELETE;
2919 g_public_eco_rec := null;
2920 g_public_rev_tbl.DELETE;
2921 g_public_lines_tbl.DELETE;
2922 g_public_rev_item_tbl.DELETE;
2923 g_public_rev_comp_tbl.DELETE;
2924 g_public_sub_comp_tbl.DELETE;
2925 g_public_ref_des_tbl.DELETE;
2926 g_public_rev_operation_tbl.DELETE;
2927 g_public_rev_op_res_tbl.DELETE;
2928 g_public_rev_sub_res_tbl.DELETE;
2929 g_ECO_exists := FALSE;
2930 g_revised_items_exist := FALSE;
2931 g_revised_comps_exist := FALSE;
2932 g_ECO_ifce_group_tbl.DELETE;
2933 g_item_ifce_group_tbl.DELETE;
2934 g_comp_ifce_group_tbl.DELETE;
2935 END Clear_Global_Data_Structures;
2936
2937 PROCEDURE Eng_Launch_Import (
2938 ERRBUF OUT NOCOPY VARCHAR2,
2939 RETCODE OUT NOCOPY NUMBER,
2940 p_org_id NUMBER,
2941 p_all_org NUMBER := 1,
2942 p_del_rec_flag NUMBER := 1
2943 ) IS
2944 stmt_num NUMBER;
2945 l_prog_appid NUMBER;
2946 l_prog_id NUMBER;
2947 l_request_id NUMBER;
2948 l_user_id NUMBER;
2949 l_login_id NUMBER;
2950
2951 l_return_status VARCHAR2(1);
2952 l_msg_count NUMBER;
2953 l_msg_data VARCHAR2(2000);
2954 l_unexp_error VARCHAR2(1000);
2955 -- l_error_tbl ENG_Eco_PUB.Error_Tbl_Type;
2956 l_log_msg VARCHAR2(2000);
2957 l_err_text VARCHAR2(2000);
2958
2959 l_top_ifce_key VARCHAR2(240);
2960
2961 i NUMBER := 0;
2962 j NUMBER := 0;
2963 k NUMBER := 0;
2964 m NUMBER := 0;
2965 n NUMBER := 0;
2966 p NUMBER := 0;
2967 q NUMBER := 0;
2968 r NUMBER := 0;
2969 s NUMBER := 0;
2970 t NUMBER := 0;
2971 u NUMBER := 0;
2972 v NUMBER := 0;
2973 w NUMBER := 0;
2974 x NUMBER := 0;
2975 y NUMBER := 0;
2976 z NUMBER := 0;
2977
2978 import_error EXCEPTION;
2979
2980
2981 BEGIN
2982
2983 -- INITIALIZE GLOBALS
2984 --dbms_output.put_line('Start Launch');
2985 stmt_num := 1;
2986 l_prog_appid := FND_GLOBAL.PROG_APPL_ID;
2987 l_prog_id := FND_GLOBAL.CONC_PROGRAM_ID;
2988 l_request_id := FND_GLOBAL.CONC_REQUEST_ID;
2989 l_user_id := FND_GLOBAL.USER_ID;
2990 l_login_id := FND_GLOBAL.LOGIN_ID;
2991
2992 g_all_org := p_all_org;
2993 g_org_id := p_org_id;
2994
2995 --dbms_output.put_line('Who record initiation');
2996 stmt_num := 2;
2997 ENG_GLOBALS.Init_Who_Rec(p_org_id => p_org_id,
2998 p_user_id => l_user_id,
2999 p_login_id => l_login_id,
3000 p_prog_appid => l_prog_appid,
3001 p_prog_id => l_prog_id,
3002 p_req_id => l_request_id);
3003 --Bug 2818039
3004 ENG_GLOBALS.G_ENG_LAUNCH_IMPORT := 1;
3005
3006 Clear_Global_Data_Structures;
3007
3008 -- SET ORG IDS
3009
3010 --dbms_output.put_line('Set org ids');
3011 stmt_num := 3;
3012 UPDATE eng_eng_changes_interface eeci
3013 SET organization_id = (SELECT organization_id
3014 FROM mtl_parameters mp1
3015 WHERE mp1.organization_code = eeci.organization_code)
3016 WHERE process_flag = 1
3017 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3018 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3019 AND organization_code is not null
3020 AND exists (SELECT organization_code
3021 FROM mtl_parameters mp2
3022 WHERE mp2.organization_code = eeci.organization_code);
3023
3024 stmt_num := 4;
3025 UPDATE eng_eco_revisions_interface eeri
3026 SET organization_id = (SELECT organization_id
3027 FROM mtl_parameters mp1
3028 WHERE mp1.organization_code = eeri.organization_code)
3029 WHERE process_flag = 1
3030 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3031 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3032 AND organization_code is not null
3033 AND exists (SELECT organization_code
3034 FROM mtl_parameters mp2
3035 WHERE mp2.organization_code = eeri.organization_code);
3036
3037 stmt_num := 5;
3038 UPDATE eng_revised_items_interface erii
3039 SET organization_id = (SELECT organization_id
3040 FROM mtl_parameters mp1
3041 WHERE mp1.organization_code = erii.organization_code)
3042 WHERE process_flag = 1
3043 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3044 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3045 AND organization_code is not null
3046 AND exists (SELECT organization_code
3047 FROM mtl_parameters mp2
3048 WHERE mp2.organization_code = erii.organization_code);
3049
3050
3051 stmt_num := 6;
3052 UPDATE bom_inventory_comps_interface bici
3053 SET organization_id = (SELECT organization_id
3054 FROM mtl_parameters mp1
3055 WHERE mp1.organization_code = bici.organization_code)
3056 WHERE process_flag = 1
3057 AND upper(transaction_type) in (G_Create, G_Delete, G_Update, G_Cancel)
3058 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3059 AND interface_entity_type = 'ECO'
3060 AND organization_code is not null
3061 AND exists (SELECT organization_code
3062 FROM mtl_parameters mp2
3063 WHERE mp2.organization_code = bici.organization_code);
3064
3065 stmt_num := 7;
3066 UPDATE bom_sub_comps_interface bsci
3067 SET organization_id = (SELECT organization_id
3068 FROM mtl_parameters mp1
3069 WHERE mp1.organization_code = bsci.organization_code)
3070 WHERE process_flag = 1
3071 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3072 AND interface_entity_type = 'ECO'
3073 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3074 AND organization_code is not null
3075 AND exists (SELECT organization_code
3076 FROM mtl_parameters mp2
3077 WHERE mp2.organization_code = bsci.organization_code);
3078
3079 stmt_num := 8;
3080 UPDATE bom_ref_desgs_interface brdi
3081 SET organization_id = (SELECT organization_id
3082 FROM mtl_parameters mp1
3083 WHERE mp1.organization_code = brdi.organization_code)
3084 WHERE process_flag = 1
3085 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3086 AND interface_entity_type = 'ECO'
3087 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3088 AND organization_code is not null
3089 AND exists (SELECT organization_code
3090 FROM mtl_parameters mp2
3091 WHERE mp2.organization_code = brdi.organization_code);
3092
3093 stmt_num := 8.1;
3094 UPDATE bom_op_sequences_interface bosi
3095 SET organization_id = (SELECT organization_id
3096 FROM mtl_parameters mp1
3097 WHERE mp1.organization_code = bosi.organization_code)
3098 WHERE process_flag = 1
3099 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3100 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3101 AND organization_code is not null
3102 AND exists (SELECT organization_code
3103 FROM mtl_parameters mp2
3104 WHERE mp2.organization_code = bosi.organization_code);
3105
3106 stmt_num := 8.2;
3107 UPDATE bom_op_resources_interface bori
3108 SET organization_id = (SELECT organization_id
3109 FROM mtl_parameters mp1
3110 WHERE mp1.organization_code = bori.organization_code)
3111 WHERE process_flag = 1
3112 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3113 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3114 AND organization_code is not null
3115 AND exists (SELECT organization_code
3116 FROM mtl_parameters mp2
3117 WHERE mp2.organization_code = bori.organization_code);
3118
3119 stmt_num := 8.3;
3120 UPDATE bom_sub_op_resources_interface bsori
3121 SET organization_id = (SELECT organization_id
3122 FROM mtl_parameters mp1
3123 WHERE mp1.organization_code = bsori.organization_code)
3124 WHERE process_flag = 1
3125 AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
3126 AND (organization_id is null OR organization_id = FND_API.G_MISS_NUM)
3127 AND organization_code is not null
3128 AND exists (SELECT organization_code
3129 FROM mtl_parameters mp2
3130 WHERE mp2.organization_code = bsori.organization_code);
3131 stmt_num := 9;
3132 COMMIT;
3133
3134
3135 -- SET TRANSACTION IDS
3136
3137 --dbms_output.put_line('Set transaction ids');
3138 stmt_num := 10.1;
3139 UPDATE eng_eng_changes_interface
3140 SET transaction_id = mtl_system_items_interface_s.nextval,
3141 transaction_type = UPPER(transaction_type)
3142 WHERE process_flag = 1
3143 AND (transaction_id is NULL
3144 OR transaction_id = FND_API.G_MISS_NUM)
3145 AND (p_all_org = 1
3146 OR
3147 (p_all_org = 2 AND organization_id = p_org_id));
3148
3149 stmt_num := 10.2;
3150 UPDATE eng_eco_revisions_interface
3151 SET transaction_id = mtl_system_items_interface_s.nextval,
3152 transaction_type = UPPER(transaction_type)
3153 WHERE process_flag = 1
3154 AND (transaction_id is NULL
3155 OR transaction_id = FND_API.G_MISS_NUM)
3156 AND (p_all_org = 1
3157 OR
3158 (p_all_org = 2 AND organization_id = p_org_id));
3159
3160 stmt_num := 10.3;
3161 UPDATE eng_revised_items_interface
3162 SET transaction_id = mtl_system_items_interface_s.nextval,
3163 transaction_type = UPPER(transaction_type)
3164 WHERE process_flag = 1
3165 AND (transaction_id is NULL
3166 OR transaction_id = FND_API.G_MISS_NUM)
3167 AND (p_all_org = 1
3168 OR
3169 (p_all_org = 2 AND organization_id = p_org_id));
3170
3171 stmt_num := 10.4;
3172 UPDATE bom_inventory_comps_interface
3173 SET transaction_id = mtl_system_items_interface_s.nextval,
3174 transaction_type = UPPER(transaction_type)
3175 WHERE process_flag = 1
3176 AND (transaction_id is NULL
3177 OR transaction_id = FND_API.G_MISS_NUM)
3178 AND interface_entity_type = 'ECO'
3179 AND (p_all_org = 1
3180 OR
3181 (p_all_org = 2 AND organization_id = p_org_id));
3182
3183 stmt_num := 10.5;
3184 UPDATE bom_sub_comps_interface
3185 SET transaction_id = mtl_system_items_interface_s.nextval,
3186 transaction_type = UPPER(transaction_type)
3187 WHERE process_flag = 1
3188 AND (transaction_id is NULL
3189 OR transaction_id = FND_API.G_MISS_NUM)
3190 AND interface_entity_type = 'ECO'
3191 AND (p_all_org = 1
3192 OR
3193 (p_all_org = 2 AND organization_id = p_org_id));
3194
3195 stmt_num := 10.6;
3196 UPDATE bom_ref_desgs_interface
3197 SET transaction_id = mtl_system_items_interface_s.nextval,
3198 transaction_type = UPPER(transaction_type)
3199 WHERE process_flag = 1
3200 AND (transaction_id is NULL
3201 OR transaction_id = FND_API.G_MISS_NUM)
3202 AND interface_entity_type = 'ECO'
3203 AND (p_all_org = 1
3204 OR
3205 (p_all_org = 2 AND organization_id = p_org_id));
3206
3207 stmt_num := 10.7;
3208 UPDATE bom_op_sequences_interface
3209 SET transaction_id = mtl_system_items_interface_s.nextval,
3210 transaction_type = UPPER(transaction_type)
3211 WHERE process_flag = 1
3212 AND (transaction_id is NULL
3213 OR transaction_id = FND_API.G_MISS_NUM)
3214 AND (p_all_org = 1
3215 OR
3216 (p_all_org = 2 AND organization_id = p_org_id));
3217
3218 stmt_num := 10.8;
3219 UPDATE bom_op_resources_interface
3220 SET transaction_id = mtl_system_items_interface_s.nextval,
3221 transaction_type = UPPER(transaction_type)
3222 WHERE process_flag = 1
3223 AND (transaction_id is NULL
3224 OR transaction_id = FND_API.G_MISS_NUM)
3225 AND (p_all_org = 1
3226 OR
3227 (p_all_org = 2 AND organization_id = p_org_id));
3228
3229 stmt_num := 10.9;
3230 UPDATE bom_sub_op_resources_interface
3231 SET transaction_id = mtl_system_items_interface_s.nextval,
3232 transaction_type = UPPER(transaction_type)
3233 WHERE process_flag = 1
3234 AND (transaction_id is NULL
3235 OR transaction_id = FND_API.G_MISS_NUM)
3236 AND (p_all_org = 1
3237 OR
3238 (p_all_org = 2 AND organization_id = p_org_id));
3239
3240 stmt_num := 10.11;
3241 COMMIT;
3242
3243 -- **************************** ECO BUSINESS OBJECT ******************
3244
3245 --dbms_output.put_line('After updates');
3246
3247 stmt_num := 11;
3248 l_return_status := null;
3249 l_msg_count := null;
3250 l_msg_data := null;
3251 -- l_error_tbl.DELETE;
3252
3253 stmt_num := 11.5;
3254 Clear_Global_Data_Structures;
3255
3256 stmt_num := 12;
3257
3258 -- Pick up ECO Header record
3259
3260 FOR c1rec IN GetEco LOOP
3261 g_public_eco_rec.ORGANIZATION_HIERARCHY := c1rec.ORGANIZATION_HIERARCHY;
3262 -- Added Above line as fix to 4967902
3263 g_public_eco_rec.employee_number := c1rec.employee_number; --4402842
3264 g_public_eco_rec.attribute7 := c1rec.attribute7;
3265 g_public_eco_rec.attribute8 := c1rec.attribute8;
3266 g_public_eco_rec.attribute9 := c1rec.attribute9;
3267 g_public_eco_rec.attribute10 := c1rec.attribute10;
3268 g_public_eco_rec.attribute11 := c1rec.attribute11;
3269 g_public_eco_rec.attribute12 := c1rec.attribute12;
3270 g_public_eco_rec.attribute13 := c1rec.attribute13;
3271 g_public_eco_rec.attribute14 := c1rec.attribute14;
3272 g_public_eco_rec.attribute15 := c1rec.attribute15;
3273 -- g_public_eco_rec.request_id := c1rec.request_id;
3274 -- g_public_eco_rec.program_application_id := c1rec.program_application_id;
3275 -- g_public_eco_rec.program_id := c1rec.program_id;
3276 -- g_public_eco_rec.program_update_date := c1rec.program_update_date;
3277 -- g_public_eco_rec.approval_status_type := c1rec.approval_status_type;
3278 g_public_eco_rec.approval_date := c1rec.approval_date;
3279 -- g_public_eco_rec.approval_list_id := c1rec.approval_list_id;
3280 -- g_public_eco_rec.change_order_type_id := c1rec.change_order_type_id;
3281 -- g_public_eco_rec.responsible_org_id := c1rec.responsible_organization_id;
3282 g_public_eco_rec.approval_request_date := c1rec.approval_request_date;
3283 g_public_eco_rec.eco_name := c1rec.change_notice;
3284 -- g_public_eco_rec.organization_id := c1rec.organization_id;
3285 -- g_public_eco_rec.last_update_date := c1rec.last_update_date;
3286 -- g_public_eco_rec.last_updated_by := c1rec.last_updated_by;
3287 -- g_public_eco_rec.creation_date := c1rec.creation_date;
3288 -- g_public_eco_rec.created_by := c1rec.created_by;
3289 -- g_public_eco_rec.last_update_login := c1rec.last_update_login;
3290 g_public_eco_rec.description := c1rec.description;
3291 -- g_public_eco_rec.status_type := c1rec.status_type;
3292 -- g_public_eco_rec.initiation_date := c1rec.initiation_date;
3293 -- g_public_eco_rec.implementation_date := c1rec.implementation_date;
3294 -- g_public_eco_rec.cancellation_date := c1rec.cancellation_date;
3295 g_public_eco_rec.cancellation_comments := c1rec.cancellation_comments;
3296 g_public_eco_rec.priority_code := c1rec.priority_code;
3297 g_public_eco_rec.reason_code := c1rec.reason_code;
3298 -- g_public_eco_rec.estimated_eng_cost := c1rec.estimated_eng_cost;
3299 -- g_public_eco_rec.estimated_mfg_cost := c1rec.estimated_mfg_cost;
3300 -- g_public_eco_rec.requestor_id := c1rec.requestor_id;
3301 g_public_eco_rec.attribute_category := c1rec.attribute_category;
3302 g_public_eco_rec.attribute1 := c1rec.attribute1;
3303 g_public_eco_rec.attribute2 := c1rec.attribute2;
3304 g_public_eco_rec.attribute3 := c1rec.attribute3;
3305 g_public_eco_rec.attribute4 := c1rec.attribute4;
3306 g_public_eco_rec.attribute5 := c1rec.attribute5;
3307 g_public_eco_rec.attribute6 := c1rec.attribute6;
3308 -- g_public_eco_rec.process_flag := c1rec.process_flag;
3309 g_public_eco_rec.requestor := c1rec.requestor_user_name;
3310 g_public_eco_rec.assignee := c1rec.assignee_name;
3311 g_public_eco_rec.transaction_id := c1rec.transaction_id;
3312 g_public_eco_rec.APPROVAL_LIST_NAME := c1rec.APPROVAL_LIST_NAME;
3313 g_public_eco_rec.CHANGE_TYPE_CODE := c1rec.CHANGE_ORDER_TYPE;
3314 g_public_eco_rec.CHANGE_MANAGEMENT_TYPE := c1rec.CHANGE_MGMT_TYPE_NAME;
3315 g_public_eco_rec.ORGANIZATION_CODE := c1rec.ORGANIZATION_CODE;
3316 g_public_eco_rec.project_name := c1rec.project_name;
3317 g_public_eco_rec.task_number := c1rec.task_number;
3318 -- g_public_eco_rec.RESPONSIBLE_ORG_CODE := c1rec.RESPONSIBLE_ORG_CODE;
3319 g_public_eco_rec.transaction_type := c1rec.transaction_type;
3320 g_ECO_ifce_key := c1rec.eng_changes_ifce_key;
3321 --Bug 2908248
3322 g_public_eco_rec.status_name := c1rec.status_name;
3323 g_public_eco_rec.Approval_status_name := c1rec.Approval_status_name; --Bug 3587304
3324 -- Bug 2919076 // kamohan
3325 -- Start Changes
3326
3327 g_public_eco_rec.change_name := c1rec.change_name;
3328
3329 -- Bug 2919076 // kamohan
3330 -- End Changes
3331
3332 --11.5.10 Changes
3333
3334 g_public_eco_rec.pk1_name :=c1rec.pk1_name ;
3335 g_public_eco_rec.pk2_name :=c1rec.pk2_name ;
3336 g_public_eco_rec.pk3_name :=c1rec.pk3_name ;
3337 g_public_eco_rec.plm_or_erp_change :=c1rec.plm_or_erp_change;
3338 if c1rec.plm_or_erp_change is null or c1rec.plm_or_erp_change = FND_API.G_MISS_CHAR then
3339 g_public_eco_rec.plm_or_erp_change :='ERP';
3340 end if;
3341 --11.5.10 Changes
3342 --For PLM change_name is mandatory
3343 if c1rec.change_name IS NULL or c1rec.change_name = FND_API.G_MISS_CHAR
3344 then
3345 g_public_eco_rec.change_name := c1rec.change_notice;
3346 end if;
3347
3348 g_public_eco_rec.Source_Type := c1rec.source_type_name;
3349 g_public_eco_rec.Source_Name := c1rec.source_name;
3350 g_public_eco_rec.Need_By_Date := c1rec.need_by_date;
3351 g_public_eco_rec.Eco_Department_Name := c1rec.eco_department_name;
3352
3353 -------------
3354 --
3355 -- ECO Header exists, but it doesn't have an IFCE key entry
3356 --
3357
3358 stmt_num := 13;
3359
3360 IF g_ECO_ifce_key IS NULL
3361 THEN
3362 g_ECO_exists := TRUE;
3363 --dbms_output.put_line('No ifce key - Call Public API for ECO record');
3364 Eng_Eco_Pub.Process_Eco (
3365 p_api_version_number => 1.0,
3366 p_init_msg_list => true,
3367 --p_commit => FND_API.G_FALSE,
3368 x_return_status => l_return_status,
3369 x_msg_count => l_msg_count,
3370 --x_msg_data => l_msg_data,
3371 p_ECO_rec => g_public_eco_rec,
3372 p_eco_revision_tbl => g_public_rev_tbl,
3373 p_revised_item_tbl => g_public_rev_item_tbl,
3374 p_rev_component_tbl => g_public_rev_comp_tbl,
3375 p_ref_designator_tbl => g_public_ref_des_tbl,
3376 p_sub_component_tbl => g_public_sub_comp_tbl,
3377 x_ECO_rec => g_public_out_eco_rec,
3378 x_eco_revision_tbl => g_public_out_rev_tbl,
3379 x_revised_item_tbl => g_public_out_rev_item_tbl,
3380 x_rev_component_tbl => g_public_out_rev_comp_tbl,
3381 x_ref_designator_tbl => g_public_out_ref_des_tbl,
3382 x_sub_component_tbl => g_public_out_sub_comp_tbl
3383 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
3384 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
3385 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
3386 ,p_debug => 'N'
3387 ,p_debug_filename => 'bl_ut.log'
3388 ,p_output_dir => '/sqlcom/log/plm115d'
3389 --x_err_text => l_err_text,
3390 --x_err_tbl => l_error_tbl
3391 );
3392
3393 stmt_num := 14;
3394
3395 Eng_Globals.Clear_Request_Table;
3396
3397 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3398 stmt_num := 15;
3399 COMMIT;
3400 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3401 stmt_num := 16;
3402 ROLLBACK;
3403 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3404 stmt_num := 17;
3405 ROLLBACK;
3406 stmt_num := 18;
3407 RAISE import_error;
3408 END IF;
3409
3410 stmt_num := 19;
3411 Update_Interface_Tables(l_return_status);
3412 stmt_num := 20;
3413 COMMIT;
3414
3415 -------------
3416 --
3417 -- ECO Header exists and g_ECO_ifce_key is not null
3418 --
3419
3420 ELSIF g_ECO_ifce_key IS NOT NULL
3421 THEN
3422 stmt_num := 24;
3423 g_ECO_exists := TRUE;
3424 l_top_ifce_key := g_ECO_ifce_key;
3425 g_revised_items_exist := FALSE;
3426 g_revised_item_ifce_key := null;
3427 g_revised_comps_exist := FALSE;
3428
3429 -- Pick up all ECO revisions with ECO ifce key = g_ECO_ifce_key
3430
3431 stmt_num := 25;
3432 Get_Revs_With_Curr_ECO_ifce;
3433
3434 -- Pick up all revised items with ECO ifce key = g_ECO_ifce_key
3435
3436 stmt_num := 26;
3437 Get_Items_With_Curr_ECO_ifce;
3438 stmt_num := 26.5;
3439 IF g_encoin_rev_item_tbl.count <> 0
3440 THEN
3441 stmt_num := 27;
3442 g_revised_items_exist := TRUE;
3443 END IF;
3444
3445 -- Pick up all revised components with ECO ifce key = g_ECO_ifce_key
3446
3447 stmt_num := 28;
3448 Get_Comps_With_Curr_ECO_Ifce;
3449 stmt_num := 28.5;
3450 IF g_encoin_rev_comp_tbl.count <> 0
3451 THEN
3452 stmt_num := 29;
3453 g_revised_comp_ifce_key := null;
3454 g_revised_comps_exist := TRUE;
3455 END IF;
3456
3457 -- Pick up all reference designators with ECO ifce key = g_ECO_ifce_key
3458
3459 stmt_num := 30;
3460 Get_Rfds_With_Curr_ECO_Ifce;
3461
3462 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
3463
3464 stmt_num := 31;
3465 Get_Sbcs_With_Curr_ECO_Ifce;
3466
3467 -- load change lines from interface table
3468 Get_Lines_With_Curr_ECO_Ifce;
3469
3470 -- load revised operations from interface table
3471 Get_Rev_Op_With_Curr_ECO_Ifce;
3472 -- load revised operation resources from interface table
3473 Get_Op_Res_With_Curr_ECO_Ifce;
3474 -- load revised operation substitute resources from interface table
3475 Get_Sub_Op_Res_With_ECO_Ifce;
3476
3477 -- Translate parent ifce keys into parent array indexes
3478
3479 stmt_num := 32;
3480 ResolveIndexKeys;
3481
3482 -- Move all encoin data structures to public API parameter data structures
3483
3484 stmt_num := 34;
3485 Move_Encoin_Struct_To_Public;
3486
3487 -- Call Public API
3488
3489 stmt_num := 35;
3490 --dbms_output.put_line('ifce key exists - Call Public API for ECO entity');
3491
3492 Eng_Eco_Pub.Process_Eco (
3493 p_api_version_number => 1.0,
3494 p_init_msg_list => true,
3495 x_return_status => l_return_status,
3496 x_msg_count => l_msg_count,
3497 p_ECO_rec => g_public_eco_rec,
3498 p_eco_revision_tbl => g_public_rev_tbl,
3499 p_change_line_tbl => g_public_lines_tbl,
3500 p_revised_item_tbl => g_public_rev_item_tbl,
3501 p_rev_component_tbl => g_public_rev_comp_tbl,
3502 p_ref_designator_tbl => g_public_ref_des_tbl,
3503 p_sub_component_tbl => g_public_sub_comp_tbl,
3504 p_rev_operation_tbl => g_public_rev_operation_tbl,
3505 p_rev_op_resource_tbl => g_public_rev_op_res_tbl,
3506 p_rev_sub_resource_tbl => g_public_rev_sub_res_tbl,
3507 x_ECO_rec => g_public_out_eco_rec,
3508 x_eco_revision_tbl => g_public_out_rev_tbl,
3509 x_change_line_tbl => g_public_out_lines_tbl,
3510 x_revised_item_tbl => g_public_out_rev_item_tbl,
3511 x_rev_component_tbl => g_public_out_rev_comp_tbl,
3512 x_ref_designator_tbl => g_public_out_ref_des_tbl,
3513 x_sub_component_tbl => g_public_out_sub_comp_tbl,
3514 x_rev_operation_tbl => g_public_out_rev_operation_tbl,
3515 x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl,
3516 x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl,
3517 p_debug => 'N',
3518 p_debug_filename => 'bl_ut.log',
3519 p_output_dir => '/sqlcom/log/plm115d'
3520 );
3521
3522 stmt_num := 36;
3523 Eng_Globals.Clear_Request_Table;
3524 stmt_num := 37;
3525
3526 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3527 stmt_num := 38;
3528 COMMIT;
3529 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3530 stmt_num := 46;
3531 ROLLBACK;
3532 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3533 stmt_num := 55;
3534 ROLLBACK;
3535 stmt_num := 56;
3536 RAISE import_error;
3537 END IF;
3538
3539 stmt_num := 57;
3540 Update_Interface_Tables(l_return_status);
3541 stmt_num := 58;
3542 COMMIT;
3543
3544 END IF;
3545
3546 stmt_num := 65;
3547 Clear_Global_Data_Structures;
3548 l_return_status := null;
3549 l_msg_count := null;
3550 l_msg_data := null;
3551
3552 END LOOP; -- End ECO Header Object loop
3553
3554 -------------
3555 --
3556 -- ECO Header does not exist, i.e., no more ECO Headers exist in interface table
3557 --
3558
3559 IF NOT g_ECO_exists
3560 THEN
3561
3562 -- Group revised item ECO ifce keys
3563
3564 stmt_num := 66;
3565 k := 0;
3566 FOR c1rec IN GetItemWithSameECOifce LOOP
3567 k := k + 1;
3568 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
3569 END LOOP;
3570
3571 stmt_num := 67;
3572 g_ECO_ifce_key := null;
3573
3574 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
3575 LOOP
3576 stmt_num := 68;
3577 g_public_eco_rec := null;
3578 g_public_rev_tbl.DELETE;
3579 g_public_rev_item_tbl.DELETE;
3580 g_public_rev_comp_tbl.DELETE;
3581 g_public_sub_comp_tbl.DELETE;
3582 g_public_ref_des_tbl.DELETE;
3583 g_public_rev_op_res_tbl.DELETE;
3584 g_public_rev_operation_tbl.DELETE;
3585 g_public_lines_tbl.DELETE;
3586 g_encoin_rev_item_tbl.delete;
3587 g_encoin_rev_comp_tbl.delete;
3588 g_encoin_ref_des_tbl.delete;
3589 g_encoin_sub_comp_tbl.delete;
3590
3591 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
3592 g_revised_items_exist := FALSE;
3593 g_revised_item_ifce_key := null;
3594 g_revised_comps_exist := FALSE;
3595 g_revised_comp_ifce_key := null;
3596
3597 -- Pick up all items with ECO ifce key = g_ECO_ifce_key
3598
3599 stmt_num := 69;
3600 Get_Items_With_Curr_ECO_ifce;
3601 stmt_num := 69.1;
3602 IF g_encoin_rev_item_tbl.count <> 0
3603 THEN
3604 stmt_num := 69.5;
3605 g_revised_items_exist := TRUE;
3606 END IF;
3607
3608 -- Pick up all ECO revisions with ECO ifce key = g_ECO_ifce_key
3609
3610 stmt_num := 70;
3611 Get_Revs_With_Curr_ECO_ifce;
3612
3613 -- Pick up all revised components with ECO ifce key = g_ECO_ifce_key
3614
3615 stmt_num := 71;
3616 Get_Comps_With_Curr_ECO_ifce;
3617 stmt_num := 71.5;
3618 IF g_encoin_rev_comp_tbl.count <> 0
3619 THEN
3620 stmt_num := 17;
3621 g_revised_comps_exist := TRUE;
3622 END IF;
3623
3624 -- Pick up all reference designators with ECO ifce key = g_ECO_ifce_key
3625
3626 stmt_num := 72;
3627 Get_Rfds_With_Curr_ECO_Ifce;
3628
3629 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
3630
3631 stmt_num := 73;
3632 Get_Sbcs_With_Curr_ECO_Ifce;
3633
3634 -- Translate parent ifce keys into parent array indexes
3635
3636 stmt_num := 74;
3637 ResolveIndexKeys;
3638
3639 -- Exit loop if no records found
3640
3641 stmt_num := 75;
3642 IF g_public_rev_tbl.count = 0 AND g_encoin_rev_item_tbl.count =0 AND g_encoin_rev_comp_tbl.count =0 AND
3643 g_encoin_ref_des_tbl.count = 0 AND g_encoin_sub_comp_tbl.count = 0
3644 THEN
3645 EXIT;
3646 END IF;
3647
3648 -- Move all encoin data structures to public API parameter data structures
3649
3650 stmt_num := 76;
3651 Move_Encoin_Struct_To_Public;
3652
3653 l_top_ifce_key := g_ECO_ifce_key;
3654
3655 -- Call Public API
3656
3657 stmt_num := 77;
3658 --dbms_output.put_line('No ECO Headers - Call Public API with items starting hierarchy');
3659 Eng_Eco_Pub.Process_Eco (
3660 p_api_version_number => 1.0,
3661 p_init_msg_list => true,
3662 --p_commit => FND_API.G_FALSE,
3663 x_return_status => l_return_status,
3664 x_msg_count => l_msg_count,
3665 --x_msg_data => l_msg_data,
3666 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
3667 p_eco_revision_tbl => g_public_rev_tbl,
3668 p_revised_item_tbl => g_public_rev_item_tbl,
3669 p_rev_component_tbl => g_public_rev_comp_tbl,
3670 p_ref_designator_tbl => g_public_ref_des_tbl,
3671 p_sub_component_tbl => g_public_sub_comp_tbl,
3672 x_ECO_rec => g_public_out_eco_rec,
3673 x_eco_revision_tbl => g_public_out_rev_tbl,
3674 x_revised_item_tbl => g_public_out_rev_item_tbl,
3675 x_rev_component_tbl => g_public_out_rev_comp_tbl,
3676 x_ref_designator_tbl => g_public_out_ref_des_tbl,
3677 x_sub_component_tbl => g_public_out_sub_comp_tbl
3678 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
3679 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
3680 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
3681 ,p_debug => 'N'
3682 ,p_debug_filename => 'bl_ut.log'
3683 ,p_output_dir => '/sqlcom/log/plm115d'
3684 );
3685
3686 stmt_num := 78;
3687 Eng_Globals.Clear_Request_Table;
3688 stmt_num := 79;
3689
3690 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3691 stmt_num := 80;
3692 COMMIT;
3693 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3694 stmt_num := 81;
3695 ROLLBACK;
3696 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3697 stmt_num := 82;
3698 ROLLBACK;
3699 stmt_num := 83;
3700 RAISE import_error;
3701 END IF;
3702
3703 stmt_num := 84;
3704 Update_Interface_Tables(l_return_status);
3705 stmt_num := 85;
3706 COMMIT;
3707
3708 END LOOP;
3709
3710 -- Group revisions ECO ifce keys
3711
3712 stmt_num := 105;
3713 k := 0;
3714 FOR c1rec IN GetRevWithSameECOifce LOOP
3715 k := k + 1;
3716 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
3717 END LOOP;
3718
3719 g_ECO_ifce_key := null;
3720
3721 stmt_num := 106;
3722 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
3723 LOOP
3724 stmt_num := 107;
3725 g_encoin_rev_item_tbl.delete;
3726 g_encoin_rev_comp_tbl.delete;
3727 g_encoin_ref_des_tbl.delete;
3728 g_encoin_sub_comp_tbl.delete;
3729 g_public_eco_rec := null;
3730 g_public_rev_tbl.DELETE;
3731 g_public_rev_item_tbl.DELETE;
3732 g_public_rev_comp_tbl.DELETE;
3733 g_public_sub_comp_tbl.DELETE;
3734 g_public_ref_des_tbl.DELETE;
3735 g_public_rev_op_res_tbl.DELETE;
3736 g_public_rev_operation_tbl.DELETE;
3737 g_public_lines_tbl.DELETE;
3738
3739 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
3740 g_revised_items_exist := FALSE;
3741 g_revised_item_ifce_key := null;
3742 g_revised_comps_exist := FALSE;
3743 g_revised_comp_ifce_key := null;
3744
3745 -- Pick up all ECO revisions with ECO ifce key = g_ECO_ifce_key
3746
3747 stmt_num := 108;
3748 Get_Revs_With_Curr_ECO_ifce;
3749
3750 -- Pick up all revised components with ECO ifce key = g_ECO_ifce_key
3751
3752 stmt_num := 109;
3753 Get_Comps_With_Curr_ECO_ifce;
3754 stmt_num := 109.1;
3755 IF g_encoin_rev_comp_tbl.count <> 0
3756 THEN
3757 stmt_num := 109.5;
3758 g_revised_comps_exist := TRUE;
3759 END IF;
3760
3761 -- Pick up all reference designators with ECO ifce key = g_ECO_ifce_key
3762
3763 stmt_num := 110;
3764 Get_Rfds_With_Curr_ECO_Ifce;
3765
3766 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
3767
3768 stmt_num := 111;
3769 Get_Sbcs_With_Curr_ECO_Ifce;
3770
3771 -- Translate parent ifce keys into parent array indexes
3772
3773 stmt_num := 112;
3774 ResolveIndexKeys;
3775
3776 -- Exit loop if no records found
3777
3778 stmt_num := 113;
3779 IF g_public_rev_tbl.count = 0 AND g_encoin_rev_comp_tbl.count =0 AND
3780 g_encoin_ref_des_tbl.count = 0 AND g_encoin_sub_comp_tbl.count = 0
3781 THEN
3782 EXIT;
3783 END IF;
3784
3785 -- Move all encoin data structures to public API parameter data structures
3786
3787 stmt_num := 114;
3788 Move_Encoin_Struct_To_Public;
3789
3790 l_top_ifce_key := g_ECO_ifce_key;
3791
3792 -- Call Public API
3793
3794 stmt_num := 115;
3795 --dbms_output.put_line('No ECO Headers - Call Public API with revs starting hierarchy');
3796 Eng_Eco_Pub.Process_Eco (
3797 p_api_version_number => 1.0,
3798 p_init_msg_list => true,
3799 --p_commit => FND_API.G_FALSE,
3800 x_return_status => l_return_status,
3801 x_msg_count => l_msg_count,
3802 --x_msg_data => l_msg_data,
3803 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
3804 p_eco_revision_tbl => g_public_rev_tbl,
3805 p_revised_item_tbl => g_public_rev_item_tbl,
3806 p_rev_component_tbl => g_public_rev_comp_tbl,
3807 p_ref_designator_tbl => g_public_ref_des_tbl,
3808 p_sub_component_tbl => g_public_sub_comp_tbl,
3809 x_ECO_rec => g_public_out_eco_rec,
3810 x_eco_revision_tbl => g_public_out_rev_tbl,
3811 x_revised_item_tbl => g_public_out_rev_item_tbl,
3812 x_rev_component_tbl => g_public_out_rev_comp_tbl,
3813 x_ref_designator_tbl => g_public_out_ref_des_tbl,
3814 x_sub_component_tbl => g_public_out_sub_comp_tbl
3815 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
3816 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
3817 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
3818 ,p_debug => 'N'
3819 ,p_debug_filename => 'bl_ut.log'
3820 ,p_output_dir => '/sqlcom/log/plm115d'
3821 --x_err_text => l_err_text --,
3822 --x_err_tbl => l_error_tbl
3823 );
3824
3825 stmt_num := 116;
3826 Eng_Globals.Clear_Request_Table;
3827 stmt_num := 117;
3828
3829 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3830 stmt_num := 118;
3831 COMMIT;
3832 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3833 stmt_num := 119;
3834 ROLLBACK;
3835 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3836 stmt_num := 120;
3837 ROLLBACK;
3838 stmt_num := 121;
3839 RAISE import_error;
3840 END IF;
3841
3842 stmt_num := 122;
3843 Update_Interface_Tables(l_return_status);
3844 stmt_num := 123;
3845 COMMIT;
3846 END LOOP;
3847
3848 -- Group component ECO ifce keys
3849
3850 stmt_num := 140;
3851 k := 0;
3852 FOR c1rec IN GetCompWithSameECOifce LOOP
3853 k := k + 1;
3854 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
3855 --dbms_output.put_line('found same');
3856 END LOOP;
3857
3858 g_ECO_ifce_key := null;
3859
3860 stmt_num := 141;
3861 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
3862 LOOP
3863 stmt_num := 142;
3864 g_encoin_rev_item_tbl.delete;
3865 g_encoin_rev_comp_tbl.delete;
3866 g_encoin_ref_des_tbl.delete;
3867 g_encoin_sub_comp_tbl.delete;
3868 g_public_eco_rec := null;
3869 g_public_rev_tbl.DELETE;
3870 g_public_rev_item_tbl.DELETE;
3871 g_public_rev_comp_tbl.DELETE;
3872 g_public_sub_comp_tbl.DELETE;
3873 g_public_ref_des_tbl.DELETE;
3874 g_public_rev_op_res_tbl.DELETE;
3875 g_public_rev_operation_tbl.DELETE;
3876 g_public_lines_tbl.DELETE;
3877
3878 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
3879 g_revised_items_exist := FALSE;
3880 g_revised_item_ifce_key := null;
3881 g_revised_comps_exist := FALSE;
3882 g_revised_comp_ifce_key := null;
3883
3884 -- Pick up all revised components with ECO ifce key = g_ECO_ifce_key
3885
3886 stmt_num := 143;
3887 Get_Comps_With_Curr_ECO_ifce;
3888 stmt_num := 144;
3889 IF g_encoin_rev_comp_tbl.count <> 0
3890 THEN
3891 stmt_num := 145;
3892 g_revised_comps_exist := TRUE;
3893 END IF;
3894
3895 -- Pick up all reference designators with ECO ifce key = g_ECO_ifce_key
3896
3897 stmt_num := 146;
3898 Get_Rfds_With_Curr_ECO_Ifce;
3899
3900 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
3901
3902 stmt_num := 147;
3903 Get_Sbcs_With_Curr_ECO_Ifce;
3904
3905 -- Translate parent ifce keys into parent array indexes
3906
3907 stmt_num := 148;
3908 ResolveIndexKeys;
3909
3910 -- Exit loop if no records found
3911
3912 stmt_num := 149;
3913 IF g_encoin_rev_comp_tbl.count =0 AND g_encoin_ref_des_tbl.count = 0 AND
3914 g_encoin_sub_comp_tbl.count = 0
3915 THEN
3916 EXIT;
3917 END IF;
3918
3919 -- Move all encoin data structures to public API parameter data structures
3920
3921 stmt_num := 150;
3922 Move_Encoin_Struct_To_Public;
3923
3924 l_top_ifce_key := g_ECO_ifce_key;
3925
3926 -- Call Public API
3927
3928 stmt_num := 151;
3929 --dbms_output.put_line('No ECO Headers - Call Public API with comps starting hierarchy');
3930 Eng_Eco_Pub.Process_Eco (
3931 p_api_version_number => 1.0,
3932 p_init_msg_list => true,
3933 --p_commit => FND_API.G_FALSE,
3934 x_return_status => l_return_status,
3935 x_msg_count => l_msg_count,
3936 --x_msg_data => l_msg_data,
3937 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
3938 p_eco_revision_tbl => g_public_rev_tbl,
3939 p_revised_item_tbl => g_public_rev_item_tbl,
3940 p_rev_component_tbl => g_public_rev_comp_tbl,
3941 p_ref_designator_tbl => g_public_ref_des_tbl,
3942 p_sub_component_tbl => g_public_sub_comp_tbl,
3943 x_ECO_rec => g_public_out_eco_rec,
3944 x_eco_revision_tbl => g_public_out_rev_tbl,
3945 x_revised_item_tbl => g_public_out_rev_item_tbl,
3946 x_rev_component_tbl => g_public_out_rev_comp_tbl,
3947 x_ref_designator_tbl => g_public_out_ref_des_tbl,
3948 x_sub_component_tbl => g_public_out_sub_comp_tbl
3949 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
3950 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
3951 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
3952 ,p_debug => 'N'
3953 ,p_debug_filename => 'bl_ut.log'
3954 ,p_output_dir => '/sqlcom/log/plm115d'
3955 --x_err_text => l_err_text --,
3956 --x_err_tbl => l_error_tbl
3957 );
3958
3959 stmt_num := 152;
3960 Eng_Globals.Clear_Request_Table;
3961 stmt_num := 153;
3962
3963 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3964 stmt_num := 154;
3965 COMMIT;
3966 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3967 stmt_num := 155;
3968 ROLLBACK;
3969 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3970 stmt_num := 156;
3971 ROLLBACK;
3972 stmt_num := 157;
3973 RAISE import_error;
3974 END IF;
3975
3976 stmt_num := 158;
3977 Update_Interface_Tables(l_return_status);
3978 stmt_num := 159;
3979 COMMIT;
3980 END LOOP;
3981
3982 -- Group ref des ECO ifce keys
3983
3984 stmt_num := 173;
3985 k := 0;
3986 FOR c1rec IN GetRfdWithSameECOifce LOOP
3987 k := k + 1;
3988 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
3989 END LOOP;
3990
3991 g_ECO_ifce_key := null;
3992
3993 stmt_num := 174;
3994 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
3995 LOOP
3996 stmt_num := 175;
3997 g_encoin_rev_item_tbl.delete;
3998 g_encoin_rev_comp_tbl.delete;
3999 g_encoin_ref_des_tbl.delete;
4000 g_encoin_sub_comp_tbl.delete;
4001 g_public_eco_rec := null;
4002 g_public_rev_tbl.DELETE;
4003 g_public_rev_item_tbl.DELETE;
4004 g_public_rev_comp_tbl.DELETE;
4005 g_public_sub_comp_tbl.DELETE;
4006 g_public_ref_des_tbl.DELETE;
4007 g_public_rev_op_res_tbl.DELETE;
4008 g_public_rev_operation_tbl.DELETE;
4009 g_public_lines_tbl.DELETE;
4010
4011 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
4012 g_revised_items_exist := FALSE;
4013 g_revised_item_ifce_key := null;
4014 g_revised_comps_exist := FALSE;
4015 g_revised_comp_ifce_key := null;
4016
4017 -- Pick up all reference designators with ECO ifce key = g_ECO_ifce_key
4018
4019 stmt_num := 176;
4020 Get_Rfds_With_Curr_ECO_Ifce;
4021
4022 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
4023
4024 stmt_num := 177;
4025 Get_Sbcs_With_Curr_ECO_Ifce;
4026
4027 -- Translate parent ifce keys into parent array indexes
4028
4029 stmt_num := 178;
4030 ResolveIndexKeys;
4031
4032 -- Exit loop if no records found
4033
4034 stmt_num := 179;
4035 IF g_encoin_ref_des_tbl.count = 0 AND g_encoin_sub_comp_tbl.count = 0
4036 THEN
4037 EXIT;
4038 END IF;
4039
4040 -- Move all encoin data structures to public API parameter data structures
4041
4042 stmt_num := 180;
4043 Move_Encoin_Struct_To_Public;
4044
4045 l_top_ifce_key := g_ECO_ifce_key;
4046
4047 -- Call Public API
4048
4049 stmt_num := 181;
4050 --dbms_output.put_line('No ECO Headers - Call Public API with desgs starting hierarchy');
4051 Eng_Eco_Pub.Process_Eco (
4052 p_api_version_number => 1.0,
4053 p_init_msg_list => true,
4054 --p_commit => FND_API.G_FALSE,
4055 x_return_status => l_return_status,
4056 x_msg_count => l_msg_count,
4057 --x_msg_data => l_msg_data,
4058 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
4059 p_eco_revision_tbl => g_public_rev_tbl,
4060 p_revised_item_tbl => g_public_rev_item_tbl,
4061 p_rev_component_tbl => g_public_rev_comp_tbl,
4062 p_ref_designator_tbl => g_public_ref_des_tbl,
4063 p_sub_component_tbl => g_public_sub_comp_tbl,
4064 x_ECO_rec => g_public_out_eco_rec,
4065 x_eco_revision_tbl => g_public_out_rev_tbl,
4066 x_revised_item_tbl => g_public_out_rev_item_tbl,
4067 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4068 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4069 x_sub_component_tbl => g_public_out_sub_comp_tbl
4070 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
4071 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
4072 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
4073 ,p_debug => 'N'
4074 ,p_debug_filename => 'bl_ut.log'
4075 ,p_output_dir => '/sqlcom/log/plm115d'
4076 --x_err_text => l_err_text --,
4077 --x_err_tbl => l_error_tbl
4078 );
4079
4080 stmt_num := 182;
4081 Eng_Globals.Clear_Request_Table;
4082 stmt_num := 183;
4083
4084 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4085 stmt_num := 184;
4086 COMMIT;
4087 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4088 stmt_num := 185;
4089 ROLLBACK;
4090 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4091 stmt_num := 186;
4092 ROLLBACK;
4093 stmt_num := 187;
4094 RAISE import_error;
4095 END IF;
4096
4097 stmt_num := 188;
4098 Update_Interface_Tables(l_return_status);
4099 stmt_num := 189;
4100 COMMIT;
4101
4102 END LOOP;
4103
4104 -- Group sub comp ECO ifce keys
4105
4106 stmt_num := 200;
4107 k := 0;
4108 FOR c1rec IN GetSbcWithSameECOifce LOOP
4109 k := k + 1;
4110 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
4111 END LOOP;
4112
4113 g_ECO_ifce_key := null;
4114
4115 stmt_num := 201;
4116 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
4117 LOOP
4118 stmt_num := 202;
4119 g_encoin_rev_item_tbl.delete;
4120 g_encoin_rev_comp_tbl.delete;
4121 g_encoin_ref_des_tbl.delete;
4122 g_encoin_sub_comp_tbl.delete;
4123 g_public_eco_rec := null;
4124 g_public_rev_tbl.DELETE;
4125 g_public_rev_item_tbl.DELETE;
4126 g_public_rev_comp_tbl.DELETE;
4127 g_public_sub_comp_tbl.DELETE;
4128 g_public_ref_des_tbl.DELETE;
4129 g_public_rev_op_res_tbl.DELETE;
4130 g_public_rev_operation_tbl.DELETE;
4131 g_public_lines_tbl.DELETE;
4132
4133 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
4134 g_revised_items_exist := FALSE;
4135 g_revised_item_ifce_key := null;
4136 g_revised_comps_exist := FALSE;
4137 g_revised_comp_ifce_key := null;
4138
4139 -- Pick up all substitute components with ECO ifce key = g_ECO_ifce_key
4140
4141 stmt_num := 203;
4142 Get_Sbcs_With_Curr_ECO_Ifce;
4143
4144 -- Translate parent ifce keys into parent array indexes
4145
4146 stmt_num := 204;
4147 ResolveIndexKeys;
4148
4149 -- Exit loop if no records found
4150
4151 stmt_num := 205;
4152 IF g_encoin_sub_comp_tbl.count = 0
4153 THEN
4154 EXIT;
4155 END IF;
4156
4157 -- Move all encoin data structures to public API parameter data structures
4158
4159 stmt_num := 206;
4160 Move_Encoin_Struct_To_Public;
4161
4162 l_top_ifce_key := g_ECO_ifce_key;
4163
4164 -- Call Public API
4165
4166 stmt_num := 207;
4167 --dbms_output.put_line('No ECO Headers - Call Public API with sbcs starting hierarchy');
4168 Eng_Eco_Pub.Process_Eco (
4169 p_api_version_number => 1.0,
4170 p_init_msg_list => true,
4171 --p_commit => FND_API.G_FALSE,
4172 x_return_status => l_return_status,
4173 x_msg_count => l_msg_count,
4174 --x_msg_data => l_msg_data,
4175 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
4176 p_eco_revision_tbl => g_public_rev_tbl,
4177 p_revised_item_tbl => g_public_rev_item_tbl,
4178 p_rev_component_tbl => g_public_rev_comp_tbl,
4179 p_ref_designator_tbl => g_public_ref_des_tbl,
4180 p_sub_component_tbl => g_public_sub_comp_tbl,
4181 x_ECO_rec => g_public_out_eco_rec,
4182 x_eco_revision_tbl => g_public_out_rev_tbl,
4183 x_revised_item_tbl => g_public_out_rev_item_tbl,
4184 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4185 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4186 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
4187 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
4188 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
4189 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
4190 ,p_debug => 'N'
4191 ,p_debug_filename => 'bl_ut.log'
4192 ,p_output_dir => '/sqlcom/log/plm115d'
4193 --x_err_text => l_err_text --,
4194 --x_err_tbl => l_error_tbl
4195 );
4196
4197 stmt_num := 208;
4198 Eng_Globals.Clear_Request_Table;
4199 stmt_num := 209;
4200
4201 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4202 stmt_num := 210;
4203 COMMIT;
4204 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4205 stmt_num := 211;
4206 ROLLBACK;
4207 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4208 stmt_num := 212;
4209 ROLLBACK;
4210 stmt_num := 213;
4211 RAISE import_error;
4212 END IF;
4213
4214 stmt_num := 214;
4215 Update_Interface_Tables(l_return_status);
4216 stmt_num := 215;
4217 COMMIT;
4218
4219 END LOOP;
4220 END IF;
4221
4222
4223 -- ** revised operations **
4224
4225 stmt_num := 173;
4226 k := 0;
4227 FOR c1rec IN GetRevOpWithSameECOifce LOOP
4228 k := k + 1;
4229 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
4230 END LOOP;
4231
4232 g_ECO_ifce_key := null;
4233
4234 stmt_num := 174;
4235 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
4236 LOOP
4237 stmt_num := 175;
4238 g_encoin_rev_item_tbl.delete;
4239 g_encoin_rev_comp_tbl.delete;
4240 g_encoin_ref_des_tbl.delete;
4241 g_encoin_sub_comp_tbl.delete;
4242 g_public_eco_rec := null;
4243 g_public_rev_tbl.DELETE;
4244 g_public_rev_item_tbl.DELETE;
4245 g_public_rev_comp_tbl.DELETE;
4246 g_public_sub_comp_tbl.DELETE;
4247 g_public_ref_des_tbl.DELETE;
4248 g_public_rev_op_res_tbl.DELETE;
4249 g_public_rev_operation_tbl.DELETE;
4250 g_public_lines_tbl.DELETE;
4251
4252 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
4253 g_revised_items_exist := FALSE;
4254 g_revised_item_ifce_key := null;
4255 g_revised_comps_exist := FALSE;
4256 g_revised_comp_ifce_key := null;
4257
4258 -- Pick up all operation resources with ECO ifce key = g_ECO_ifce_key
4259
4260 stmt_num := 176;
4261 Get_Rev_Op_With_Curr_ECO_Ifce;
4262
4263 -- Translate parent ifce keys into parent array indexes
4264
4265 stmt_num := 178;
4266 ResolveIndexKeys;
4267
4268 -- Exit loop if no records found
4269
4270 stmt_num := 179;
4271 IF g_public_rev_operation_tbl.count = 0
4272 THEN
4273 EXIT;
4274 END IF;
4275
4276 -- Move all encoin data structures to public API parameter data structures
4277
4278 l_top_ifce_key := g_ECO_ifce_key;
4279
4280 -- Call Public API
4281
4282 stmt_num := 181;
4283 --dbms_output.put_line('No ECO Headers - Call Public API with desgs starting hierarchy');
4284 Eng_Eco_Pub.Process_Eco (
4285 p_api_version_number => 1.0,
4286 p_init_msg_list => true,
4287 x_return_status => l_return_status,
4288 x_msg_count => l_msg_count,
4289 p_ECO_rec => g_public_eco_rec,
4290 p_eco_revision_tbl => g_public_rev_tbl,
4291 p_change_line_tbl => g_public_lines_tbl,
4292 p_revised_item_tbl => g_public_rev_item_tbl,
4293 p_rev_component_tbl => g_public_rev_comp_tbl,
4294 p_ref_designator_tbl => g_public_ref_des_tbl,
4295 p_sub_component_tbl => g_public_sub_comp_tbl,
4296 p_rev_operation_tbl => g_public_rev_operation_tbl,
4297 p_rev_op_resource_tbl => g_public_rev_op_res_tbl,
4298 p_rev_sub_resource_tbl => g_public_rev_sub_res_tbl,
4299 x_ECO_rec => g_public_out_eco_rec,
4300 x_eco_revision_tbl => g_public_out_rev_tbl,
4301 x_change_line_tbl => g_public_out_lines_tbl,
4302 x_revised_item_tbl => g_public_out_rev_item_tbl,
4303 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4304 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4305 x_sub_component_tbl => g_public_out_sub_comp_tbl,
4306 x_rev_operation_tbl => g_public_out_rev_operation_tbl,
4307 x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl,
4308 x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl,
4309 p_debug => 'N',
4310 p_debug_filename => 'bl_ut.log',
4311 p_output_dir => '/sqlcom/log/plm115rw'
4312 );
4313
4314 stmt_num := 182;
4315 Eng_Globals.Clear_Request_Table;
4316 stmt_num := 183;
4317
4318 stmt_num := 184;
4319 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4320 stmt_num := 185;
4321 COMMIT;
4322 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4323 stmt_num := 189;
4324 ROLLBACK;
4325 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4326 stmt_num := 194;
4327 ROLLBACK;
4328 RAISE import_error;
4329 END IF;
4330
4331 stmt_num := 195;
4332 Update_Interface_Tables(l_return_status);
4333 stmt_num := 196;
4334 COMMIT;
4335
4336 END LOOP;
4337
4338 -- ** revised resources **
4339
4340 -- Group ref des ECO ifce keys
4341
4342 stmt_num := 173;
4343 k := 0;
4344 FOR c1rec IN GetRevResWithSameECOifce LOOP
4345 k := k + 1;
4346 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
4347 END LOOP;
4348
4349 g_ECO_ifce_key := null;
4350
4351 stmt_num := 174;
4352 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
4353 LOOP
4354 stmt_num := 175;
4355 g_encoin_rev_item_tbl.delete;
4356 g_encoin_rev_comp_tbl.delete;
4357 g_encoin_ref_des_tbl.delete;
4358 g_encoin_sub_comp_tbl.delete;
4359 g_public_eco_rec := null;
4360 g_public_rev_tbl.DELETE;
4361 g_public_rev_item_tbl.DELETE;
4362 g_public_rev_comp_tbl.DELETE;
4363 g_public_sub_comp_tbl.DELETE;
4364 g_public_ref_des_tbl.DELETE;
4365 g_public_rev_op_res_tbl.DELETE;
4366 g_public_rev_operation_tbl.DELETE;
4367 g_public_lines_tbl.DELETE;
4368
4369 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
4370 g_revised_items_exist := FALSE;
4371 g_revised_item_ifce_key := null;
4372 g_revised_comps_exist := FALSE;
4373 g_revised_comp_ifce_key := null;
4374
4375 -- Pick up all operation resources with ECO ifce key = g_ECO_ifce_key
4376
4377 stmt_num := 176;
4378 Get_Op_Res_With_Curr_ECO_Ifce;
4379
4380 -- Translate parent ifce keys into parent array indexes
4381
4382 stmt_num := 178;
4383 ResolveIndexKeys;
4384
4385 -- Exit loop if no records found
4386
4387 stmt_num := 179;
4388 IF g_public_rev_op_res_tbl.count = 0
4389 THEN
4390 EXIT;
4391 END IF;
4392
4393 -- Move all encoin data structures to public API parameter data structures
4394
4395 l_top_ifce_key := g_ECO_ifce_key;
4396
4397 -- Call Public API
4398
4399 stmt_num := 181;
4400 Eng_Eco_Pub.Process_Eco (
4401 p_api_version_number => 1.0,
4402 p_init_msg_list => true,
4403 x_return_status => l_return_status,
4404 x_msg_count => l_msg_count,
4405 p_ECO_rec => g_public_eco_rec,
4406 p_eco_revision_tbl => g_public_rev_tbl,
4407 p_change_line_tbl => g_public_lines_tbl,
4408 p_revised_item_tbl => g_public_rev_item_tbl,
4409 p_rev_component_tbl => g_public_rev_comp_tbl,
4410 p_ref_designator_tbl => g_public_ref_des_tbl,
4411 p_sub_component_tbl => g_public_sub_comp_tbl,
4412 p_rev_operation_tbl => g_public_rev_operation_tbl,
4413 p_rev_op_resource_tbl => g_public_rev_op_res_tbl,
4414 p_rev_sub_resource_tbl => g_public_rev_sub_res_tbl,
4415 x_ECO_rec => g_public_out_eco_rec,
4416 x_eco_revision_tbl => g_public_out_rev_tbl,
4417 x_change_line_tbl => g_public_out_lines_tbl,
4418 x_revised_item_tbl => g_public_out_rev_item_tbl,
4419 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4420 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4421 x_sub_component_tbl => g_public_out_sub_comp_tbl,
4422 x_rev_operation_tbl => g_public_out_rev_operation_tbl,
4423 x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl,
4424 x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl,
4425 p_debug => 'N',
4426 p_debug_filename => 'bl_ut.log',
4427 p_output_dir => '/sqlcom/log/plm115rw'
4428 );
4429
4430 stmt_num := 182;
4431 Eng_Globals.Clear_Request_Table;
4432 stmt_num := 183;
4433
4434 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4435 stmt_num := 185;
4436 COMMIT;
4437 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4438 stmt_num := 189;
4439 ROLLBACK;
4440 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4441 stmt_num := 194;
4442 ROLLBACK;
4443 RAISE import_error;
4444 END IF;
4445
4446 stmt_num := 195;
4447 Update_Interface_Tables(l_return_status);
4448 stmt_num := 196;
4449 COMMIT;
4450
4451 END LOOP;
4452
4453
4454
4455 -- ** change lines **
4456
4457 -- change lines ECO ifce keys
4458
4459 stmt_num := 173;
4460 k := 0;
4461 FOR c1rec IN GetLinesWithSameECOifce LOOP
4462 k := k + 1;
4463 g_ECO_ifce_group_tbl(k) := c1rec.eco_ifce_key;
4464 END LOOP;
4465
4466 g_ECO_ifce_key := null;
4467
4468 stmt_num := 174;
4469 FOR i IN 1..g_ECO_ifce_group_tbl.COUNT
4470 LOOP
4471 stmt_num := 175;
4472 g_encoin_rev_item_tbl.delete;
4473 g_encoin_rev_comp_tbl.delete;
4474 g_encoin_ref_des_tbl.delete;
4475 g_encoin_sub_comp_tbl.delete;
4476 g_public_eco_rec := null;
4477 g_public_rev_tbl.DELETE;
4478 g_public_rev_item_tbl.DELETE;
4479 g_public_rev_comp_tbl.DELETE;
4480 g_public_sub_comp_tbl.DELETE;
4481 g_public_ref_des_tbl.DELETE;
4482 g_public_rev_op_res_tbl.DELETE;
4483 g_public_rev_operation_tbl.DELETE;
4484 g_public_lines_tbl.DELETE;
4485
4486 g_ECO_ifce_key := g_ECO_ifce_group_tbl(i);
4487 g_revised_items_exist := FALSE;
4488 g_revised_item_ifce_key := null;
4489 g_revised_comps_exist := FALSE;
4490 g_revised_comp_ifce_key := null;
4491
4492 -- Pick up all operation resources with ECO ifce key = g_ECO_ifce_key
4493
4494 stmt_num := 176;
4495 Get_Lines_With_Curr_ECO_Ifce;
4496
4497 -- Translate parent ifce keys into parent array indexes
4498
4499 stmt_num := 178;
4500 ResolveIndexKeys;
4501
4502 -- Exit loop if no records found
4503
4504 stmt_num := 179;
4505 IF g_public_lines_tbl.count = 0
4506 THEN
4507 EXIT;
4508 END IF;
4509
4510 -- Move all encoin data structures to public API parameter data structures
4511
4512 l_top_ifce_key := g_ECO_ifce_key;
4513
4514 -- Call Public API
4515
4516 stmt_num := 181;
4517 Eng_Eco_Pub.Process_Eco (
4518 p_api_version_number => 1.0,
4519 p_init_msg_list => true,
4520 x_return_status => l_return_status,
4521 x_msg_count => l_msg_count,
4522 p_ECO_rec => g_public_eco_rec,
4523 p_eco_revision_tbl => g_public_rev_tbl,
4524 p_change_line_tbl => g_public_lines_tbl,
4525 p_revised_item_tbl => g_public_rev_item_tbl,
4526 p_rev_component_tbl => g_public_rev_comp_tbl,
4527 p_ref_designator_tbl => g_public_ref_des_tbl,
4528 p_sub_component_tbl => g_public_sub_comp_tbl,
4529 p_rev_operation_tbl => g_public_rev_operation_tbl,
4530 p_rev_op_resource_tbl => g_public_rev_op_res_tbl,
4531 p_rev_sub_resource_tbl => g_public_rev_sub_res_tbl,
4532 x_ECO_rec => g_public_out_eco_rec,
4533 x_eco_revision_tbl => g_public_out_rev_tbl,
4534 x_change_line_tbl => g_public_out_lines_tbl,
4535 x_revised_item_tbl => g_public_out_rev_item_tbl,
4536 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4537 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4538 x_sub_component_tbl => g_public_out_sub_comp_tbl,
4539 x_rev_operation_tbl => g_public_out_rev_operation_tbl,
4540 x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl,
4541 x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl,
4542 p_debug => 'N',
4543 p_debug_filename => 'bl_ut.log',
4544 p_output_dir => '/sqlcom/log/plm115rw'
4545 );
4546
4547 stmt_num := 182;
4548 Eng_Globals.Clear_Request_Table;
4549
4550 stmt_num := 184;
4551 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4552 stmt_num := 185;
4553 COMMIT;
4554 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4555 stmt_num := 189;
4556 ROLLBACK;
4557 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4558 stmt_num := 194;
4559 ROLLBACK;
4560 RAISE import_error;
4561 END IF;
4562
4563 stmt_num := 195;
4564 Update_Interface_Tables(l_return_status);
4565 stmt_num := 196;
4566 COMMIT;
4567
4568 END LOOP;
4569
4570
4571 -- *************************** REVISION BUSINESS OBJECT **************************
4572
4573 q := 0;
4574
4575 stmt_num := 223;
4576 l_return_status := null;
4577 l_msg_count := null;
4578 l_msg_data := null;
4579 --l_error_tbl.DELETE;
4580
4581 stmt_num := 223.5;
4582 Clear_Global_Data_Structures;
4583
4584 FOR c7rec IN GetRev LOOP
4585 stmt_num := 224;
4586 q := q + 1;
4587 g_public_rev_tbl(q).attribute11 := c7rec.attribute11;
4588 g_public_rev_tbl(q).attribute12 := c7rec.attribute12;
4589 g_public_rev_tbl(q).attribute13 := c7rec.attribute13;
4590 g_public_rev_tbl(q).attribute14 := c7rec.attribute14;
4591 g_public_rev_tbl(q).attribute15 := c7rec.attribute15;
4592 -- g_public_rev_tbl(q).program_application_id := c7rec.program_application_id;
4593 -- g_public_rev_tbl(q).program_id := c7rec.program_id;
4594 -- g_public_rev_tbl(q).program_update_date := c7rec.program_update_date;
4595 -- g_public_rev_tbl(q).request_id := c7rec.request_id;
4596 -- g_public_rev_tbl(q).revision_id := c7rec.revision_id;
4597 g_public_rev_tbl(q).eco_name := c7rec.change_notice;
4598 -- g_public_rev_tbl(q).organization_id := c7rec.organization_id;
4599 g_public_rev_tbl(q).revision := c7rec.revision;
4600 -- g_public_rev_tbl(q).last_update_date := c7rec.last_update_date;
4601 -- g_public_rev_tbl(q).last_updated_by := c7rec.last_updated_by;
4602 -- g_public_rev_tbl(q).creation_date := c7rec.creation_date;
4603 -- g_public_rev_tbl(q).created_by := c7rec.created_by;
4604 -- g_public_rev_tbl(q).last_update_login := c7rec.last_update_login;
4605 g_public_rev_tbl(q).comments := c7rec.comments;
4606 g_public_rev_tbl(q).attribute_category := c7rec.attribute_category;
4607 g_public_rev_tbl(q).attribute1 := c7rec.attribute1;
4608 g_public_rev_tbl(q).attribute2 := c7rec.attribute2;
4609 g_public_rev_tbl(q).attribute3 := c7rec.attribute3;
4610 g_public_rev_tbl(q).attribute4 := c7rec.attribute4;
4611 g_public_rev_tbl(q).attribute5 := c7rec.attribute5;
4612 g_public_rev_tbl(q).attribute6 := c7rec.attribute6;
4613 g_public_rev_tbl(q).attribute7 := c7rec.attribute7;
4614 g_public_rev_tbl(q).attribute8 := c7rec.attribute8;
4615 g_public_rev_tbl(q).attribute9 := c7rec.attribute9;
4616 g_public_rev_tbl(q).attribute10 := c7rec.attribute10;
4617 g_public_rev_tbl(q).new_revision := c7rec.new_revision;
4618 g_public_rev_tbl(q).organization_code := c7rec.organization_code;
4619 -- g_public_rev_tbl(q).process_flag := c7rec.process_flag;
4620 g_public_rev_tbl(q).transaction_id := c7rec.transaction_id;
4621 g_public_rev_tbl(q).transaction_type := c7rec.transaction_type;
4622
4623 stmt_num := 226;
4624 --dbms_output.put_line('Call Public API for revision record');
4625 Eng_Eco_Pub.Process_Eco (
4626 p_api_version_number => 1.0,
4627 p_init_msg_list => true,
4628 --p_commit => FND_API.G_FALSE,
4629 x_return_status => l_return_status,
4630 x_msg_count => l_msg_count,
4631 --x_msg_data => l_msg_data,
4632 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
4633 p_eco_revision_tbl => g_public_rev_tbl,
4634 p_revised_item_tbl => g_public_rev_item_tbl,
4635 p_rev_component_tbl => g_public_rev_comp_tbl,
4636 p_ref_designator_tbl => g_public_ref_des_tbl,
4637 p_sub_component_tbl => g_public_sub_comp_tbl,
4638 x_ECO_rec => g_public_out_eco_rec,
4639 x_eco_revision_tbl => g_public_out_rev_tbl,
4640 x_revised_item_tbl => g_public_out_rev_item_tbl,
4641 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4642 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4643 x_sub_component_tbl => g_public_out_sub_comp_tbl
4644 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
4645 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
4646 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
4647 ,p_debug => 'N'
4648 ,p_debug_filename => 'bl_ut.log'
4649 ,p_output_dir => '/sqlcom/log/plm115d'
4650 --x_err_text => l_err_text--,
4651 --x_err_tbl => l_error_tbl
4652 );
4653
4654 Eng_Globals.Clear_Request_Table;
4655
4656 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4657 stmt_num := 230;
4658 COMMIT;
4659 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4660 stmt_num := 231;
4661 ROLLBACK;
4662 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4663 stmt_num := 232;
4664 ROLLBACK;
4665 stmt_num := 233;
4666 RAISE import_error;
4667 END IF;
4668
4669 stmt_num := 234;
4670 Update_Interface_Tables(l_return_status);
4671 stmt_num := 235;
4672 COMMIT;
4673
4674 stmt_num := 239;
4675 Clear_Global_Data_Structures;
4676
4677 END LOOP; -- END ECO REV LOOP
4678
4679
4680 -- *************************** REVISED ITEM BUSINESS OBJECT **************************
4681
4682 r := 0;
4683
4684 stmt_num := 240;
4685 l_return_status := null;
4686 l_msg_count := null;
4687 l_msg_data := null;
4688 --l_error_tbl.DELETE;
4689
4690 stmt_num := 240.5;
4691 Clear_Global_Data_Structures;
4692
4693 stmt_num := 241;
4694 FOR c8rec IN GetItem LOOP
4695
4696 -- Pick up one revised item record
4697
4698 stmt_num := 242;
4699 r := r + 1;
4700 g_encoin_rev_item_tbl(r).change_notice := c8rec.change_notice;
4701 g_encoin_rev_item_tbl(r).organization_id := c8rec.organization_id;
4702 g_encoin_rev_item_tbl(r).revised_item_id := c8rec.revised_item_id;
4703 g_encoin_rev_item_tbl(r).last_update_date := c8rec.last_update_date;
4704 g_encoin_rev_item_tbl(r).last_updated_by := c8rec.last_updated_by;
4705 g_encoin_rev_item_tbl(r).creation_date := c8rec.creation_date;
4706 g_encoin_rev_item_tbl(r).created_by := c8rec.created_by;
4707 g_encoin_rev_item_tbl(r).last_update_login := c8rec.last_update_login;
4708 g_encoin_rev_item_tbl(r).implementation_date := c8rec.implementation_date;
4709 g_encoin_rev_item_tbl(r).cancellation_date := c8rec.cancellation_date;
4710 g_encoin_rev_item_tbl(r).cancel_comments := c8rec.cancel_comments;
4711 g_encoin_rev_item_tbl(r).disposition_type := c8rec.disposition_type;
4712 g_encoin_rev_item_tbl(r).new_item_revision := c8rec.new_item_revision;
4713 g_encoin_rev_item_tbl(r).early_schedule_date := c8rec.early_schedule_date;
4714 g_encoin_rev_item_tbl(r).attribute_category := c8rec.attribute_category;
4715 g_encoin_rev_item_tbl(r).attribute2 := c8rec.attribute2;
4716 g_encoin_rev_item_tbl(r).attribute3 := c8rec.attribute3;
4717 g_encoin_rev_item_tbl(r).attribute4 := c8rec.attribute4;
4718 g_encoin_rev_item_tbl(r).attribute5 := c8rec.attribute5;
4719 g_encoin_rev_item_tbl(r).attribute7 := c8rec.attribute7;
4720 g_encoin_rev_item_tbl(r).attribute8 := c8rec.attribute8;
4721 g_encoin_rev_item_tbl(r).attribute9 := c8rec.attribute9;
4722 g_encoin_rev_item_tbl(r).attribute11 := c8rec.attribute11;
4723 g_encoin_rev_item_tbl(r).attribute12 := c8rec.attribute12;
4724 g_encoin_rev_item_tbl(r).attribute13 := c8rec.attribute13;
4725 g_encoin_rev_item_tbl(r).attribute14 := c8rec.attribute14;
4726 g_encoin_rev_item_tbl(r).attribute15 := c8rec.attribute15;
4727 g_encoin_rev_item_tbl(r).status_type := c8rec.status_type;
4728 g_encoin_rev_item_tbl(r).scheduled_date := c8rec.scheduled_date;
4729 g_encoin_rev_item_tbl(r).bill_sequence_id := c8rec.bill_sequence_id;
4730 g_encoin_rev_item_tbl(r).mrp_active := c8rec.mrp_active;
4731 g_encoin_rev_item_tbl(r).request_id := c8rec.request_id;
4732 g_encoin_rev_item_tbl(r).program_application_id := c8rec.program_application_id;
4733 g_encoin_rev_item_tbl(r).program_id := c8rec.program_id;
4734 g_encoin_rev_item_tbl(r).program_update_date := c8rec.program_update_date;
4735 g_encoin_rev_item_tbl(r).update_wip := c8rec.update_wip;
4736 g_encoin_rev_item_tbl(r).use_up := c8rec.use_up;
4737 g_encoin_rev_item_tbl(r).use_up_item_id := c8rec.use_up_item_id;
4738 g_encoin_rev_item_tbl(r).revised_item_sequence_id := c8rec.revised_item_sequence_id;
4739 g_encoin_rev_item_tbl(r).use_up_plan_name := c8rec.use_up_plan_name;
4740 g_encoin_rev_item_tbl(r).descriptive_text := c8rec.descriptive_text;
4741 g_encoin_rev_item_tbl(r).auto_implement_date := c8rec.auto_implement_date;
4742 g_encoin_rev_item_tbl(r).attribute1 := c8rec.attribute1;
4743 g_encoin_rev_item_tbl(r).attribute6 := c8rec.attribute6;
4744 g_encoin_rev_item_tbl(r).attribute10 := c8rec.attribute10;
4745 g_encoin_rev_item_tbl(r).requestor_id := c8rec.requestor_id;
4746 g_encoin_rev_item_tbl(r).comments := c8rec.comments;
4747 g_encoin_rev_item_tbl(r).process_flag := c8rec.process_flag;
4748 g_encoin_rev_item_tbl(r).transaction_id := c8rec.transaction_id;
4749 g_encoin_rev_item_tbl(r).organization_code := c8rec.organization_code;
4750 g_encoin_rev_item_tbl(r).revised_item_number := c8rec.revised_item_number;
4751 g_encoin_rev_item_tbl(r).new_rtg_revision := c8rec.new_rtg_revision;
4752 g_encoin_rev_item_tbl(r).use_up_item_number := c8rec.use_up_item_number;
4753 g_encoin_rev_item_tbl(r).alternate_bom_designator := c8rec.alternate_bom_designator;
4754 g_encoin_rev_item_tbl(r).operation := c8rec.transaction_type;
4755 g_encoin_rev_item_tbl(r).ENG_REVISED_ITEMS_IFCE_KEY := c8rec.ENG_REVISED_ITEMS_IFCE_KEY;
4756 g_revised_item_ifce_key := g_encoin_rev_item_tbl(r).ENG_REVISED_ITEMS_IFCE_KEY;
4757 g_encoin_rev_item_tbl(r).parent_revised_item_name := c8rec.parent_revised_item_name;
4758 g_encoin_rev_item_tbl(r).parent_alternate_name := c8rec.parent_alternate_name;
4759 g_encoin_rev_item_tbl(r).updated_item_revision := c8rec.updated_item_revision; -- Bug 3432944
4760 g_encoin_rev_item_tbl(r).New_scheduled_date := c8rec.New_scheduled_date; -- Bug 3432944
4761 g_encoin_rev_item_tbl(r).from_item_revision := c8rec.from_item_revision; -- 11.5.10E
4762 g_encoin_rev_item_tbl(r).new_revision_label := c8rec.new_revision_label;
4763 g_encoin_rev_item_tbl(r).New_Revised_Item_Rev_Desc := c8rec.New_Revised_Item_Rev_Desc;
4764 g_encoin_rev_item_tbl(r).new_revision_reason := c8rec.new_revision_reason;
4765 g_encoin_rev_item_tbl(r).from_end_item_unit_number := c8rec.from_end_item_unit_number; /*Bug 6377841*/
4766 -------------
4767 --
4768 -- Revised item exists, but it doesn't have an IFCE key entry
4769 --
4770
4771 stmt_num := 243;
4772 IF g_revised_item_ifce_key IS NULL
4773 THEN
4774 g_revised_items_exist := TRUE;
4775 --dbms_output.put_line('No ifce key - Call Public API for item');
4776
4777 -- Move all encoin data structures to public API parameter data structures
4778
4779 stmt_num := 244;
4780 Move_Encoin_Struct_To_Public;
4781
4782 stmt_num := 245;
4783 Eng_Eco_Pub.Process_Eco (
4784 p_api_version_number => 1.0,
4785 p_init_msg_list => true,
4786 --p_commit => FND_API.G_FALSE,
4787 x_return_status => l_return_status,
4788 x_msg_count => l_msg_count,
4789 --x_msg_data => l_msg_data,
4790 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
4791 p_eco_revision_tbl => g_public_rev_tbl,
4792 p_revised_item_tbl => g_public_rev_item_tbl,
4793 p_rev_component_tbl => g_public_rev_comp_tbl,
4794 p_ref_designator_tbl => g_public_ref_des_tbl,
4795 p_sub_component_tbl => g_public_sub_comp_tbl,
4796 x_ECO_rec => g_public_out_eco_rec,
4797 x_eco_revision_tbl => g_public_out_rev_tbl,
4798 x_revised_item_tbl => g_public_out_rev_item_tbl,
4799 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4800 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4801 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
4802 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
4803 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
4804 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
4805 ,p_debug => 'N'
4806 ,p_debug_filename => 'bl_ut.log'
4807 ,p_output_dir => '/sqlcom/log/plm115d'
4808 --x_err_text => l_err_text--,
4809 --x_err_tbl => l_error_tbl
4810 );
4811
4812 stmt_num := 245;
4813 Eng_Globals.Clear_Request_Table;
4814 stmt_num := 246;
4815
4816 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4817 stmt_num := 250;
4818 COMMIT;
4819 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4820 stmt_num := 251;
4821 ROLLBACK;
4822 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4823 stmt_num := 252;
4824 ROLLBACK;
4825 stmt_num := 253;
4826 RAISE import_error;
4827 END IF;
4828
4829 stmt_num := 254;
4830 Update_Interface_Tables(l_return_status);
4831 stmt_num := 255;
4832 COMMIT;
4833
4834 -------------
4835 --
4836 -- Revised item exists and g_revised_item_ifce_key is not null
4837 --
4838
4839 stmt_num := 258;
4840 ELSIF g_revised_item_ifce_key IS NOT NULL
4841 THEN
4842 stmt_num := 259;
4843 g_revised_items_exist := TRUE;
4844 l_top_ifce_key := g_revised_item_ifce_key;
4845 g_revised_comps_exist := FALSE;
4846
4847 -- Pick up revised components with revised item ifce key = g_revised_item_ifce_key
4848
4849 stmt_num := 260;
4850 Get_Comps_With_Curr_Item_Ifce;
4851
4852 stmt_num := 261;
4853 IF g_encoin_rev_comp_tbl.count <> 0
4854 THEN
4855 stmt_num := 262;
4856 g_revised_comp_ifce_key := null;
4857 g_revised_comps_exist := TRUE;
4858 END IF;
4859
4860 -- Pick up ref designators with revised item ifce key = g_revised_item_ifce_key
4861
4862 stmt_num := 263;
4863 Get_Rfds_With_Curr_Item_Ifce;
4864
4865 -- Pick up sub components with revised item ifce key = g_revised_item_ifce_key
4866
4867 stmt_num := 264;
4868 Get_Sbcs_With_Curr_Item_Ifce;
4869
4870 -- Translate parent ifce keys into parent array indexes
4871
4872 stmt_num := 265;
4873 ResolveIndexKeys;
4874
4875 -- Move all encoin data structures to public API parameter data structures
4876
4877 stmt_num := 266;
4878 Move_Encoin_Struct_To_Public;
4879
4880 -- Call Public API
4881
4882 stmt_num := 267;
4883 --dbms_output.put_line('Ifce key exists - Call Public API for item');
4884 Eng_Eco_Pub.Process_Eco (
4885 p_api_version_number => 1.0,
4886 p_init_msg_list => true,
4887 --p_commit => FND_API.G_FALSE,
4888 x_return_status => l_return_status,
4889 x_msg_count => l_msg_count,
4890 --x_msg_data => l_msg_data,
4891 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
4892 p_eco_revision_tbl => g_public_rev_tbl,
4893 p_revised_item_tbl => g_public_rev_item_tbl,
4894 p_rev_component_tbl => g_public_rev_comp_tbl,
4895 p_ref_designator_tbl => g_public_ref_des_tbl,
4896 p_sub_component_tbl => g_public_sub_comp_tbl,
4897 x_ECO_rec => g_public_out_eco_rec,
4898 x_eco_revision_tbl => g_public_out_rev_tbl,
4899 x_revised_item_tbl => g_public_out_rev_item_tbl,
4900 x_rev_component_tbl => g_public_out_rev_comp_tbl,
4901 x_ref_designator_tbl => g_public_out_ref_des_tbl,
4902 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
4903 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
4904 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
4905 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
4906 ,p_debug => 'N'
4907 ,p_debug_filename => 'bl_ut.log'
4908 ,p_output_dir => '/sqlcom/log/plm115d'
4909 --x_err_text => l_err_text--,
4910 --x_err_tbl => l_error_tbl
4911 );
4912
4913 stmt_num := 268;
4914 Eng_Globals.Clear_Request_Table;
4915 stmt_num := 269;
4916
4917 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4918 stmt_num := 270;
4919 COMMIT;
4920 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4921 stmt_num := 271;
4922 ROLLBACK;
4923 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4924 stmt_num := 272;
4925 ROLLBACK;
4926 stmt_num := 273;
4927 RAISE import_error;
4928 END IF;
4929
4930 stmt_num := 274;
4931 Update_Interface_Tables(l_return_status);
4932 stmt_num := 275;
4933 COMMIT;
4934
4935 END IF;
4936
4937 stmt_num := 291;
4938 l_return_status := null;
4939 l_msg_count := null;
4940 l_msg_data := null;
4941 --l_error_tbl.DELETE;
4942
4943 stmt_num := 291.5;
4944 Clear_Global_Data_Structures;
4945
4946 r := 0;
4947
4948 END LOOP; -- End Revised Item Object loop
4949
4950 -------------
4951 --
4952 -- Revised item does not exist, i.e., no more revised item exist in interface table
4953 --
4954
4955 stmt_num := 292;
4956 IF NOT g_revised_items_exist
4957 THEN
4958
4959 -- Group component rev item ifce keys
4960
4961 stmt_num := 293;
4962 k := 0;
4963 FOR c1rec IN GetCompWithSameItemifce LOOP
4964 k := k + 1;
4965 g_item_ifce_group_tbl(k) := c1rec.item_ifce_key;
4966 END LOOP;
4967
4968 g_ECO_ifce_key := null;
4969 g_revised_item_ifce_key := null;
4970
4971 stmt_num := 294;
4972 FOR i IN 1..g_item_ifce_group_tbl.COUNT
4973 LOOP
4974 stmt_num := 295;
4975 g_encoin_rev_item_tbl.delete;
4976 g_public_rev_tbl.delete;
4977 g_encoin_rev_comp_tbl.delete;
4978 g_encoin_ref_des_tbl.delete;
4979 g_encoin_sub_comp_tbl.delete;
4980
4981 g_revised_item_ifce_key := g_item_ifce_group_tbl(i);
4982 g_revised_items_exist := FALSE;
4983 g_revised_comps_exist := FALSE;
4984 g_revised_comp_ifce_key := null;
4985
4986 -- Pick up all revised components with item ifce key = g_revised_item_ifce_key
4987
4988 stmt_num := 296;
4989 Get_Comps_With_Curr_Item_ifce;
4990 stmt_num := 297;
4991 IF g_encoin_rev_comp_tbl.count <> 0
4992 THEN
4993 stmt_num := 298;
4994 g_revised_comps_exist := TRUE;
4995 END IF;
4996
4997 -- Pick up all reference designators with item ifce key = g_revised_item_ifce_key
4998
4999 stmt_num := 299;
5000 Get_Rfds_With_Curr_Item_Ifce;
5001
5002 -- Pick up all substitute components with item ifce key = g_revised_item_ifce_key
5003
5004 stmt_num := 300;
5005 Get_Sbcs_With_Curr_Item_Ifce;
5006
5007 -- Translate parent ifce keys into parent array indexes
5008
5009 stmt_num := 301;
5010 ResolveIndexKeys;
5011
5012 -- Exit loop if no records found
5013
5014 stmt_num := 302;
5015 IF g_encoin_rev_comp_tbl.count =0 AND g_encoin_ref_des_tbl.count = 0 AND
5016 g_encoin_sub_comp_tbl.count = 0
5017 THEN
5018 EXIT;
5019 END IF;
5020
5021 l_top_ifce_key := g_revised_item_ifce_key;
5022
5023 -- Move all encoin data structures to public API parameter data structures
5024
5025 stmt_num := 303;
5026 Move_Encoin_Struct_To_Public;
5027
5028 -- Call Public API
5029
5030 stmt_num := 304;
5031 --dbms_output.put_line('No Items - Call Public API with comps starting hierarchy');
5032 Eng_Eco_Pub.Process_Eco (
5033 p_api_version_number => 1.0,
5034 p_init_msg_list => true,
5035 --p_commit => FND_API.G_FALSE,
5036 x_return_status => l_return_status,
5037 x_msg_count => l_msg_count,
5038 --x_msg_data => l_msg_data,
5039 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5040 p_eco_revision_tbl => g_public_rev_tbl,
5041 p_revised_item_tbl => g_public_rev_item_tbl,
5042 p_rev_component_tbl => g_public_rev_comp_tbl,
5043 p_ref_designator_tbl => g_public_ref_des_tbl,
5044 p_sub_component_tbl => g_public_sub_comp_tbl,
5045 x_ECO_rec => g_public_out_eco_rec,
5046 x_eco_revision_tbl => g_public_out_rev_tbl,
5047 x_revised_item_tbl => g_public_out_rev_item_tbl,
5048 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5049 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5050 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5051 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5052 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5053 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5054 ,p_debug => 'N'
5055 ,p_debug_filename => 'bl_ut.log'
5056 ,p_output_dir => '/sqlcom/log/plm115d'
5057 --x_err_text => l_err_text--,
5058 --x_err_tbl => l_error_tbl
5059 );
5060
5061 stmt_num := 305;
5062 Eng_Globals.Clear_Request_Table;
5063 stmt_num := 306;
5064
5065 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5066 stmt_num := 310;
5067 COMMIT;
5068 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5069 stmt_num := 311;
5070 ROLLBACK;
5071 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5072 stmt_num := 312;
5073 ROLLBACK;
5074 stmt_num := 313;
5075 RAISE import_error;
5076 END IF;
5077
5078 stmt_num := 314;
5079 Update_Interface_Tables(l_return_status);
5080 stmt_num := 315;
5081 COMMIT;
5082
5083 END LOOP;
5084
5085 -- Group ref desgs rev item ifce keys
5086
5087 stmt_num := 326;
5088 k := 0;
5089 FOR c1rec IN GetRfdWithSameItemifce LOOP
5090 k := k + 1;
5091 g_item_ifce_group_tbl(k) := c1rec.item_ifce_key;
5092 END LOOP;
5093
5094 g_ECO_ifce_key := null;
5095 g_revised_item_ifce_key := null;
5096
5097 stmt_num := 327;
5098 FOR i IN 1..g_item_ifce_group_tbl.COUNT
5099 LOOP
5100 stmt_num := 328;
5101 g_encoin_rev_item_tbl.delete;
5102 g_public_rev_tbl.delete;
5103 g_encoin_rev_comp_tbl.delete;
5104 g_encoin_ref_des_tbl.delete;
5105 g_encoin_sub_comp_tbl.delete;
5106 g_public_eco_rec := null;
5107 g_public_rev_tbl.DELETE;
5108 g_public_rev_item_tbl.DELETE;
5109 g_public_rev_comp_tbl.DELETE;
5110 g_public_sub_comp_tbl.DELETE;
5111 g_public_ref_des_tbl.DELETE;
5112 g_public_rev_op_res_tbl.DELETE;
5113 g_public_rev_operation_tbl.DELETE;
5114 g_public_lines_tbl.DELETE;
5115
5116 g_revised_item_ifce_key := g_item_ifce_group_tbl(i);
5117 g_revised_items_exist := FALSE;
5118 g_revised_comps_exist := FALSE;
5119 g_revised_comp_ifce_key := null;
5120
5121 -- Pick up all reference designators with item ifce key = g_revised_item_ifce_key
5122
5123 stmt_num := 329;
5124 Get_Rfds_With_Curr_Item_Ifce;
5125
5126 -- Pick up all substitute components with item ifce key = g_revised_item_ifce_key
5127
5128 stmt_num := 330;
5129 Get_Sbcs_With_Curr_Item_Ifce;
5130
5131 -- Translate parent ifce keys into parent array indexes
5132
5133 stmt_num := 331;
5134 ResolveIndexKeys;
5135
5136 -- Exit loop if no records found
5137
5138 stmt_num := 332;
5139 IF g_encoin_ref_des_tbl.count = 0 AND g_encoin_sub_comp_tbl.count = 0
5140 THEN
5141 EXIT;
5142 END IF;
5143
5144 -- Move all encoin data structures to public API parameter data structures
5145
5146 stmt_num := 333;
5147 Move_Encoin_Struct_To_Public;
5148
5149 l_top_ifce_key := g_revised_item_ifce_key;
5150
5151 -- Call Public API
5152
5153 stmt_num := 334;
5154 --dbms_output.put_line('No Items - Call Public API with desgs starting hierarchy');
5155 Eng_Eco_Pub.Process_Eco (
5156 p_api_version_number => 1.0,
5157 p_init_msg_list => true,
5158 --p_commit => FND_API.G_FALSE,
5159 x_return_status => l_return_status,
5160 x_msg_count => l_msg_count,
5161 --x_msg_data => l_msg_data,
5162 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5163 p_eco_revision_tbl => g_public_rev_tbl,
5164 p_revised_item_tbl => g_public_rev_item_tbl,
5165 p_rev_component_tbl => g_public_rev_comp_tbl,
5166 p_ref_designator_tbl => g_public_ref_des_tbl,
5167 p_sub_component_tbl => g_public_sub_comp_tbl,
5168 x_ECO_rec => g_public_out_eco_rec,
5169 x_eco_revision_tbl => g_public_out_rev_tbl,
5170 x_revised_item_tbl => g_public_out_rev_item_tbl,
5171 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5172 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5173 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5174 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5175 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5176 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5177 ,p_debug => 'N'
5178 ,p_debug_filename => 'bl_ut.log'
5179 ,p_output_dir => '/sqlcom/log/plm115d'
5180 --x_err_text => l_err_text--,
5181 --x_err_tbl => l_error_tbl
5182 );
5183
5184 stmt_num := 335;
5185 Eng_Globals.Clear_Request_Table;
5186 stmt_num := 336;
5187
5188 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5189 stmt_num := 340;
5190 COMMIT;
5191 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5192 stmt_num := 341;
5193 ROLLBACK;
5194 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5195 stmt_num := 342;
5196 ROLLBACK;
5197 stmt_num := 343;
5198 RAISE import_error;
5199 END IF;
5200
5201 stmt_num := 344;
5202 Update_Interface_Tables(l_return_status);
5203 stmt_num := 345;
5204 COMMIT;
5205
5206 END LOOP;
5207
5208 -- Group sub comps rev item ifce keys
5209
5210 stmt_num := 353;
5211 k := 0;
5212 FOR c1rec IN GetSbcWithSameItemifce LOOP
5213 k := k + 1;
5214 g_item_ifce_group_tbl(k) := c1rec.item_ifce_key;
5215 END LOOP;
5216
5217 g_ECO_ifce_key := null;
5218 g_revised_item_ifce_key := null;
5219
5220 stmt_num := 354;
5221 FOR i IN 1..g_item_ifce_group_tbl.COUNT
5222 LOOP
5223 stmt_num := 355;
5224 g_encoin_rev_item_tbl.delete;
5225 g_public_rev_tbl.delete;
5226 g_encoin_rev_comp_tbl.delete;
5227 g_encoin_ref_des_tbl.delete;
5228 g_encoin_sub_comp_tbl.delete;
5229 g_public_eco_rec := null;
5230 g_public_rev_tbl.DELETE;
5231 g_public_rev_item_tbl.DELETE;
5232 g_public_rev_comp_tbl.DELETE;
5233 g_public_sub_comp_tbl.DELETE;
5234 g_public_ref_des_tbl.DELETE;
5235 g_public_rev_op_res_tbl.DELETE;
5236 g_public_rev_operation_tbl.DELETE;
5237 g_public_lines_tbl.DELETE;
5238
5239 g_revised_item_ifce_key := g_item_ifce_group_tbl(i);
5240 g_revised_items_exist := FALSE;
5241 g_revised_comps_exist := FALSE;
5242 g_revised_comp_ifce_key := null;
5243
5244 -- Pick up all substitute components with item ifce key = g_revised_item_ifce_key
5245
5246 stmt_num := 356;
5247 Get_Sbcs_With_Curr_Item_Ifce;
5248
5249 -- Translate parent ifce keys into parent array indexes
5250
5251 stmt_num := 357;
5252 ResolveIndexKeys;
5253
5254 -- Exit loop if no records found
5255
5256 stmt_num := 358;
5257 IF g_encoin_sub_comp_tbl.count = 0
5258 THEN
5259 EXIT;
5260 END IF;
5261
5262 -- Move all encoin data structures to public API parameter data structures
5263
5264 stmt_num := 359;
5265 Move_Encoin_Struct_To_Public;
5266
5267 l_top_ifce_key := g_revised_item_ifce_key;
5268
5269 -- Call Public API
5270
5271 stmt_num := 360;
5272 --dbms_output.put_line('No Items - Call Public API with sbcs starting hierarchy');
5273 Eng_Eco_Pub.Process_Eco (
5274 p_api_version_number => 1.0,
5275 p_init_msg_list => true,
5276 --p_commit => FND_API.G_FALSE,
5277 x_return_status => l_return_status,
5278 x_msg_count => l_msg_count,
5279 --x_msg_data => l_msg_data,
5280 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5281 p_eco_revision_tbl => g_public_rev_tbl,
5282 p_revised_item_tbl => g_public_rev_item_tbl,
5283 p_rev_component_tbl => g_public_rev_comp_tbl,
5284 p_ref_designator_tbl => g_public_ref_des_tbl,
5285 p_sub_component_tbl => g_public_sub_comp_tbl,
5286 x_ECO_rec => g_public_out_eco_rec,
5287 x_eco_revision_tbl => g_public_out_rev_tbl,
5288 x_revised_item_tbl => g_public_out_rev_item_tbl,
5289 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5290 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5291 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5292 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5293 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5294 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5295 ,p_debug => 'N'
5296 ,p_debug_filename => 'bl_ut.log'
5297 ,p_output_dir => '/sqlcom/log/plm115d'
5298 --x_err_text => l_err_text--,
5299 --x_err_tbl => l_error_tbl
5300 );
5301
5302 stmt_num := 361;
5303 Eng_Globals.Clear_Request_Table;
5304 stmt_num := 362;
5305
5306 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5307 stmt_num := 370;
5308 COMMIT;
5309 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5310 stmt_num := 371;
5311 ROLLBACK;
5312 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5313 stmt_num := 372;
5314 ROLLBACK;
5315 stmt_num := 373;
5316 RAISE import_error;
5317 END IF;
5318
5319 stmt_num := 374;
5320 Update_Interface_Tables(l_return_status);
5321 stmt_num := 375;
5322 COMMIT;
5323
5324 END LOOP;
5325 END IF;
5326
5327 -- ********************* REVISED COMPONENT BUSINESS OBJECT ***********************
5328
5329 v := 0;
5330
5331 stmt_num := 376;
5332 l_return_status := null;
5333 l_msg_count := null;
5334 l_msg_data := null;
5335 --l_error_tbl.DELETE;
5336
5337 stmt_num := 376.5;
5338 Clear_Global_Data_Structures;
5339
5340 FOR c12rec IN GetComp LOOP
5341
5342 -- Pick up one revised component record
5343
5344 stmt_num := 378;
5345 v := v + 1;
5346 g_encoin_rev_comp_tbl(v).supply_subinventory := c12rec.supply_subinventory;
5347 g_encoin_rev_comp_tbl(v).OP_LEAD_TIME_PERCENT := c12rec.OPERATION_LEAD_TIME_PERCENT;
5348 g_encoin_rev_comp_tbl(v).revised_item_sequence_id := c12rec.revised_item_sequence_id;
5349 g_encoin_rev_comp_tbl(v).cost_factor := c12rec.cost_factor;
5350 g_encoin_rev_comp_tbl(v).required_for_revenue := c12rec.required_for_revenue;
5351 g_encoin_rev_comp_tbl(v).high_quantity := c12rec.high_quantity;
5352 g_encoin_rev_comp_tbl(v).component_sequence_id := c12rec.component_sequence_id;
5353 g_encoin_rev_comp_tbl(v).program_application_id := c12rec.program_application_id;
5354 g_encoin_rev_comp_tbl(v).wip_supply_type := c12rec.wip_supply_type;
5355 g_encoin_rev_comp_tbl(v).supply_locator_id := c12rec.supply_locator_id;
5356 g_encoin_rev_comp_tbl(v).bom_item_type := c12rec.bom_item_type;
5357 g_encoin_rev_comp_tbl(v).operation_seq_num := c12rec.operation_seq_num;
5358 g_encoin_rev_comp_tbl(v).component_item_id := c12rec.component_item_id;
5359 g_encoin_rev_comp_tbl(v).last_update_date := c12rec.last_update_date;
5360 g_encoin_rev_comp_tbl(v).last_updated_by := c12rec.last_updated_by;
5361 g_encoin_rev_comp_tbl(v).creation_date := c12rec.creation_date;
5362 g_encoin_rev_comp_tbl(v).created_by := c12rec.created_by;
5363 g_encoin_rev_comp_tbl(v).last_update_login := c12rec.last_update_login;
5364 g_encoin_rev_comp_tbl(v).item_num := c12rec.item_num;
5365 g_encoin_rev_comp_tbl(v).component_quantity := c12rec.component_quantity;
5366 g_encoin_rev_comp_tbl(v).component_yield_factor := c12rec.component_yield_factor;
5367 g_encoin_rev_comp_tbl(v).component_remarks := c12rec.component_remarks;
5368 g_encoin_rev_comp_tbl(v).effectivity_date := c12rec.effectivity_date;
5369 g_encoin_rev_comp_tbl(v).change_notice := c12rec.change_notice;
5370 g_encoin_rev_comp_tbl(v).implementation_date := c12rec.implementation_date;
5371 g_encoin_rev_comp_tbl(v).disable_date := c12rec.disable_date;
5372 g_encoin_rev_comp_tbl(v).attribute_category := c12rec.attribute_category;
5373 g_encoin_rev_comp_tbl(v).attribute1 := c12rec.attribute1;
5374 g_encoin_rev_comp_tbl(v).attribute2 := c12rec.attribute2;
5375 g_encoin_rev_comp_tbl(v).attribute3 := c12rec.attribute3;
5376 g_encoin_rev_comp_tbl(v).attribute4 := c12rec.attribute4;
5377 g_encoin_rev_comp_tbl(v).attribute5 := c12rec.attribute5;
5378 g_encoin_rev_comp_tbl(v).attribute6 := c12rec.attribute6;
5379 g_encoin_rev_comp_tbl(v).attribute7 := c12rec.attribute7;
5380 g_encoin_rev_comp_tbl(v).attribute8 := c12rec.attribute8;
5381 g_encoin_rev_comp_tbl(v).attribute9 := c12rec.attribute9;
5382 g_encoin_rev_comp_tbl(v).attribute10 := c12rec.attribute10;
5383 g_encoin_rev_comp_tbl(v).attribute11 := c12rec.attribute11;
5384 g_encoin_rev_comp_tbl(v).attribute12 := c12rec.attribute12;
5385 g_encoin_rev_comp_tbl(v).attribute13 := c12rec.attribute13;
5386 g_encoin_rev_comp_tbl(v).attribute14 := c12rec.attribute14;
5387 g_encoin_rev_comp_tbl(v).attribute15 := c12rec.attribute15;
5388 g_encoin_rev_comp_tbl(v).planning_factor := c12rec.planning_factor;
5389 g_encoin_rev_comp_tbl(v).quantity_related := c12rec.quantity_related;
5390 g_encoin_rev_comp_tbl(v).so_basis := c12rec.so_basis;
5391 g_encoin_rev_comp_tbl(v).optional := c12rec.optional;
5392 g_encoin_rev_comp_tbl(v).MUTUALLY_EXCLUSIVE_OPT := c12rec.MUTUALLY_EXCLUSIVE_OPTIONS;
5393 g_encoin_rev_comp_tbl(v).include_in_cost_rollup := c12rec.include_in_cost_rollup;
5394 g_encoin_rev_comp_tbl(v).check_atp := c12rec.check_atp;
5395 g_encoin_rev_comp_tbl(v).shipping_allowed := c12rec.shipping_allowed;
5396 g_encoin_rev_comp_tbl(v).required_to_ship := c12rec.required_to_ship;
5397 g_encoin_rev_comp_tbl(v).include_on_ship_docs := c12rec.include_on_ship_docs;
5398 g_encoin_rev_comp_tbl(v).include_on_bill_docs := c12rec.include_on_bill_docs;
5399 g_encoin_rev_comp_tbl(v).low_quantity := c12rec.low_quantity;
5400 g_encoin_rev_comp_tbl(v).acd_type := c12rec.acd_type;
5401 g_encoin_rev_comp_tbl(v).old_component_sequence_id := c12rec.old_component_sequence_id;
5402 g_encoin_rev_comp_tbl(v).bill_sequence_id := c12rec.bill_sequence_id;
5403 g_encoin_rev_comp_tbl(v).request_id := c12rec.request_id;
5404 g_encoin_rev_comp_tbl(v).program_id := c12rec.program_id;
5405 g_encoin_rev_comp_tbl(v).program_update_date := c12rec.program_update_date;
5406 g_encoin_rev_comp_tbl(v).pick_components := c12rec.pick_components;
5407 g_encoin_rev_comp_tbl(v).assembly_type := c12rec.assembly_type;
5408 g_encoin_rev_comp_tbl(v).interface_entity_type := c12rec.interface_entity_type;
5409 g_encoin_rev_comp_tbl(v).reference_designator := c12rec.reference_designator;
5410 g_encoin_rev_comp_tbl(v).new_effectivity_date := c12rec.new_effectivity_date;
5411 g_encoin_rev_comp_tbl(v).old_effectivity_date := c12rec.old_effectivity_date;
5412 g_encoin_rev_comp_tbl(v).substitute_comp_id := c12rec.substitute_comp_id;
5413 g_encoin_rev_comp_tbl(v).new_operation_seq_num := c12rec.new_operation_seq_num;
5414 g_encoin_rev_comp_tbl(v).old_operation_seq_num := c12rec.old_operation_seq_num;
5415 g_encoin_rev_comp_tbl(v).process_flag := c12rec.process_flag;
5416 g_encoin_rev_comp_tbl(v).transaction_id := c12rec.transaction_id;
5417 g_encoin_rev_comp_tbl(v).SUBSTITUTE_COMP_NUMBER := c12rec.SUBSTITUTE_COMP_NUMBER;
5418 g_encoin_rev_comp_tbl(v).ORGANIZATION_CODE := c12rec.ORGANIZATION_CODE;
5419 g_encoin_rev_comp_tbl(v).ASSEMBLY_ITEM_NUMBER := c12rec.ASSEMBLY_ITEM_NUMBER;
5420 g_encoin_rev_comp_tbl(v).COMPONENT_ITEM_NUMBER := c12rec.COMPONENT_ITEM_NUMBER;
5421 g_encoin_rev_comp_tbl(v).LOCATION_NAME := c12rec.LOCATION_NAME;
5422 g_encoin_rev_comp_tbl(v).ORGANIZATION_ID := c12rec.ORGANIZATION_ID;
5423 g_encoin_rev_comp_tbl(v).ASSEMBLY_ITEM_ID := c12rec.ASSEMBLY_ITEM_ID;
5424 g_encoin_rev_comp_tbl(v).ALTERNATE_BOM_DESIGNATOR := c12rec.ALTERNATE_BOM_DESIGNATOR;
5425 g_encoin_rev_comp_tbl(v).operation := c12rec.transaction_type;
5426 g_encoin_rev_comp_tbl(v).BOM_INVENTORY_COMPS_IFCE_KEY := c12rec.BOM_INVENTORY_COMPS_IFCE_KEY;
5427 --Bug 3396529: Added New_revised_Item_Revision
5428 g_encoin_rev_comp_tbl(v).New_revised_Item_Revision := c12rec.New_revised_Item_Revision;
5429 g_revised_comp_ifce_key := g_encoin_rev_comp_tbl(v).BOM_INVENTORY_COMPS_IFCE_KEY;
5430 g_encoin_rev_comp_tbl(v).from_end_item_unit_number := c12rec.from_end_item_unit_number; /*Bug 6377841*/
5431 g_encoin_rev_comp_tbl(v).to_end_item_unit_number := c12rec.to_end_item_unit_number; /*Bug 6377841*/
5432
5433 -------------
5434 --
5435 -- Revised component exists, but it doesn't have an IFCE key entry
5436 --
5437
5438 stmt_num := 381;
5439 IF g_revised_comp_ifce_key IS NULL
5440 THEN
5441 stmt_num := 382;
5442 g_revised_comps_exist := TRUE;
5443 --dbms_output.put_line('No ifce key - Call Public API for comp');
5444 Move_Encoin_Struct_To_Public;
5445
5446 stmt_num := 382.5;
5447 Eng_Eco_Pub.Process_Eco (
5448 p_api_version_number => 1.0,
5449 p_init_msg_list => true,
5450 --p_commit => FND_API.G_FALSE,
5451 x_return_status => l_return_status,
5452 x_msg_count => l_msg_count,
5453 --x_msg_data => l_msg_data,
5454 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5455 p_eco_revision_tbl => g_public_rev_tbl,
5456 p_revised_item_tbl => g_public_rev_item_tbl,
5457 p_rev_component_tbl => g_public_rev_comp_tbl,
5458 p_ref_designator_tbl => g_public_ref_des_tbl,
5459 p_sub_component_tbl => g_public_sub_comp_tbl,
5460 x_ECO_rec => g_public_out_eco_rec,
5461 x_eco_revision_tbl => g_public_out_rev_tbl,
5462 x_revised_item_tbl => g_public_out_rev_item_tbl,
5463 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5464 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5465 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5466 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5467 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5468 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5469 ,p_debug => 'N'
5470 ,p_debug_filename => 'bl_ut.log'
5471 ,p_output_dir => '/sqlcom/log/plm115d'
5472 --x_err_text => l_err_text--,
5473 --x_err_tbl => l_error_tbl
5474 );
5475
5476 stmt_num := 383;
5477 Eng_Globals.Clear_Request_Table;
5478 stmt_num := 384;
5479
5480 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5481 stmt_num := 390;
5482 COMMIT;
5483 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5484 stmt_num := 391;
5485 ROLLBACK;
5486 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5487 stmt_num := 392;
5488 ROLLBACK;
5489 stmt_num := 393;
5490 RAISE import_error;
5491 END IF;
5492
5493 stmt_num := 394;
5494 Update_Interface_Tables(l_return_status);
5495 stmt_num := 395;
5496 COMMIT;
5497
5498 -------------
5499 --
5500 -- Revised component exists and g_revised_comp_ifce_key is not null
5501 --
5502
5503 stmt_num := 396;
5504 ELSIF g_revised_comp_ifce_key IS NOT NULL
5505 THEN
5506 stmt_num := 397;
5507 g_revised_comps_exist := TRUE;
5508 l_top_ifce_key := g_revised_comp_ifce_key;
5509
5510 -- Pick up ref designators with revised comp ifce key = g_revised_comp_ifce_key
5511
5512 stmt_num := 398;
5513 Get_Rfds_With_Curr_Comp_Ifce;
5514
5515 -- Pick up sub components with revised comp ifce key = g_revised_comp_ifce_key
5516
5517 stmt_num := 399;
5518 Get_Sbcs_With_Curr_Comp_Ifce;
5519
5520 -- Translate parent ifce keys into parent array indexes
5521
5522 stmt_num := 400;
5523 ResolveIndexKeys;
5524
5525 -- Move all encoin data structures to public API parameter data structures
5526
5527 stmt_num := 401;
5528 Move_Encoin_Struct_To_Public;
5529
5530 -- Call Public API
5531
5532 stmt_num := 402;
5533 --dbms_output.put_line('Ifce key exists - Call Public API for comp');
5534 Eng_Eco_Pub.Process_Eco (
5535 p_api_version_number => 1.0,
5536 p_init_msg_list => true,
5537 --p_commit => FND_API.G_FALSE,
5538 x_return_status => l_return_status,
5539 x_msg_count => l_msg_count,
5540 --x_msg_data => l_msg_data,
5541 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5542 p_eco_revision_tbl => g_public_rev_tbl,
5543 p_revised_item_tbl => g_public_rev_item_tbl,
5544 p_rev_component_tbl => g_public_rev_comp_tbl,
5545 p_ref_designator_tbl => g_public_ref_des_tbl,
5546 p_sub_component_tbl => g_public_sub_comp_tbl,
5547 x_ECO_rec => g_public_out_eco_rec,
5548 x_eco_revision_tbl => g_public_out_rev_tbl,
5549 x_revised_item_tbl => g_public_out_rev_item_tbl,
5550 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5551 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5552 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5553 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5554 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5555 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5556 ,p_debug => 'N'
5557 ,p_debug_filename => 'bl_ut.log'
5558 ,p_output_dir => '/sqlcom/log/plm115d'
5559 --x_err_text => l_err_text--,
5560 --x_err_tbl => l_error_tbl
5561 );
5562
5563 stmt_num := 403;
5564 Eng_Globals.Clear_Request_Table;
5565 stmt_num := 404;
5566
5567 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5568 stmt_num := 410;
5569 COMMIT;
5570 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5571 stmt_num := 411;
5572 ROLLBACK;
5573 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5574 stmt_num := 412;
5575 ROLLBACK;
5576 stmt_num := 413;
5577 RAISE import_error;
5578 END IF;
5579
5580 stmt_num := 414;
5581 Update_Interface_Tables(l_return_status);
5582 stmt_num := 415;
5583 COMMIT;
5584
5585 END IF;
5586
5587 stmt_num := 422;
5588 l_return_status := null;
5589 l_msg_count := null;
5590 l_msg_data := null;
5591 --l_error_tbl.DELETE;
5592
5593 stmt_num := 423;
5594 Clear_Global_Data_Structures;
5595
5596 v := 0;
5597
5598 END LOOP; -- End Revised Component Object loop
5599
5600 -------------
5601 --
5602 -- Revised comp does not exist, i.e., no more revised comps exist in interface table
5603 --
5604
5605 stmt_num := 424;
5606 IF NOT g_revised_comps_exist
5607 THEN
5608
5609 -- Group ref desgs rev comp ifce keys
5610
5611 stmt_num := 425;
5612 k := 0;
5613 FOR c1rec IN GetRfdWithSameCompifce LOOP
5614 k := k + 1;
5615 g_comp_ifce_group_tbl(k) := c1rec.comp_ifce_key;
5616 END LOOP;
5617
5618 stmt_num := 426;
5619 g_ECO_ifce_key := null;
5620 g_revised_item_ifce_key := null;
5621 g_revised_comp_ifce_key := null;
5622 g_revised_items_exist := FALSE;
5623
5624 stmt_num := 427;
5625 FOR i IN 1..g_comp_ifce_group_tbl.COUNT
5626 LOOP
5627 stmt_num := 428;
5628 g_encoin_rev_item_tbl.delete;
5629 g_public_rev_tbl.delete;
5630 g_encoin_rev_comp_tbl.delete;
5631 g_encoin_ref_des_tbl.delete;
5632 g_encoin_sub_comp_tbl.delete;
5633 g_public_eco_rec := null;
5634 g_public_rev_tbl.DELETE;
5635 g_public_rev_item_tbl.DELETE;
5636 g_public_rev_comp_tbl.DELETE;
5637 g_public_sub_comp_tbl.DELETE;
5638 g_public_ref_des_tbl.DELETE;
5639 g_public_rev_op_res_tbl.DELETE;
5640 g_public_rev_operation_tbl.DELETE;
5641 g_public_lines_tbl.DELETE;
5642
5643 g_revised_comp_ifce_key := g_comp_ifce_group_tbl(i);
5644 g_revised_comps_exist := FALSE;
5645
5646 -- Pick up all reference designators with comp ifce key = g_revised_comp_ifce_key
5647
5648 stmt_num := 429;
5649 Get_Rfds_With_Curr_Comp_Ifce;
5650
5651 -- Pick up all substitute components with comp ifce key = g_revised_comp_ifce_key
5652
5653 stmt_num := 430;
5654 Get_Sbcs_With_Curr_Comp_Ifce;
5655
5656 -- Translate parent ifce keys into parent array indexes
5657
5658 stmt_num := 431;
5659 ResolveIndexKeys;
5660
5661 -- Exit loop if no records found
5662
5663 stmt_num := 432;
5664 IF g_encoin_ref_des_tbl.count = 0 AND g_encoin_sub_comp_tbl.count = 0
5665 THEN
5666 EXIT;
5667 END IF;
5668
5669 -- Move all encoin data structures to public API parameter data structures
5670
5671 stmt_num := 433;
5672 Move_Encoin_Struct_To_Public;
5673
5674 l_top_ifce_key := g_revised_comp_ifce_key;
5675
5676 -- Call Public API
5677
5678 stmt_num := 434;
5679 --dbms_output.put_line('No Comps - Call Public API with desgs starting hierarchy');
5680 Eng_Eco_Pub.Process_Eco (
5681 p_api_version_number => 1.0,
5682 p_init_msg_list => true,
5683 --p_commit => FND_API.G_FALSE,
5684 x_return_status => l_return_status,
5685 x_msg_count => l_msg_count,
5686 --x_msg_data => l_msg_data,
5687 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5688 p_eco_revision_tbl => g_public_rev_tbl,
5689 p_revised_item_tbl => g_public_rev_item_tbl,
5690 p_rev_component_tbl => g_public_rev_comp_tbl,
5691 p_ref_designator_tbl => g_public_ref_des_tbl,
5692 p_sub_component_tbl => g_public_sub_comp_tbl,
5693 x_ECO_rec => g_public_out_eco_rec,
5694 x_eco_revision_tbl => g_public_out_rev_tbl,
5695 x_revised_item_tbl => g_public_out_rev_item_tbl,
5696 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5697 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5698 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5699 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5700 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5701 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5702 ,p_debug => 'N'
5703 ,p_debug_filename => 'bl_ut.log'
5704 ,p_output_dir => '/sqlcom/log/plm115d'
5705 --x_err_text => l_err_text--,
5706 --x_err_tbl => l_error_tbl
5707 );
5708
5709 stmt_num := 435;
5710 Eng_Globals.Clear_Request_Table;
5711 stmt_num := 436;
5712
5713 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5714 stmt_num := 440;
5715 COMMIT;
5716 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5717 stmt_num := 441;
5718 ROLLBACK;
5719 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5720 stmt_num := 442;
5721 ROLLBACK;
5722 stmt_num := 443;
5723 RAISE import_error;
5724 END IF;
5725
5726 stmt_num := 444;
5727 Update_Interface_Tables(l_return_status);
5728 stmt_num := 445;
5729 COMMIT;
5730
5731 END LOOP;
5732
5733 -- Group sub comps rev item ifce keys
5734
5735 stmt_num := 453;
5736 k := 0;
5737 FOR c1rec IN GetSbcWithSameCompifce LOOP
5738 k := k + 1;
5739 g_comp_ifce_group_tbl(k) := c1rec.comp_ifce_key;
5740 END LOOP;
5741
5742 g_ECO_ifce_key := null;
5743 g_revised_item_ifce_key := null;
5744 g_revised_comp_ifce_key := null;
5745 g_revised_items_exist := FALSE;
5746
5747 stmt_num := 454;
5748 FOR i IN 1..g_comp_ifce_group_tbl.COUNT
5749 LOOP
5750 stmt_num := 455;
5751 g_encoin_rev_item_tbl.delete;
5752 g_public_rev_tbl.delete;
5753 g_encoin_rev_comp_tbl.delete;
5754 g_encoin_ref_des_tbl.delete;
5755 g_encoin_sub_comp_tbl.delete;
5756 g_public_eco_rec := null;
5757 g_public_rev_tbl.DELETE;
5758 g_public_rev_item_tbl.DELETE;
5759 g_public_rev_comp_tbl.DELETE;
5760 g_public_sub_comp_tbl.DELETE;
5761 g_public_ref_des_tbl.DELETE;
5762 g_public_rev_op_res_tbl.DELETE;
5763 g_public_rev_operation_tbl.DELETE;
5764 g_public_lines_tbl.DELETE;
5765
5766 g_revised_comp_ifce_key := g_comp_ifce_group_tbl(i);
5767 g_revised_comps_exist := FALSE;
5768
5769 -- Pick up all substitute components with comp ifce key = g_revised_comp_ifce_key
5770
5771 stmt_num := 456;
5772 Get_Sbcs_With_Curr_Comp_Ifce;
5773
5774 -- Exit loop if no records found
5775
5776 stmt_num := 457;
5777 IF g_encoin_sub_comp_tbl.count = 0
5778 THEN
5779 EXIT;
5780 END IF;
5781
5782 l_top_ifce_key := g_revised_comp_ifce_key;
5783
5784 -- Move all encoin data structures to public API parameter data structures
5785
5786 stmt_num := 458;
5787 Move_Encoin_Struct_To_Public;
5788
5789 -- Call Public API
5790
5791 stmt_num := 459;
5792 --dbms_output.put_line('No Comps - Call Public API with sbcs starting hierarchy');
5793 Eng_Eco_Pub.Process_Eco (
5794 p_api_version_number => 1.0,
5795 p_init_msg_list => true,
5796 --p_commit => FND_API.G_FALSE,
5797 x_return_status => l_return_status,
5798 x_msg_count => l_msg_count,
5799 --x_msg_data => l_msg_data,
5800 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5801 p_eco_revision_tbl => g_public_rev_tbl,
5802 p_revised_item_tbl => g_public_rev_item_tbl,
5803 p_rev_component_tbl => g_public_rev_comp_tbl,
5804 p_ref_designator_tbl => g_public_ref_des_tbl,
5805 p_sub_component_tbl => g_public_sub_comp_tbl,
5806 x_ECO_rec => g_public_out_eco_rec,
5807 x_eco_revision_tbl => g_public_out_rev_tbl,
5808 x_revised_item_tbl => g_public_out_rev_item_tbl,
5809 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5810 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5811 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5812 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5813 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5814 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5815 ,p_debug => 'N'
5816 ,p_debug_filename => 'bl_ut.log'
5817 ,p_output_dir => '/sqlcom/log/plm115d'
5818 --x_err_text => l_err_text--,
5819 --x_err_tbl => l_error_tbl
5820 );
5821
5822 stmt_num := 460;
5823 Eng_Globals.Clear_Request_Table;
5824 stmt_num := 461;
5825
5826 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5827 stmt_num := 470;
5828 COMMIT;
5829 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5830 stmt_num := 471;
5831 ROLLBACK;
5832 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5833 stmt_num := 472;
5834 ROLLBACK;
5835 stmt_num := 473;
5836 RAISE import_error;
5837 END IF;
5838
5839 stmt_num := 474;
5840 Update_Interface_Tables(l_return_status);
5841 stmt_num := 475;
5842 COMMIT;
5843
5844 END LOOP;
5845 END IF;
5846
5847 -- ******************** REFERENCE DESIGNATOR BUSINESS OBJECT *****************
5848
5849 stmt_num := 475;
5850 l_return_status := null;
5851 l_msg_count := null;
5852 l_msg_data := null;
5853 --l_error_tbl.DELETE;
5854
5855 stmt_num := 475.5;
5856 Clear_Global_Data_Structures;
5857
5858 FOR c15rec IN GetRfd LOOP
5859 stmt_num := 476;
5860 y := 1;
5861 g_revised_comp_ifce_key := c15rec.bom_inventory_comps_ifce_key;
5862 g_public_ref_des_tbl.DELETE(y);
5863 g_public_ref_des_tbl(y).Reference_Designator_Name := c15rec.COMPONENT_REFERENCE_DESIGNATOR;
5864 -- g_public_ref_des_tbl(y).last_update_date := c15rec.last_update_date;
5865 -- g_public_ref_des_tbl(y).last_updated_by := c15rec.last_updated_by;
5866 -- g_public_ref_des_tbl(y).creation_date := c15rec.creation_date;
5867 -- g_public_ref_des_tbl(y).created_by := c15rec.created_by;
5868 -- g_public_ref_des_tbl(y).last_update_login := c15rec.last_update_login;
5869 g_public_ref_des_tbl(y).ref_designator_comment := c15rec.ref_designator_comment;
5870 g_public_ref_des_tbl(y).Eco_Name := c15rec.change_notice;
5871 -- g_public_ref_des_tbl(y).component_sequence_id := c15rec.component_sequence_id;
5872 g_public_ref_des_tbl(y).acd_type := c15rec.acd_type;
5873 -- g_public_ref_des_tbl(y).request_id := c15rec.request_id;
5874 -- g_public_ref_des_tbl(y).program_application_id := c15rec.program_application_id;
5875 -- g_public_ref_des_tbl(y).program_id := c15rec.program_id;
5876 -- g_public_ref_des_tbl(y).program_update_date := c15rec.program_update_date;
5877 g_public_ref_des_tbl(y).attribute_category := c15rec.attribute_category;
5878 g_public_ref_des_tbl(y).attribute1 := c15rec.attribute1;
5879 g_public_ref_des_tbl(y).attribute2 := c15rec.attribute2;
5880 g_public_ref_des_tbl(y).attribute3 := c15rec.attribute3;
5881 g_public_ref_des_tbl(y).attribute4 := c15rec.attribute4;
5882 g_public_ref_des_tbl(y).attribute5 := c15rec.attribute5;
5883 g_public_ref_des_tbl(y).attribute6 := c15rec.attribute6;
5884 g_public_ref_des_tbl(y).attribute7 := c15rec.attribute7;
5885 g_public_ref_des_tbl(y).attribute8 := c15rec.attribute8;
5886 g_public_ref_des_tbl(y).attribute9 := c15rec.attribute9;
5887 g_public_ref_des_tbl(y).attribute10 := c15rec.attribute10;
5888 g_public_ref_des_tbl(y).attribute11 := c15rec.attribute11;
5889 g_public_ref_des_tbl(y).attribute12 := c15rec.attribute12;
5890 g_public_ref_des_tbl(y).attribute13 := c15rec.attribute13;
5891 g_public_ref_des_tbl(y).attribute14 := c15rec.attribute14;
5892 g_public_ref_des_tbl(y).attribute15 := c15rec.attribute15;
5893 g_public_ref_des_tbl(y).New_Reference_Designator := c15rec.new_designator;
5894 -- g_public_ref_des_tbl(y).process_flag := c15rec.process_flag;
5895 g_public_ref_des_tbl(y).Row_Identifier := c15rec.transaction_id;
5896 g_public_ref_des_tbl(y).revised_ITEM_name := c15rec.ASSEMBLY_ITEM_NUMBER;
5897 g_public_ref_des_tbl(y).Component_Item_Name := c15rec.COMPONENT_ITEM_NUMBER;
5898 g_public_ref_des_tbl(y).ORGANIZATION_CODE := c15rec.ORGANIZATION_CODE;
5899 -- g_public_ref_des_tbl(y).ORGANIZATION_ID := c15rec.ORGANIZATION_ID;
5900 -- g_public_ref_des_tbl(y).ASSEMBLY_ITEM_ID := c15rec.ASSEMBLY_ITEM_ID;
5901 g_public_ref_des_tbl(y).Alternate_Bom_Code := c15rec.ALTERNATE_BOM_DESIGNATOR;
5902 -- g_public_ref_des_tbl(y).COMPONENT_ITEM_ID := c15rec.COMPONENT_ITEM_ID;
5903 -- g_public_ref_des_tbl(y).BILL_SEQUENCE_ID := c15rec.BILL_SEQUENCE_ID;
5904 g_public_ref_des_tbl(y).Operation_Sequence_Number := c15rec.OPERATION_SEQ_NUM;
5905 g_public_ref_des_tbl(y).Start_Effective_Date := c15rec.EFFECTIVITY_DATE;
5906 -- g_public_ref_des_tbl(y).interface_entity_type := c15rec.interface_entity_type;
5907 g_public_ref_des_tbl(y).Transaction_Type := c15rec.transaction_type;
5908 --Bug 3396529: Added New_revised_Item_Revision
5909 g_public_ref_des_tbl(y).New_revised_Item_Revision := c15rec.New_revised_Item_Revision;
5910
5911
5912 stmt_num := 478;
5913 --dbms_output.put_line('Call Public API for Reference Designator entity');
5914 Eng_Eco_Pub.Process_Eco (
5915 p_api_version_number => 1.0,
5916 p_init_msg_list => true,
5917 --p_commit => FND_API.G_FALSE,
5918 x_return_status => l_return_status,
5919 x_msg_count => l_msg_count,
5920 --x_msg_data => l_msg_data,
5921 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
5922 p_eco_revision_tbl => g_public_rev_tbl,
5923 p_revised_item_tbl => g_public_rev_item_tbl,
5924 p_rev_component_tbl => g_public_rev_comp_tbl,
5925 p_ref_designator_tbl => g_public_ref_des_tbl,
5926 p_sub_component_tbl => g_public_sub_comp_tbl,
5927 x_ECO_rec => g_public_out_eco_rec,
5928 x_eco_revision_tbl => g_public_out_rev_tbl,
5929 x_revised_item_tbl => g_public_out_rev_item_tbl,
5930 x_rev_component_tbl => g_public_out_rev_comp_tbl,
5931 x_ref_designator_tbl => g_public_out_ref_des_tbl,
5932 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
5933 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
5934 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
5935 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
5936 ,p_debug => 'N'
5937 ,p_debug_filename => 'bl_ut.log'
5938 ,p_output_dir => '/sqlcom/log/plm115d'
5939 --x_err_text => l_err_text--,
5940 --x_err_tbl => l_error_tbl
5941 );
5942
5943 stmt_num := 479;
5944 Eng_Globals.Clear_Request_Table;
5945 stmt_num := 480;
5946
5947 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5948 stmt_num := 480;
5949 COMMIT;
5950 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5951 stmt_num := 481;
5952 ROLLBACK;
5953 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5954 stmt_num := 482;
5955 ROLLBACK;
5956 stmt_num := 483;
5957 RAISE import_error;
5958 END IF;
5959
5960 stmt_num := 484;
5961 Update_Interface_Tables(l_return_status);
5962 stmt_num := 485;
5963 COMMIT;
5964
5965 stmt_num := 486;
5966 l_return_status := null;
5967 l_msg_count := null;
5968 l_msg_data := null;
5969 --l_error_tbl.DELETE;
5970
5971 stmt_num := 487;
5972 Clear_Global_Data_Structures;
5973
5974 END LOOP; -- END REF DES LOOP
5975
5976 -- ****************** SUBSTITUTE COMPONENT BUSINESS OBJECT *****************
5977
5978 stmt_num := 494;
5979 l_return_status := null;
5980 l_msg_count := null;
5981 l_msg_data := null;
5982 --l_error_tbl.DELETE;
5983
5984 stmt_num := 494.5;
5985 Clear_Global_Data_Structures;
5986
5987 FOR c16rec IN GetSbc LOOP
5988 stmt_num := 495;
5989 z := 1;
5990 g_public_sub_comp_tbl.DELETE(z);
5991 -- g_public_sub_comp_tbl(z).substitute_component_id := c16rec.substitute_component_id;
5992 -- g_public_sub_comp_tbl(z).last_update_date := c16rec.last_update_date;
5993 -- g_public_sub_comp_tbl(z).last_updated_by := c16rec.last_updated_by;
5994 -- g_public_sub_comp_tbl(z).creation_date := c16rec.creation_date;
5995 -- g_public_sub_comp_tbl(z).created_by := c16rec.created_by;
5996 -- g_public_sub_comp_tbl(z).last_update_login := c16rec.last_update_login;
5997 g_public_sub_comp_tbl(z).substitute_item_quantity := c16rec.substitute_item_quantity;
5998 -- g_public_sub_comp_tbl(z).component_sequence_id := c16rec.component_sequence_id;
5999 g_public_sub_comp_tbl(z).acd_type := c16rec.acd_type;
6000 g_public_sub_comp_tbl(z).eco_name := c16rec.change_notice;
6001 -- g_public_sub_comp_tbl(z).request_id := c16rec.request_id;
6002 -- g_public_sub_comp_tbl(z).program_application_id := c16rec.program_application_id;
6003 -- g_public_sub_comp_tbl(z).program_update_date := c16rec.program_update_date;
6004 g_public_sub_comp_tbl(z).attribute_category := c16rec.attribute_category;
6005 g_public_sub_comp_tbl(z).attribute1 := c16rec.attribute1;
6006 g_public_sub_comp_tbl(z).attribute1 := c16rec.attribute2;
6007 g_public_sub_comp_tbl(z).attribute1 := c16rec.attribute4;
6008 g_public_sub_comp_tbl(z).attribute1 := c16rec.attribute5;
6009 g_public_sub_comp_tbl(z).attribute1 := c16rec.attribute6;
6010 g_public_sub_comp_tbl(z).attribute8 := c16rec.attribute8;
6011 g_public_sub_comp_tbl(z).attribute9 := c16rec.attribute9;
6012 g_public_sub_comp_tbl(z).attribute10 := c16rec.attribute10;
6013 g_public_sub_comp_tbl(z).attribute12 := c16rec.attribute12;
6014 g_public_sub_comp_tbl(z).attribute13 := c16rec.attribute13;
6015 g_public_sub_comp_tbl(z).attribute14 := c16rec.attribute14;
6016 g_public_sub_comp_tbl(z).attribute15 := c16rec.attribute15;
6017 g_public_sub_comp_tbl(z).program_id := c16rec.program_id;
6018 g_public_sub_comp_tbl(z).attribute3 := c16rec.attribute3;
6019 g_public_sub_comp_tbl(z).attribute7 := c16rec.attribute7;
6020 g_public_sub_comp_tbl(z).attribute11 := c16rec.attribute11;
6021 -- g_public_sub_comp_tbl(z).new_sub_comp_id := c16rec.new_sub_comp_id;
6022 -- g_public_sub_comp_tbl(z).process_flag := c16rec.process_flag;
6023 g_public_sub_comp_tbl(z).row_identifier := c16rec.transaction_id;
6024 -- g_public_sub_comp_tbl(z).NEW_SUB_COMP_NUMBER := c16rec.NEW_SUB_COMP_NUMBER;
6025 g_public_sub_comp_tbl(z).revised_ITEM_name := c16rec.ASSEMBLY_ITEM_NUMBER;
6026 g_public_sub_comp_tbl(z).COMPONENT_ITEM_NAME := c16rec.COMPONENT_ITEM_NUMBER;
6027 g_public_sub_comp_tbl(z).Substitute_Component_Name := c16rec.SUBSTITUTE_COMP_NUMBER;
6028 g_public_sub_comp_tbl(z).ORGANIZATION_CODE := c16rec.ORGANIZATION_CODE;
6029 -- g_public_sub_comp_tbl(z).ORGANIZATION_ID := c16rec.ORGANIZATION_ID;
6030 -- g_public_sub_comp_tbl(z).ASSEMBLY_ITEM_ID := c16rec.ASSEMBLY_ITEM_ID;
6031 g_public_sub_comp_tbl(z).ALTERNATE_BOM_code := c16rec.ALTERNATE_BOM_DESIGNATOR;
6032 -- g_public_sub_comp_tbl(z).COMPONENT_ITEM_ID := c16rec.COMPONENT_ITEM_ID;
6033 -- g_public_sub_comp_tbl(z).BILL_SEQUENCE_ID := c16rec.BILL_SEQUENCE_ID;
6034 g_public_sub_comp_tbl(z).Operation_Sequence_Number := c16rec.OPERATION_SEQ_NUM;
6035 g_public_sub_comp_tbl(z).Start_Effective_Date := c16rec.EFFECTIVITY_DATE;
6036 -- g_public_sub_comp_tbl(z).interface_entity_type := c16rec.interface_entity_type;
6037 g_public_sub_comp_tbl(z).transaction_type := c16rec.transaction_type;
6038 --Bug 3396529: Added New_revised_Item_Revision
6039 g_public_sub_comp_tbl(z).New_revised_Item_Revision := c16rec.New_revised_Item_Revision;
6040
6041 stmt_num := 497;
6042 --dbms_output.put_line('Call Public API from Substitute Component entity');
6043 Eng_Eco_Pub.Process_Eco (
6044 p_api_version_number => 1.0,
6045 p_init_msg_list => true,
6046 --p_commit => FND_API.G_FALSE,
6047 x_return_status => l_return_status,
6048 x_msg_count => l_msg_count,
6049 --x_msg_data => l_msg_data,
6050 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
6051 p_eco_revision_tbl => g_public_rev_tbl,
6052 p_revised_item_tbl => g_public_rev_item_tbl,
6053 p_rev_component_tbl => g_public_rev_comp_tbl,
6054 p_ref_designator_tbl => g_public_ref_des_tbl,
6055 p_sub_component_tbl => g_public_sub_comp_tbl,
6056 x_ECO_rec => g_public_out_eco_rec,
6057 x_eco_revision_tbl => g_public_out_rev_tbl,
6058 x_revised_item_tbl => g_public_out_rev_item_tbl,
6059 x_rev_component_tbl => g_public_out_rev_comp_tbl,
6060 x_ref_designator_tbl => g_public_out_ref_des_tbl,
6061 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
6062 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
6063 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
6064 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
6065 ,p_debug => 'N'
6066 ,p_debug_filename => 'bl_ut.log'
6067 ,p_output_dir => '/sqlcom/log/plm115d'
6068 --x_err_text => l_err_text--,
6069 --x_err_tbl => l_error_tbl
6070 );
6071
6072 stmt_num := 498;
6073 Eng_Globals.Clear_Request_Table;
6074 stmt_num := 499;
6075
6076 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
6077 stmt_num := 500;
6078 COMMIT;
6079 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6080 stmt_num := 501;
6081 ROLLBACK;
6082 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
6083 stmt_num := 502;
6084 ROLLBACK;
6085 stmt_num := 503;
6086 RAISE import_error;
6087 END IF;
6088
6089 stmt_num := 504;
6090 Update_Interface_Tables(l_return_status);
6091 stmt_num := 505;
6092 COMMIT;
6093
6094 stmt_num := 512.5;
6095 l_return_status := null;
6096 l_msg_count := null;
6097 l_msg_data := null;
6098 --l_error_tbl.DELETE;
6099
6100 stmt_num := 512.7;
6101 Clear_Global_Data_Structures;
6102
6103 END LOOP; -- END SUB COMP LOOP
6104
6105
6106 -- ******************** DELETE PROCESSED ROWS ****************************
6107
6108 stmt_num := 513;
6109 IF (p_del_rec_flag = 1) THEN
6110 LOOP
6111 DELETE from eng_eng_changes_interface
6112 WHERE process_flag = 7
6113 AND rownum < G_ROWS_TO_COMMIT;
6114
6115 EXIT when SQL%NOTFOUND;
6116 COMMIT;
6117 END LOOP;
6118
6119 stmt_num := 514;
6120 LOOP
6121 DELETE from eng_eco_revisions_interface
6122 WHERE process_flag = 7
6123 AND rownum < G_ROWS_TO_COMMIT;
6124
6125 EXIT when SQL%NOTFOUND;
6126 COMMIT;
6127 END LOOP;
6128
6129 stmt_num := 515;
6130 LOOP
6131 DELETE from eng_revised_items_interface
6132 WHERE process_flag = 7
6133 AND rownum < G_ROWS_TO_COMMIT;
6134
6135 EXIT when SQL%NOTFOUND;
6136 COMMIT;
6137 END LOOP;
6138
6139 stmt_num := 516;
6140 LOOP
6141 DELETE from bom_inventory_comps_interface
6142 WHERE process_flag = 7
6143 AND rownum < G_ROWS_TO_COMMIT;
6144
6145 EXIT when SQL%NOTFOUND;
6146 COMMIT;
6147 END LOOP;
6148
6149 stmt_num := 517;
6150 LOOP
6151 DELETE from bom_ref_desgs_interface
6152 WHERE process_flag = 7
6153 AND rownum < G_ROWS_TO_COMMIT;
6154
6155 EXIT when SQL%NOTFOUND;
6156 COMMIT;
6157 END LOOP;
6158
6159 stmt_num := 518;
6160 LOOP
6161 DELETE from bom_sub_comps_interface
6162 WHERE process_flag = 7
6163 AND rownum < G_ROWS_TO_COMMIT;
6164
6165 EXIT when SQL%NOTFOUND;
6166 COMMIT;
6167 END LOOP;
6168
6169 stmt_num := 519;
6170 LOOP
6171 DELETE from eng_change_lines_interface
6172 WHERE process_flag = 7
6173 AND rownum < G_ROWS_TO_COMMIT;
6174
6175 EXIT when SQL%NOTFOUND;
6176 COMMIT;
6177 END LOOP;
6178
6179 stmt_num := 520;
6180 LOOP
6181 DELETE from bom_op_sequences_interface
6182 WHERE process_flag = 7
6183 AND rownum < G_ROWS_TO_COMMIT;
6184
6185 EXIT when SQL%NOTFOUND;
6186 COMMIT;
6187 END LOOP;
6188
6189 stmt_num := 521;
6190 LOOP
6191 DELETE from bom_op_resources_interface
6192 WHERE process_flag = 7
6193 AND rownum < G_ROWS_TO_COMMIT;
6194
6195 EXIT when SQL%NOTFOUND;
6196 COMMIT;
6197 END LOOP;
6198 stmt_num := 522;
6199 LOOP
6200 DELETE from bom_sub_op_resources_interface
6201 WHERE process_flag = 7
6202 AND rownum < G_ROWS_TO_COMMIT;
6203
6204 EXIT when SQL%NOTFOUND;
6205 COMMIT;
6206 END LOOP;
6207
6208 END IF;
6209
6210 -- sync intermedia index
6211 stmt_num := 523;
6212 BEGIN
6213 ENG_CHANGE_TEXT_UTIL.Sync_Index ( p_idx_name => 'ENG_CHANGE_IMTEXT_TL_CTX1' );
6214 EXCEPTION
6215 WHEN others THEN
6216 NULL;
6217 END;
6218
6219 ERRBUF := FND_MESSAGE.Get_String('ENG', 'ENG_ECOOI_SUCCEEDED');
6220 RETCODE := G_SUCCESS;
6221 --Bug 2818039
6222 ENG_GLOBALS.G_ENG_LAUNCH_IMPORT := 0;
6223 EXCEPTION
6224 WHEN import_error THEN
6225 --Bug No: 3737881
6226 ENG_GLOBALS.G_ENG_LAUNCH_IMPORT := 0;
6227 --dbms_output.put_line('Import_Error exception handler');
6228 RETCODE := G_ERROR;
6229 ERRBUF := FND_MESSAGE.Get_String('ENG', 'ENG_ECOOI_FAILED');
6230
6231 MRP_UTIL.MRP_LOG('ENG_LAUNCH_ECO_OI_PK.Eng_Launch_Import('||
6232 to_char(stmt_num)||') ');
6233 FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
6234 MRP_UTIL.MRP_LOG(l_unexp_error);
6235 WHEN others THEN
6236 --Bug No: 3737881
6237 ENG_GLOBALS.G_ENG_LAUNCH_IMPORT := 0;
6238 --dbms_output.put_line('Others exception handler - stmt num : ' || to_char(stmt_num));
6239 --dbms_output.put_line('SQL error is '||SQLERRM);
6240 RETCODE := G_ERROR;
6241 ERRBUF := FND_MESSAGE.Get_String('ENG', 'ENG_ECOOI_FAILED');
6242
6243 MRP_UTIL.Mrp_Log('ENG_LAUNCH_ECO_OI_PK.Eng_Launch_Import('||
6244 to_char(stmt_num)||') ');
6245 FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
6246 MRP_UTIL.MRP_LOG(SQLERRM);
6247 END Eng_Launch_Import;
6248
6249 --Added for PLM Changemanagement Bulkload RevisedItems.
6250 PROCEDURE Eng_Launch_RevisedItems_Import (
6251 ERRBUF OUT NOCOPY VARCHAR2,
6252 RETCODE OUT NOCOPY NUMBER,
6253 p_org_id NUMBER,
6254 p_all_org NUMBER ,
6255 p_del_rec_flag NUMBER )
6256 IS
6257 stmt_num NUMBER;
6258 l_prog_appid NUMBER;
6259 l_prog_id NUMBER;
6260 l_request_id NUMBER;
6261 l_user_id NUMBER;
6262 l_login_id NUMBER;
6263
6264 l_return_status VARCHAR2(1);
6265 l_msg_count NUMBER;
6266 l_msg_data VARCHAR2(2000);
6267 l_unexp_error VARCHAR2(1000);
6268 l_transaction_id NUMBER;
6269 -- l_error_tbl ENG_Eco_PUB.Error_Tbl_Type;
6270 -- l_log_msg VARCHAR2(2000);
6271 -- l_err_text VARCHAR2(2000);
6272
6273 r NUMBER := 0;
6274 import_error EXCEPTION;
6275 l_process_flag NUMBER;
6276
6277 --Process only the records which are inserted from PLM i.e -999.
6278
6279 CURSOR GetItem
6280 IS
6281 SELECT change_notice ,
6282 organization_id ,
6283 revised_item_id ,
6284 last_update_date ,
6285 last_updated_by ,
6286 creation_date ,
6287 created_by ,
6288 last_update_login ,
6289 implementation_date ,
6290 cancellation_date ,
6291 cancel_comments ,
6292 disposition_type ,
6293 new_item_revision ,
6294 early_schedule_date ,
6295 attribute_category ,
6296 attribute2 ,
6297 attribute3 ,
6298 attribute4 ,
6299 attribute5 ,
6300 attribute7 ,
6301 attribute8 ,
6302 attribute9 ,
6303 attribute11 ,
6304 attribute12 ,
6305 attribute13 ,
6306 attribute14 ,
6307 attribute15 ,
6308 status_type ,
6309 scheduled_date ,
6310 bill_sequence_id ,
6311 mrp_active ,
6312 request_id ,
6313 program_application_id ,
6314 program_id ,
6315 program_update_date ,
6316 update_wip ,
6317 use_up ,
6318 use_up_item_id ,
6319 revised_item_sequence_id ,
6320 use_up_plan_name ,
6321 descriptive_text ,
6322 auto_implement_date ,
6323 attribute1 ,
6324 attribute6 ,
6325 attribute10 ,
6326 requestor_id ,
6327 comments ,
6328 1 process_flag ,
6329 transaction_id ,
6330 organization_code ,
6331 revised_item_number ,
6332 new_rtg_revision ,
6333 use_up_item_number ,
6334 alternate_bom_designator ,
6335 transaction_type ,
6336 ENG_REVISED_ITEMS_IFCE_KEY,
6337 eng_changes_ifce_key ,
6338 parent_revised_item_name ,
6339 parent_alternate_name ,
6340 updated_item_revision ,
6341 New_scheduled_date -- Bug 3432944
6342 ,
6343 from_item_revision -- 11.5.10E
6344 ,
6345 new_revision_label ,
6346 New_Revised_Item_Rev_Desc ,
6347 new_revision_reason ,
6348 from_end_item_unit_number
6349 FROM eng_revised_items_interface
6350 WHERE process_flag = -999
6351 AND (g_all_org = 1
6352 OR (g_all_org = 2
6353 AND organization_id = g_org_id))
6354 ORDER BY parent_revised_item_name desc ;
6355
6356 BEGIN
6357 -- *************************** REVISED ITEM BUSINESS OBJECT **************************
6358 r := 0;
6359
6360 stmt_num := 1;
6361 l_prog_appid := FND_GLOBAL.PROG_APPL_ID;
6362 l_prog_id := FND_GLOBAL.CONC_PROGRAM_ID;
6363 l_request_id := FND_GLOBAL.CONC_REQUEST_ID;
6364 l_user_id := FND_GLOBAL.USER_ID;
6365 l_login_id := FND_GLOBAL.LOGIN_ID;
6366
6367 g_all_org := p_all_org;
6368 g_org_id := p_org_id;
6369
6370 --dbms_output.put_line('Who record initiation');
6371 stmt_num := 2;
6372 ENG_GLOBALS.Init_Who_Rec(p_org_id => p_org_id,
6373 p_user_id => l_user_id,
6374 p_login_id => l_login_id,
6375 p_prog_appid => l_prog_appid,
6376 p_prog_id => l_prog_id,
6377 p_req_id => l_request_id);
6378
6379 ENG_GLOBALS.G_ENG_LAUNCH_IMPORT := 1;
6380
6381 stmt_num := 240;
6382 l_return_status := null;
6383 l_msg_count := null;
6384 l_msg_data := null;
6385 --l_error_tbl.DELETE;
6386
6387 stmt_num := 240.5;
6388 Clear_Global_Data_Structures;
6389
6390 stmt_num := 241;
6391 FOR c8rec IN GetItem LOOP
6392
6393 -- Pick up one revised item record
6394 stmt_num := 242;
6395 r := r + 1;
6396 g_encoin_rev_item_tbl(r).change_notice := c8rec.change_notice;
6397 g_encoin_rev_item_tbl(r).organization_id := c8rec.organization_id;
6398 g_encoin_rev_item_tbl(r).revised_item_id := c8rec.revised_item_id;
6399 g_encoin_rev_item_tbl(r).last_update_date := c8rec.last_update_date;
6400 g_encoin_rev_item_tbl(r).last_updated_by := c8rec.last_updated_by;
6401 g_encoin_rev_item_tbl(r).creation_date := c8rec.creation_date;
6402 g_encoin_rev_item_tbl(r).created_by := c8rec.created_by;
6403 g_encoin_rev_item_tbl(r).last_update_login := c8rec.last_update_login;
6404 g_encoin_rev_item_tbl(r).implementation_date := c8rec.implementation_date;
6405 g_encoin_rev_item_tbl(r).cancellation_date := c8rec.cancellation_date;
6406 g_encoin_rev_item_tbl(r).cancel_comments := c8rec.cancel_comments;
6407 g_encoin_rev_item_tbl(r).disposition_type := c8rec.disposition_type;
6408 g_encoin_rev_item_tbl(r).new_item_revision := c8rec.new_item_revision;
6409 g_encoin_rev_item_tbl(r).early_schedule_date := c8rec.early_schedule_date;
6410 g_encoin_rev_item_tbl(r).attribute_category := c8rec.attribute_category;
6411 g_encoin_rev_item_tbl(r).attribute2 := c8rec.attribute2;
6412 g_encoin_rev_item_tbl(r).attribute3 := c8rec.attribute3;
6413 g_encoin_rev_item_tbl(r).attribute4 := c8rec.attribute4;
6414 g_encoin_rev_item_tbl(r).attribute5 := c8rec.attribute5;
6415 g_encoin_rev_item_tbl(r).attribute7 := c8rec.attribute7;
6416 g_encoin_rev_item_tbl(r).attribute8 := c8rec.attribute8;
6417 g_encoin_rev_item_tbl(r).attribute9 := c8rec.attribute9;
6418 g_encoin_rev_item_tbl(r).attribute11 := c8rec.attribute11;
6419 g_encoin_rev_item_tbl(r).attribute12 := c8rec.attribute12;
6420 g_encoin_rev_item_tbl(r).attribute13 := c8rec.attribute13;
6421 g_encoin_rev_item_tbl(r).attribute14 := c8rec.attribute14;
6422 g_encoin_rev_item_tbl(r).attribute15 := c8rec.attribute15;
6423 g_encoin_rev_item_tbl(r).status_type := c8rec.status_type;
6424 g_encoin_rev_item_tbl(r).scheduled_date := c8rec.scheduled_date;
6425 g_encoin_rev_item_tbl(r).bill_sequence_id := c8rec.bill_sequence_id;
6426 g_encoin_rev_item_tbl(r).mrp_active := c8rec.mrp_active;
6427 g_encoin_rev_item_tbl(r).request_id := c8rec.request_id;
6428 g_encoin_rev_item_tbl(r).program_application_id := c8rec.program_application_id;
6429 g_encoin_rev_item_tbl(r).program_id := c8rec.program_id;
6430 g_encoin_rev_item_tbl(r).program_update_date := c8rec.program_update_date;
6431 g_encoin_rev_item_tbl(r).update_wip := c8rec.update_wip;
6432 g_encoin_rev_item_tbl(r).use_up := c8rec.use_up;
6433 g_encoin_rev_item_tbl(r).use_up_item_id := c8rec.use_up_item_id;
6434 g_encoin_rev_item_tbl(r).revised_item_sequence_id := c8rec.revised_item_sequence_id;
6435 g_encoin_rev_item_tbl(r).use_up_plan_name := c8rec.use_up_plan_name;
6436 g_encoin_rev_item_tbl(r).descriptive_text := c8rec.descriptive_text;
6437 g_encoin_rev_item_tbl(r).auto_implement_date := c8rec.auto_implement_date;
6438 g_encoin_rev_item_tbl(r).attribute1 := c8rec.attribute1;
6439 g_encoin_rev_item_tbl(r).attribute6 := c8rec.attribute6;
6440 g_encoin_rev_item_tbl(r).attribute10 := c8rec.attribute10;
6441 g_encoin_rev_item_tbl(r).requestor_id := c8rec.requestor_id;
6442 g_encoin_rev_item_tbl(r).comments := c8rec.comments;
6443 g_encoin_rev_item_tbl(r).process_flag := c8rec.process_flag;
6444 g_encoin_rev_item_tbl(r).transaction_id := c8rec.transaction_id;
6445 l_transaction_id := g_encoin_rev_item_tbl(r).transaction_id;
6446 g_encoin_rev_item_tbl(r).organization_code := c8rec.organization_code;
6447 g_encoin_rev_item_tbl(r).revised_item_number := c8rec.revised_item_number;
6448 g_encoin_rev_item_tbl(r).new_rtg_revision := c8rec.new_rtg_revision;
6449 g_encoin_rev_item_tbl(r).use_up_item_number := c8rec.use_up_item_number;
6450 g_encoin_rev_item_tbl(r).alternate_bom_designator := c8rec.alternate_bom_designator;
6451 g_encoin_rev_item_tbl(r).operation := c8rec.transaction_type;
6452 g_encoin_rev_item_tbl(r).ENG_REVISED_ITEMS_IFCE_KEY := c8rec.ENG_REVISED_ITEMS_IFCE_KEY;
6453 g_revised_item_ifce_key := g_encoin_rev_item_tbl(r).ENG_REVISED_ITEMS_IFCE_KEY;
6454 g_encoin_rev_item_tbl(r).parent_revised_item_name := c8rec.parent_revised_item_name;
6455 g_encoin_rev_item_tbl(r).parent_alternate_name := c8rec.parent_alternate_name;
6456 g_encoin_rev_item_tbl(r).updated_item_revision := c8rec.updated_item_revision; -- Bug 3432944
6457 g_encoin_rev_item_tbl(r).New_scheduled_date := c8rec.New_scheduled_date; -- Bug 3432944
6458 g_encoin_rev_item_tbl(r).from_item_revision := c8rec.from_item_revision; -- 11.5.10E
6459 g_encoin_rev_item_tbl(r).new_revision_label := c8rec.new_revision_label;
6460 g_encoin_rev_item_tbl(r).New_Revised_Item_Rev_Desc := c8rec.New_Revised_Item_Rev_Desc;
6461 g_encoin_rev_item_tbl(r).new_revision_reason := c8rec.new_revision_reason;
6462 g_encoin_rev_item_tbl(r).from_end_item_unit_number := c8rec.from_end_item_unit_number; /*Bug 6377841*/
6463 -------------
6464 --
6465 -- Revised item exists, but it doesn't have an IFCE key entry
6466 --
6467 stmt_num := 243;
6468 g_revised_items_exist := TRUE;
6469
6470 -- Move all encoin data structures to public API parameter data structures
6471
6472 stmt_num := 244;
6473 Move_Encoin_Struct_To_Public;
6474
6475 stmt_num := 245;
6476 Eng_Eco_Pub.Process_Eco (
6477 p_api_version_number => 1.0,
6478 p_init_msg_list => true,
6479 --p_commit => FND_API.G_FALSE,
6480 x_return_status => l_return_status,
6481 x_msg_count => l_msg_count,
6482 --x_msg_data => l_msg_data,
6483 p_ECO_rec => ENG_ECO_PUB.G_MISS_ECO_REC,
6484 p_eco_revision_tbl => g_public_rev_tbl,
6485 p_revised_item_tbl => g_public_rev_item_tbl,
6486 p_rev_component_tbl => g_public_rev_comp_tbl,
6487 p_ref_designator_tbl => g_public_ref_des_tbl,
6488 p_sub_component_tbl => g_public_sub_comp_tbl,
6489 x_ECO_rec => g_public_out_eco_rec,
6490 x_eco_revision_tbl => g_public_out_rev_tbl,
6491 x_revised_item_tbl => g_public_out_rev_item_tbl,
6492 x_rev_component_tbl => g_public_out_rev_comp_tbl,
6493 x_ref_designator_tbl => g_public_out_ref_des_tbl,
6494 x_sub_component_tbl => g_public_out_sub_comp_tbl--,
6495 , x_rev_operation_tbl => g_public_out_rev_operation_tbl
6496 , x_rev_op_resource_tbl => g_public_out_rev_op_res_tbl
6497 , x_rev_sub_resource_tbl => g_public_out_rev_sub_res_tbl
6498 ,p_debug => 'N'
6499 ,p_debug_filename => 'bl_ut.log'
6500 ,p_output_dir => '/sqlcom/log/plm115d'
6501 --x_err_text => l_err_text--,
6502 --x_err_tbl => l_error_tbl
6503 );
6504
6505 stmt_num := 245;
6506 Eng_Globals.Clear_Request_Table;
6507 stmt_num := 246;
6508
6509 IF (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
6510 stmt_num := 250;
6511 COMMIT;
6512 ELSIF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6513 stmt_num := 251;
6514 ROLLBACK;
6515 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
6516 stmt_num := 252;
6517 ROLLBACK;
6518 stmt_num := 253;
6519 RAISE import_error;
6520 END IF;
6521
6522 stmt_num := 254;
6523 -- ******************** UPDATE PROCESSED ROWS **************************
6524
6525 IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
6526 l_process_flag := G_PF_SUCCESS;
6527 ELSE
6528 l_process_flag := G_PF_ERROR;
6529 END IF;
6530
6531 UPDATE ENG_REVISED_ITEMS_INTERFACE
6532 SET PROCESS_FLAG = l_process_flag
6533 WHERE TRANSACTION_ID = l_transaction_id;
6534
6535 stmt_num := 255;
6536 --Bug No:3902450 :Added as the error was not getting inserted when new rev was required in import.
6537 Error_Handler.WRITE_TO_INTERFACETABLE;
6538 stmt_num := 256;
6539 COMMIT;
6540
6541 stmt_num := 291;
6542 l_return_status := null;
6543 l_msg_count := null;
6544 l_msg_data := null;
6545 --l_error_tbl.DELETE;
6546
6547 stmt_num := 291.5;
6548 Clear_Global_Data_Structures;
6549
6550 r := 0;
6551
6552 END LOOP; -- End Revised Item Object loop
6553
6554 -- ******************** DELETE PROCESSED ROWS ****************************
6555
6556 stmt_num := 513;
6557 IF (p_del_rec_flag = 1) THEN
6558 stmt_num := 515;
6559 LOOP
6560 DELETE from eng_revised_items_interface
6561 WHERE process_flag = 7
6562 AND rownum < G_ROWS_TO_COMMIT;
6563
6564 EXIT when SQL%NOTFOUND;
6565 COMMIT;
6566 END LOOP;
6567
6568 END IF;
6569
6570 ERRBUF := FND_MESSAGE.Get_String('ENG', 'ENG_ECOOI_SUCCEEDED');
6571 RETCODE := G_SUCCESS;
6572
6573 ENG_GLOBALS.G_ENG_LAUNCH_IMPORT := 0;
6574 EXCEPTION
6575 WHEN import_error THEN
6576 --dbms_output.put_line('Import_Error exception handler');
6577 RETCODE := G_ERROR;
6578 ERRBUF := FND_MESSAGE.Get_String('ENG', 'ENG_ECOOI_FAILED');
6579
6580 MRP_UTIL.MRP_LOG('ENG_LAUNCH_ECO_OI_PK.Eng_Launch_RevisedItems_Import('||
6581 to_char(stmt_num)||') ');
6582 FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
6583 MRP_UTIL.MRP_LOG(l_unexp_error);
6584 WHEN others THEN
6585 --dbms_output.put_line('Others exception handler - stmt num : ' || to_char(stmt_num));
6586 --dbms_output.put_line('SQL error is '||SQLERRM);
6587 RETCODE := G_ERROR;
6588 ERRBUF := FND_MESSAGE.Get_String('ENG', 'ENG_ECOOI_FAILED');
6589
6590 MRP_UTIL.Mrp_Log('ENG_LAUNCH_ECO_OI_PK.Eng_Launch_RevisedItems_Import('||
6591 to_char(stmt_num)||') ');
6592 FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
6593 MRP_UTIL.MRP_LOG(SQLERRM);
6594
6595
6596 END Eng_Launch_RevisedItems_Import;
6597
6598
6599 END ENG_LAUNCH_ECO_OI_PK;
6600