DBA Data[Home] [Help]

APPS.XDP_MERGE dependencies on XDP_ORDER_HEADERS

Line 9: -- XDP_ORDER_HEADERS

5: -- Package name : XDP_MERGE
6: -- Purpose : Merges duplicate parties in SFM tables. The
7: -- SFM tables that need to be considered for
8: -- Party Merge are:
9: -- XDP_ORDER_HEADERS
10: -- Columns : Customer_Id
11: --
12: -- The Customer Id column is populated through the ProcessOrder API
13: -- without any validation. The Flow Through Manager UI further displays it

Line 34: -- The following procedure merges XDP_ORDER_HEADERS columns:

30: G_LOGIN_ID CONSTANT NUMBER(15) := FND_GLOBAL.LOGIN_ID;
31:
32: TYPE ROWID_TBL IS TABLE OF ROWID INDEX BY BINARY_INTEGER;
33:
34: -- The following procedure merges XDP_ORDER_HEADERS columns:
35: -- CUSTOMER_ID
36: -- The above columns are FKs to HZ_PARTIES.PARTY_ID
37:
38: PROCEDURE MERGE_CUSTOMER_ID (

Line 52: FROM xdp_order_headers

48: IS
49: -- cursor fetches all the records that need to be merged.
50: CURSOR c1 IS
51: SELECT rowid
52: FROM xdp_order_headers
53: WHERE p_from_fk_id IN (customer_id)
54: FOR UPDATE NOWAIT;
55:
56: l_rowid_tbl ROWID_TBL;

Line 97: -- In the case of XDP_ORDER_HEADERS table, if party id 1000 gets merged to party

93: -- dependent record to the new parent. Before transferring check if a similar
94: -- dependent record exists on the new parent. If a duplicate exists then do
95: -- not transfer and return the id of the duplicate record as the Merged To Id
96:
97: -- In the case of XDP_ORDER_HEADERS table, if party id 1000 gets merged to party
98: -- id 2000 then, we have to update all records with customer_id = 1000 to 2000
99:
100: IF p_from_fk_id <> p_to_fk_id THEN
101: BEGIN

Line 104: arp_message.set_token('TABLE_NAME', 'XDP_ORDER_HEADERS', FALSE);

100: IF p_from_fk_id <> p_to_fk_id THEN
101: BEGIN
102: -- obtain lock on records to be updated.
103: arp_message.set_name('AR', 'AR_LOCKING_TABLE');
104: arp_message.set_token('TABLE_NAME', 'XDP_ORDER_HEADERS', FALSE);
105:
106: OPEN c1;
107: FETCH c1 bulk collect INTO l_rowid_tbl;
108: CLOSE c1;

Line 122: UPDATE xdp_order_headers

118: END IF;
119:
120: FORALL i IN 1..l_rowid_tbl.COUNT
121:
122: UPDATE xdp_order_headers
123: SET customer_id = DECODE(customer_id, p_from_fk_id, p_to_fk_id, customer_id),
124: customer_name = DECODE(customer_id,p_from_fk_id,substr(l_customer_name,1,80),customer_name),
125: last_update_date = SYSDATE,
126: last_updated_by = G_USER_ID,

Line 139: 'XDP_ORDER_HEADERS for customer_id = ' || p_from_fk_id );

135: EXCEPTION
136: WHEN resource_busy THEN
137: arp_message.set_line(g_proc_name || '.' || l_api_name ||
138: '; Could not obtain lock for records in table ' ||
139: 'XDP_ORDER_HEADERS for customer_id = ' || p_from_fk_id );
140: x_return_status := FND_API.G_RET_STS_ERROR;
141: RAISE;
142:
143: WHEN others THEN