DBA Data[Home] [Help]

APPS.GMS_AP_API2 dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 157: from ap_invoice_distributions_all A,

153: A.last_updated_by LAST_UPDATED_BY,
154: A.created_by CREATED_BY,
155: NVL(A.last_update_login,0) LAST_UPDATE_LOGIN,
156: inv.invoice_num invoice_num
157: from ap_invoice_distributions_all A,
158: pa_projects_all p,
159: gms_project_types gpt,
160: ap_invoices_all inv
161: where a.invoice_id = p_invoice_id

Line 174: from ap_invoice_distributions_all A,

170: l_adl_rec c_adl%ROWTYPE ;
171:
172: cursor c2 is
173: SELECT 1
174: from ap_invoice_distributions_all A,
175: pa_projects_all p,
176: gms_project_types gpt
177: where a.invoice_id = p_invoice_id
178: and a.project_id = p.project_id

Line 234: from ap_invoice_distributions_all A,

230: l_last_updated_by ,
231: l_created_by ,
232: l_last_update_login ,
233: l_new_award_set_id
234: from ap_invoice_distributions_all A,
235: gms_award_distributions adl
236: where a.invoice_id = p_invoice_id
237: and adl.award_set_id = a.award_id
238: and adl.adl_line_num = 1

Line 263: ap_invoice_distributions_all apd

259:
260: select adl2.award_set_id
261: bulk collect into l_dummy_tab
262: from gms_award_distributions adl2,
263: ap_invoice_distributions_all apd
264: where apd.invoice_id = p_invoice_id
265: and apd.award_id is not null
266: and adl2.award_set_id = apd.award_id
267: and adl2.invoice_id = apd.invoice_id

Line 301: ap_invoice_distributions_all apd

297: -- ==============================================================================================
298: select adl2.award_set_id
299: bulk collect into l_dummy_tab
300: from gms_award_distributions adl2,
301: ap_invoice_distributions_all apd
302: where apd.invoice_id = p_invoice_id
303: and apd.award_id is not null
304: and adl2.award_set_id <> apd.award_id
305: and adl2.invoice_id = apd.invoice_id

Line 344: from ap_invoice_distributions_all A,

340: ** Update statement was changed to bulk statement to resolve the share memory performance issue.
341: */
342: select a.invoice_distribution_id
343: bulk collect into l_dummy_tab
344: from ap_invoice_distributions_all A,
345: pa_projects_all p,
346: gms_project_types gpt
347: where a.invoice_id = p_invoice_id
348: and a.project_id = p.project_id

Line 356: UPDATE ap_invoice_distributions_all apd

352:
353: IF l_dummy_tab.count > 0 THEN
354:
355: FORALL i in l_dummy_tab.FIRST..l_dummy_tab.LAST
356: UPDATE ap_invoice_distributions_all apd
357: SET award_id = NULL
358: where apd.invoice_id = p_invoice_id
359: and apd.invoice_distribution_id = l_dummy_tab(i) ;
360:

Line 428: and award_set_id not in ( select award_id from ap_invoice_distributions_all

424: -- ADLS are in sych so we can delete orphan adls now.
425: delete from gms_award_distributions
426: where invoice_id = p_invoice_id
427: and document_type = 'AP'
428: and award_set_id not in ( select award_id from ap_invoice_distributions_all
429: where invoice_id = p_invoice_id
430: and award_id is not NULL ) ;
431:
432: return ;

Line 502: update ap_invoice_distributions_all

498: -- Update AP distribution with the award set id.
499: -- End of comment.
500:
501: FORALL k in l_invoice_distribution_id.FIRST..l_invoice_distribution_id.LAST
502: update ap_invoice_distributions_all
503: set award_id = l_new_award_set_id(k)
504: where invoice_id = l_invoice_id(k)
505: and distribution_line_number = l_distribution_line_number(k)
506: and invoice_distribution_id = l_invoice_distribution_id(k) ;

Line 516: and award_set_id not in ( select award_id from ap_invoice_distributions_all

512: --
513: delete from gms_award_distributions
514: where invoice_id = p_invoice_id
515: and document_type = 'AP'
516: and award_set_id not in ( select award_id from ap_invoice_distributions_all
517: where invoice_id = p_invoice_id
518: and award_id is not NULL ) ;
519:
520: -- Bug 3077074