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_install_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_install_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: x_return_status := FND_API.G_RET_STS_SUCCESS;
59:
60: begin

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

101: BEGIN
102: If p_parent_entity_name = 'HZ_PARTIES' Then
103:
104: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
105: arp_message.set_token('TABLE_NAME', 'CSI_ITEM_INSTANCES', FALSE);
106:
107: l_column_name := 'owner_party_id';
108:
109: open c1;

Line 112: update csi_item_instances

108:
109: open c1;
110: close c1;
111:
112: update csi_item_instances
113: set owner_party_id = p_to_fk_id,
114: last_update_date = SYSDATE,
115: last_updated_by = G_USER_ID,
116: last_update_login = G_LOGIN_ID

Line 196: INSERT INTO CSI_ITEM_INSTANCES_H

192: End;
193:
194: /* insert record into history table */
195: --
196: INSERT INTO CSI_ITEM_INSTANCES_H
197: (
198: INSTANCE_HISTORY_ID
199: ,INSTANCE_ID
200: ,TRANSACTION_ID

Line 214: CSI_ITEM_INSTANCES_H_S.nextval

210: ,OLD_INST_LOC_ID
211: ,NEW_INST_LOC_ID
212: )
213: SELECT
214: CSI_ITEM_INSTANCES_H_S.nextval
215: ,cii.INSTANCE_ID
216: ,v_transaction_id
217: ,decode( cii.location_id, p_from_fk_id, cii.location_id, null )
218: ,decode( cii.location_id, p_from_fk_id, p_to_fk_id, null )

Line 228: FROM csi_item_instances cii

224: ,arp_standard.profile.user_id
225: ,1
226: ,decode( cii.install_location_id, p_from_fk_id, cii.install_location_id, null )
227: ,decode( cii.install_location_id, p_from_fk_id, p_to_fk_id, null )
228: FROM csi_item_instances cii
229: WHERE ( install_location_type_code = v_install_location_type_code and
230: install_location_id = p_from_fk_id ) or
231: ( location_type_code = v_install_location_type_code and
232: location_id = p_from_fk_id );

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

244: now update the install_location_id and location_id, if applicable
245: */
246:
247: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
248: arp_message.set_token('TABLE_NAME', 'CSI_ITEM_INSTANCES', FALSE);
249:
250: l_column_name := 'location_id';
251:
252: open c2;

Line 256: update csi_item_instances

252: open c2;
253: close c2;
254:
255: /* Modified udpate statement to retain the install_location_id & location_id instead of nulling them out - Bug#6848272*/
256: update csi_item_instances
257: set install_location_id = decode( install_location_id, p_from_fk_id, p_to_fk_id, install_location_id ),
258: location_id = decode( location_id, p_from_fk_id, p_to_fk_id, location_id ),
259: last_update_date = SYSDATE,
260: last_updated_by = G_USER_ID,

Line 284: 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 );

280: arp_message.set_line(g_proc_name || '.' || l_api_name || ': ' || v_txn_type_not_found_msg);
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: raise;
283: when resource_busy then
284: 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 );
285: x_return_status := FND_API.G_RET_STS_ERROR;
286: raise;
287: when others then
288: arp_message.set_line(g_proc_name || '.' || l_api_name || ': ' || sqlerrm);

Line 293: END CSI_ITEM_INSTANCES_MERGE;

289: x_return_status := FND_API.G_RET_STS_ERROR;
290: raise;
291: END;
292: END IF;
293: END CSI_ITEM_INSTANCES_MERGE;
294:
295:
296: PROCEDURE CSI_I_PARTIES_MERGE(
297: p_entity_name IN VARCHAR2,