DBA Data[Home] [Help]

APPS.CSI_PARTY_MERGE_PKG dependencies on CSI_ITEM_INSTANCES

Line 8: PROCEDURE CSI_ITEM_INSTANCES_MERGE(

4: G_PROC_NAME CONSTANT VARCHAR2(30) := 'CSI_PARTY_MERGE_PKG';
5: G_USER_ID CONSTANT NUMBER(15) := FND_GLOBAL.USER_ID;
6: G_LOGIN_ID CONSTANT NUMBER(15) := FND_GLOBAL.LOGIN_ID;
7:
8: PROCEDURE CSI_ITEM_INSTANCES_MERGE(
9: p_entity_name IN VARCHAR2,
10: p_from_id IN NUMBER,
11: x_to_id OUT NOCOPY NUMBER,
12: p_from_fk_id IN NUMBER,

Line 26: from csi_item_instances

22: v_source_transaction_type VARCHAR2(30) := 'PARTY_MERGE';
23:
24: cursor c1 is
25: select 1
26: from csi_item_instances
27: where owner_party_id = p_from_fk_id
28: and owner_party_source_table = v_owner_party_source_table
29: for update nowait;
30:

Line 33: from csi_item_instances

29: for update nowait;
30:
31: cursor c2 is
32: select 1
33: from csi_item_instances
34: where ( install_location_type_code = v_install_location_type_code and install_location_id = p_from_fk_id ) or
35: ( location_type_code = v_location_type_code and location_id = p_from_fk_id )
36: for update nowait;
37:

Line 39: l_api_name VARCHAR2(30) := 'CSI_ITEM_INSTANCES_MERGE';

35: ( location_type_code = v_location_type_code and location_id = p_from_fk_id )
36: for update nowait;
37:
38: l_merge_reason_code VARCHAR2(30);
39: l_api_name VARCHAR2(30) := 'CSI_ITEM_INSTANCES_MERGE';
40: l_column_name VARCHAR2(30);
41: l_count NUMBER(10) := 0;
42: l_cp_audit_id NUMBER;
43: v_transaction_type_id NUMBER;

Line 56: arp_message.set_line('CSI_PARTY_MERGE_PKG.CSI_ITEM_INSTANCES_MERGE()+');

52: txn_type_not_found_error EXCEPTION;
53: RESOURCE_BUSY EXCEPTION;
54: PRAGMA EXCEPTION_INIT(RESOURCE_BUSY, -0054);
55: BEGIN
56: arp_message.set_line('CSI_PARTY_MERGE_PKG.CSI_ITEM_INSTANCES_MERGE()+');
57:
58: csi_t_gen_utility_pvt.g_debug_level := 10;
59: csi_t_gen_utility_pvt.build_file_name( p_file_segment1 => 'csipartymeg',
60: p_file_segment2 => TO_CHAR(SYSDATE, 'mmddyy'));

Line 62: csi_t_gen_utility_pvt.ADD('InsideCSI_PARTY_MERGE_PKG.CSI_ITEM_INSTANCES_MERGE ');

58: csi_t_gen_utility_pvt.g_debug_level := 10;
59: csi_t_gen_utility_pvt.build_file_name( p_file_segment1 => 'csipartymeg',
60: p_file_segment2 => TO_CHAR(SYSDATE, 'mmddyy'));
61:
62: csi_t_gen_utility_pvt.ADD('InsideCSI_PARTY_MERGE_PKG.CSI_ITEM_INSTANCES_MERGE ');
63: csi_t_gen_utility_pvt.ADD('Entity_name '|| p_entity_name);
64: csi_t_gen_utility_pvt.ADD ('From ID '||p_from_id);
65: csi_t_gen_utility_pvt.ADD('From FK ID '|| p_from_fk_id);
66: csi_t_gen_utility_pvt.ADD(' To FK ID'||p_to_fk_id);

Line 128: arp_message.set_token('TABLE_NAME', 'CSI_ITEM_INSTANCES', FALSE);

124: csi_t_gen_utility_pvt.ADD('Party Merge ');
125:
126:
127: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
128: arp_message.set_token('TABLE_NAME', 'CSI_ITEM_INSTANCES', FALSE);
129:
130: l_column_name := 'owner_party_id';
131:
132: open c1;

Line 135: update csi_item_instances

131:
132: open c1;
133: close c1;
134:
135: update csi_item_instances
136: set owner_party_id = p_to_fk_id,
137: last_update_date = SYSDATE,
138: last_updated_by = G_USER_ID,
139: last_update_login = G_LOGIN_ID

Line 227: INSERT INTO CSI_ITEM_INSTANCES_H

223:
224: csi_t_gen_utility_pvt.ADD('Insert record to history.');
225:
226: BEGIN
227: INSERT INTO CSI_ITEM_INSTANCES_H
228: (
229: INSTANCE_HISTORY_ID
230: ,INSTANCE_ID
231: ,TRANSACTION_ID

Line 245: CSI_ITEM_INSTANCES_H_S.nextval

241: ,OLD_INST_LOC_ID
242: ,NEW_INST_LOC_ID
243: )
244: SELECT
245: CSI_ITEM_INSTANCES_H_S.nextval
246: ,cii.INSTANCE_ID
247: ,v_transaction_id
248: ,decode( cii.location_id, p_from_fk_id, cii.location_id, null )
249: ,decode( cii.location_id, p_from_fk_id, p_to_fk_id, null )

Line 259: FROM csi_item_instances cii

255: ,fnd_global.user_id
256: ,1
257: ,decode( cii.install_location_id, p_from_fk_id, cii.install_location_id, null )
258: ,decode( cii.install_location_id, p_from_fk_id, p_to_fk_id, null )
259: FROM csi_item_instances cii
260: WHERE ( install_location_type_code = v_install_location_type_code and
261: install_location_id = p_from_fk_id ) or
262: ( location_type_code = v_location_type_code and
263: location_id = p_from_fk_id );

Line 279: UPDATE csi_item_instances_h cih

275:
276: EXCEPTION
277: WHEN DUP_VAL_ON_INDEX THEN
278: BEGIN
279: UPDATE csi_item_instances_h cih
280: SET cih.new_location_id = decode(cih.new_location_id, p_from_fk_id, p_to_fk_id),
281: cih.new_inst_loc_id = decode(cih.new_inst_loc_id, p_from_fk_id, p_to_fk_id),
282: last_update_date = sysdate
283: WHERE cih.transaction_id = v_transaction_id

Line 286: FROM csi_item_instances_h cii2

282: last_update_date = sysdate
283: WHERE cih.transaction_id = v_transaction_id
284: AND cih.instance_history_id IN
285: (SELECT cii2.instance_history_id
286: FROM csi_item_instances_h cii2
287: WHERE(cii2.new_location_id = p_from_fk_id OR cii2.new_inst_loc_id = p_from_fk_id)
288: AND cii2.transaction_id = v_transaction_id);
289: EXCEPTION
290: WHEN others THEN

Line 310: arp_message.set_token('TABLE_NAME', 'CSI_ITEM_INSTANCES', FALSE);

306: now update the install_location_id and location_id, if applicable
307: */
308:
309: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
310: arp_message.set_token('TABLE_NAME', 'CSI_ITEM_INSTANCES', FALSE);
311:
312: l_column_name := 'location_id';
313:
314: open c2;

Line 318: update csi_item_instances

314: open c2;
315: close c2;
316:
317: /* Modified udpate statement to retain the install_location_id and location_id instead of nulling them out - Bug#6848272*/
318: update csi_item_instances
319: set install_location_id = decode( install_location_id, p_from_fk_id, p_to_fk_id, install_location_id ),
320: location_id = decode( location_id, p_from_fk_id, p_to_fk_id, location_id ),
321: last_update_date = SYSDATE,
322: last_updated_by = G_USER_ID,

Line 349: arp_message.set_line(g_proc_name || '.' || l_api_name || '; Could not obtain lock for records in table ' || 'CSI_ITEM_INSTANCES for '||l_column_name ||' = '|| p_from_fk_id );

345: arp_message.set_line(g_proc_name || '.' || l_api_name || ': ' || v_txn_type_not_found_msg);
346: x_return_status := FND_API.G_RET_STS_ERROR;
347: raise;
348: when resource_busy then
349: arp_message.set_line(g_proc_name || '.' || l_api_name || '; Could not obtain lock for records in table ' || 'CSI_ITEM_INSTANCES for '||l_column_name ||' = '|| p_from_fk_id );
350: x_return_status := FND_API.G_RET_STS_ERROR;
351: raise;
352: when others then
353: arp_message.set_line(g_proc_name || '.' || l_api_name || ': ' || sqlerrm);

Line 358: END CSI_ITEM_INSTANCES_MERGE;

354: x_return_status := FND_API.G_RET_STS_ERROR;
355: raise;
356: END;
357: END IF;
358: END CSI_ITEM_INSTANCES_MERGE;
359:
360:
361: PROCEDURE CSI_I_PARTIES_MERGE(
362: p_entity_name IN VARCHAR2,