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