DBA Data[Home] [Help]

APPS.CSD_MIGRATE_FROM_115X_PKG dependencies on CSD_REPAIRS

Line 4: PROCEDURE csd_repairs_mig(p_slab_number IN NUMBER DEFAULT 1) IS

1: PACKAGE BODY CSD_Migrate_From_115X_PKG AS
2: /* $Header: csdmig1b.pls 115.10 2004/05/07 02:21:38 saupadhy ship $ */
3:
4: PROCEDURE csd_repairs_mig(p_slab_number IN NUMBER DEFAULT 1) IS
5:
6: Type NumTabType is VARRAY(10000) of NUMBER;
7: repair_line_id_mig NumTabType;
8:

Line 19: CURSOR csd_repairs_cursor (p_start number, p_end number) is

15: MAX_BUFFER_SIZE NUMBER := 500;
16:
17: error_process exception;
18:
19: CURSOR csd_repairs_cursor (p_start number, p_end number) is
20: select cr.repair_line_id,
21: cr.rowid
22: from csd_repairs cr
23: where cr.repair_mode IS NULL

Line 22: from csd_repairs cr

18:
19: CURSOR csd_repairs_cursor (p_start number, p_end number) is
20: select cr.repair_line_id,
21: cr.rowid
22: from csd_repairs cr
23: where cr.repair_mode IS NULL
24: and cr.repair_line_id >= p_start
25: and cr.repair_line_id <= p_end;
26:

Line 31: CSD_MIG_SLABS_PKG.GET_TABLE_SLABS('CSD_REPAIRS'

27: BEGIN
28:
29: -- Get the Slab Number for the table
30: Begin
31: CSD_MIG_SLABS_PKG.GET_TABLE_SLABS('CSD_REPAIRS'
32: ,'CSD'
33: ,p_slab_number
34: ,v_min
35: ,v_max);

Line 41: -- Migration code for CSD_REPAIRS

37: return;
38: end if;
39: End;
40:
41: -- Migration code for CSD_REPAIRS
42: OPEN csd_repairs_cursor(v_min,v_max);
43: LOOP
44: FETCH csd_repairs_cursor bulk collect into
45: repair_line_id_mig,

Line 42: OPEN csd_repairs_cursor(v_min,v_max);

38: end if;
39: End;
40:
41: -- Migration code for CSD_REPAIRS
42: OPEN csd_repairs_cursor(v_min,v_max);
43: LOOP
44: FETCH csd_repairs_cursor bulk collect into
45: repair_line_id_mig,
46: rowid_mig

Line 44: FETCH csd_repairs_cursor bulk collect into

40:
41: -- Migration code for CSD_REPAIRS
42: OPEN csd_repairs_cursor(v_min,v_max);
43: LOOP
44: FETCH csd_repairs_cursor bulk collect into
45: repair_line_id_mig,
46: rowid_mig
47: LIMIT MAX_BUFFER_SIZE;
48:

Line 51: SAVEPOINT CSD_REPAIRS;

47: LIMIT MAX_BUFFER_SIZE;
48:
49: FOR j in 1..repair_line_id_mig.count
50: LOOP
51: SAVEPOINT CSD_REPAIRS;
52: Begin
53: UPDATE csd_repairs
54: SET repair_mode = 'WIP',
55: auto_process_rma = 'N',

Line 53: UPDATE csd_repairs

49: FOR j in 1..repair_line_id_mig.count
50: LOOP
51: SAVEPOINT CSD_REPAIRS;
52: Begin
53: UPDATE csd_repairs
54: SET repair_mode = 'WIP',
55: auto_process_rma = 'N',
56: last_update_date = sysdate,
57: last_updated_by = fnd_global.user_id,

Line 65: ROLLBACK to CSD_REPAIRS;

61: Raise error_process;
62: End If;
63: Exception
64: When error_process then
65: ROLLBACK to CSD_REPAIRS;
66: v_error_text := substr(sqlerrm,1,1000)||'Repair Line Id:'||repair_line_id_mig(j);
67: INSERT INTO CSD_UPG_ERRORS
68: (ORIG_SYSTEM_REFERENCE,
69: TARGET_SYSTEM_REFERENCE,

Line 74: VALUES( 'CSD_REPAIRS'

70: ORIG_SYSTEM_REFERENCE_ID,
71: UPGRADE_DATETIME,
72: ERROR_MESSAGE,
73: MIGRATION_PHASE)
74: VALUES( 'CSD_REPAIRS'
75: ,'CSD_REPAIRS'
76: ,repair_line_id_mig(j)
77: ,sysdate
78: ,v_error_text

Line 75: ,'CSD_REPAIRS'

71: UPGRADE_DATETIME,
72: ERROR_MESSAGE,
73: MIGRATION_PHASE)
74: VALUES( 'CSD_REPAIRS'
75: ,'CSD_REPAIRS'
76: ,repair_line_id_mig(j)
77: ,sysdate
78: ,v_error_text
79: ,'11.5.8' );

Line 83: raise_application_error( -20000, 'Error while migrating CSD_REPAIRS table data: Error while updating CSD_REPAIRS. '|| v_error_text);

79: ,'11.5.8' );
80:
81: commit;
82:
83: raise_application_error( -20000, 'Error while migrating CSD_REPAIRS table data: Error while updating CSD_REPAIRS. '|| v_error_text);
84:
85:
86: End;
87: END LOOP;

Line 90: EXIT WHEN csd_repairs_cursor%notfound;

86: End;
87: END LOOP;
88:
89: COMMIT;
90: EXIT WHEN csd_repairs_cursor%notfound;
91: END LOOP;
92:
93: if csd_repairs_cursor%isopen then
94: close csd_repairs_cursor;

Line 93: if csd_repairs_cursor%isopen then

89: COMMIT;
90: EXIT WHEN csd_repairs_cursor%notfound;
91: END LOOP;
92:
93: if csd_repairs_cursor%isopen then
94: close csd_repairs_cursor;
95: end if;
96:
97: COMMIT;

Line 94: close csd_repairs_cursor;

90: EXIT WHEN csd_repairs_cursor%notfound;
91: END LOOP;
92:
93: if csd_repairs_cursor%isopen then
94: close csd_repairs_cursor;
95: end if;
96:
97: COMMIT;
98:

Line 99: END csd_repairs_mig;

95: end if;
96:
97: COMMIT;
98:
99: END csd_repairs_mig;
100:
101:
102: PROCEDURE csd_product_txn_lines_mig (p_slab_number IN NUMBER DEFAULT 1) IS
103:

Line 168: csd_repairs cra

164: ced.creation_date,
165: cra.repair_type_id,
166: ced.rowid
167: from cs_estimate_details ced,
168: csd_repairs cra
169: where ced.source_id = cra.repair_line_id
170: and ced.inventory_item_id = cra.inventory_item_id
171: and ced.source_code = 'DR'
172: and not exists ( select '*' from csd_product_transactions cpt

Line 514: csd_repairs cra

510: NVL(cra.promise_date, cra.creation_date),
511: cra.approval_status
512: from cs_estimate_details ced,
513: cs_incidents_all_b cia,
514: csd_repairs cra
515: where ced.source_id = cra.repair_line_id
516: and ced.incident_id = cia.incident_id
517: and ced.inventory_item_id <> cra.inventory_item_id
518: and ced.source_code = 'DR'

Line 710: csd_repairs cra,

706: ced.order_line_id,
707: ced.creation_date,
708: cre.repair_estimate_id
709: from cs_estimate_details ced,
710: csd_repairs cra,
711: csd_repair_estimate cre
712: where ced.source_id = cra.repair_line_id
713: and cra.repair_line_id = cre.repair_line_id
714: and ced.inventory_item_id <> cra.inventory_item_id

Line 852: csd_repairs cr

848: select crjx.repair_job_xref_id,
849: cr.inventory_item_id,
850: crjx.rowid
851: from csd_repair_job_xref crjx,
852: csd_repairs cr
853: where crjx.repair_line_id = cr.repair_line_id
854: and crjx.repair_job_xref_id >= p_min
855: and crjx.repair_job_xref_id <= p_max
856: and crjx.inventory_item_id is null;