DBA Data[Home] [Help]

APPS.AS_TAP_MERGE_PKG dependencies on AS_ACCESSES_ALL

Line 31: select access_id from as_accesses_all a

27: salesforce_id_null EXCEPTION;
28: PRAGMA EXCEPTION_INIT (salesforce_id_null, -01407);
29:
30: CURSOR c_get_pm_access_id (c_from_fk_id NUMBER, c_to_fk_id NUMBER) IS
31: select access_id from as_accesses_all a
32: where customer_id= c_from_fk_id
33: and exists (select null from as_accesses_all b
34: where customer_id =c_to_fk_id
35: and (b.lead_id = a.lead_id or

Line 33: and exists (select null from as_accesses_all b

29:
30: CURSOR c_get_pm_access_id (c_from_fk_id NUMBER, c_to_fk_id NUMBER) IS
31: select access_id from as_accesses_all a
32: where customer_id= c_from_fk_id
33: and exists (select null from as_accesses_all b
34: where customer_id =c_to_fk_id
35: and (b.lead_id = a.lead_id or
36: (b.lead_id is null and a.lead_id is null))
37: and (b.org_id =a.org_id or

Line 48: from as_accesses_all b

44: (b.sales_group_id is null and a.sales_group_id is null)));
45:
46: CURSOR c_get_psm_access_id (c_from_fk_id NUMBER, c_to_fk_id NUMBER) IS
47: select access_id
48: from as_accesses_all b
49: where b.address_id = c_from_fk_id
50: and b.customer_id in
51: (select customer_id
52: from as_accesses_all c

Line 52: from as_accesses_all c

48: from as_accesses_all b
49: where b.address_id = c_from_fk_id
50: and b.customer_id in
51: (select customer_id
52: from as_accesses_all c
53: where (c.address_id = c_to_fk_id or
54: (b.address_id is null and c.address_id is null))
55: and (b.lead_id = c.lead_id or
56: (b.lead_id is null and c.lead_id is null))

Line 113: -- to merge-to id. E.g. : in AS_ACCESSES_ALL, if you have the following

109:
110: -- ************************************************************************
111: -- Add your own logic if you need to take care of the following cases
112: -- Check the if record duplicate if change party_id from merge-from
113: -- to merge-to id. E.g. : in AS_ACCESSES_ALL, if you have the following
114: -- situation
115: --
116: -- customer_id address_id contact_id
117: -- =========== ========== ==========

Line 138: DELETE FROM as_accesses_all

134: 'Deleting PARTY access_id: '||I.access_id);
135: DELETE FROM as_territory_accesses
136: WHERE access_id = I.access_id;
137:
138: DELETE FROM as_accesses_all
139: WHERE access_id = I.access_id;
140: END LOOP;
141:
142: -- merge party

Line 143: UPDATE AS_ACCESSES_ALL

139: WHERE access_id = I.access_id;
140: END LOOP;
141:
142: -- merge party
143: UPDATE AS_ACCESSES_ALL
144: set object_version_number = nvl(object_version_number,0) + 1,
145: customer_id = p_to_fk_id,
146: last_update_date = hz_utility_pub.last_update_date,
147: last_updated_by = hz_utility_pub.user_id,

Line 158: UPDATE AS_ACCESSES_ALL

154: -- ffang 012204, bug 3395366, party merge for partners
155: -- party merge for partner_customer_id
156: -- Exception clause is added for bug 6431278/6455932
157: Begin
158: UPDATE AS_ACCESSES_ALL
159: set partner_customer_id = p_to_fk_id,
160: salesforce_id=( select resource_id
161: from jtf_rs_resource_extns
162: where category = 'PARTNER'

Line 174: UPDATE AS_ACCESSES_ALL

170: where partner_customer_id = p_from_fk_id;
171: Exception
172: when salesforce_id_null then
173: FND_FILE.PUT_LINE(FND_FILE.LOG,'At exception: '||sqlerrm);
174: UPDATE AS_ACCESSES_ALL
175: set partner_customer_id = p_to_fk_id,
176: last_update_date = hz_utility_pub.last_update_date,
177: last_updated_by = hz_utility_pub.user_id,
178: last_update_login = hz_utility_pub.last_update_login,

Line 186: UPDATE AS_ACCESSES_ALL

182: where partner_customer_id = p_from_fk_id;
183: End;
184:
185: -- party merge for partner_cont_party_id
186: UPDATE AS_ACCESSES_ALL
187: set partner_cont_party_id = p_to_fk_id,
188: last_update_date = hz_utility_pub.last_update_date,
189: last_updated_by = hz_utility_pub.user_id,
190: last_update_login = hz_utility_pub.last_update_login,

Line 206: DELETE FROM as_accesses_all

202: 'Deleting PARTY SITE access_id: '||I.access_id);
203: DELETE FROM as_territory_accesses
204: WHERE access_id = I.access_id;
205:
206: DELETE FROM as_accesses_all
207: WHERE access_id = I.access_id;
208: END LOOP;
209:
210: -- The following statement will not update records if parties are merged

Line 215: UPDATE AS_ACCESSES_ALL

211: -- before party sites. As per TCA design docs, party sites are always
212: -- merged before parties. The subquery is to prevent updating new customer.
213:
214: -- merge party site
215: UPDATE AS_ACCESSES_ALL
216: set object_version_number = nvl(object_version_number,0) + 1,
217: address_id = p_to_fk_id,
218: last_update_date = hz_utility_pub.last_update_date,
219: last_updated_by = hz_utility_pub.user_id,

Line 228: UPDATE AS_ACCESSES_ALL

224: where address_id = p_from_fk_id;
225:
226: -- ffang 012204, bug 3395366, party merge for partners
227: -- party merge for partner_address_id
228: UPDATE AS_ACCESSES_ALL
229: set partner_address_id = p_to_fk_id,
230: last_update_date = hz_utility_pub.last_update_date,
231: last_updated_by = hz_utility_pub.user_id,
232: last_update_login = hz_utility_pub.last_update_login,

Line 308: -- to merge-to id. E.g. : in AS_ACCESSES_ALL, if you have the following

304:
305: -- ***************************************************************************
306: -- Add your own logic if you need to take care of the following cases
307: -- Check the if record duplicate if change party_id from merge-from
308: -- to merge-to id. E.g. : in AS_ACCESSES_ALL, if you have the following
309: -- situation
310: --
311: -- customer_id address_id contact_id
312: -- =========== ========== ==========