DBA Data[Home] [Help]

APPS.PA_PURGE_ICIP dependencies on PA_DRAFT_INVOICE_DETAILS_ALL

Line 15: -- Function : Archive and Purge data for table PA_DRAFT_INVOICE_DETAILS_ALL

11: -- Start of comments
12: -- API name : PA_DraftInvDetails
13: -- Type : Private
14: -- Pre-reqs : None
15: -- Function : Archive and Purge data for table PA_DRAFT_INVOICE_DETAILS_ALL
16: -- Parameters : See common list above
17: -- End of comments
18: */
19:

Line 42: x_err_stack := x_err_stack || ' ->Entering PA_DRAFT_INVOICE_DETAILS_ALL' ;

38: begin
39:
40: l_old_err_stack := x_err_stack;
41:
42: x_err_stack := x_err_stack || ' ->Entering PA_DRAFT_INVOICE_DETAILS_ALL' ;
43:
44: pa_debug.debug(x_err_stack);
45:
46: LOOP

Line 191: from pa_draft_invoice_details_all

187: PROJFUNC_TP_EXCHANGE_RATE,
188: PROJECT_TRANSFER_PRICE,
189: PROJFUNC_TRANSFER_PRICE,
190: TP_AMT_TYPE_CODE
191: from pa_draft_invoice_details_all
192: where expenditure_item_id in
193: ( select ei.expenditure_item_id
194: from pa_tasks t,
195: pa_expenditure_items_all ei

Line 330: from pa_draft_invoice_details_all

326: PROJFUNC_TP_EXCHANGE_RATE,
327: PROJECT_TRANSFER_PRICE,
328: PROJFUNC_TRANSFER_PRICE,
329: TP_AMT_TYPE_CODE
330: from pa_draft_invoice_details_all
331: where expenditure_item_id in
332: ( select ei.expenditure_item_id /* Bug#4943324 : Perf Issue : Removed the Task table */
333: from
334: pa_expenditure_items_all ei

Line 407: pa_debug.debug( ' ->Before delete from pa_draft_invoice_details_all ') ;

403: )
404: and rownum < l_commit_size;
405:
406:
407: pa_debug.debug( ' ->Before delete from pa_draft_invoice_details_all ') ;
408:
409: delete from pa_draft_invoice_details_all did
410: where (did.project_id, did.draft_invoice_detail_id) in
411: ( select did2.project_id, did2.draft_invoice_detail_id

Line 409: delete from pa_draft_invoice_details_all did

405:
406:
407: pa_debug.debug( ' ->Before delete from pa_draft_invoice_details_all ') ;
408:
409: delete from pa_draft_invoice_details_all did
410: where (did.project_id, did.draft_invoice_detail_id) in
411: ( select did2.project_id, did2.draft_invoice_detail_id
412: from PA_DRAFT_INV_DETS_AR did2
413: where did2.purge_project_id = p_project_id

Line 418: pa_debug.debug( ' ->After delete from pa_draft_invoice_details_all ') ;

414: ) ;
415: /* Bug 2984871: Moved the below statement above the pa_debug.debug api call */
416: l_NoOfRecordsDel := SQL%ROWCOUNT ;
417:
418: pa_debug.debug( ' ->After delete from pa_draft_invoice_details_all ') ;
419:
420:
421: end if ;
422: else

Line 438: pa_debug.debug( ' ->Before delete from pa_draft_invoice_details_all ') ;

434:
435: -- If the archive option is not selected then the delete will
436: -- be based on the commit size.
437:
438: pa_debug.debug( ' ->Before delete from pa_draft_invoice_details_all ') ;
439:
440: if p_txn_to_date is NOT NULL then
441:
442: /*delete from pa_mc_draft_inv_details_all mdi

Line 447: pa_draft_invoice_details_all did

443: where (mdi.draft_invoice_detail_id ) in
444: ( select did.draft_invoice_detail_id
445: from pa_tasks t,
446: pa_expenditure_items_all ei,
447: pa_draft_invoice_details_all did
448: where ei.expenditure_item_date <= p_txn_to_date
449: and ei.task_id = t.task_id
450: and t.project_id = p_project_id
451: and t.project_id = did.project_id

Line 461: (select 1 from pa_draft_invoice_details_all did,

457: /* Commented out for MRC migration to SLA
458: delete from pa_mc_draft_inv_details_all mdi where
459: mdi.set_of_books_id > 0
460: and exists
461: (select 1 from pa_draft_invoice_details_all did,
462: pa_expenditure_items_all ei
463: where ei.expenditure_item_id = did.expenditure_item_id
464: and ei.project_id = p_project_id
465: and ei.expenditure_item_date <= p_txn_to_date

Line 482: from pa_draft_invoice_details_all did

478: update pa_draft_invoices_all di
479: set di.purge_flag = 'Y'
480: where ( di.project_id, di.draft_invoice_num ) in
481: ( select did.project_id, did.draft_invoice_num
482: from pa_draft_invoice_details_all did
483: where did.cc_project_id = p_project_id
484: and did.expenditure_item_id in
485: ( select ei.expenditure_item_id
486: from pa_tasks t,

Line 495: delete from pa_draft_invoice_details_all did

491: )
492: )
493: and rownum < l_commit_size;
494:
495: delete from pa_draft_invoice_details_all did
496: where (did.expenditure_item_id ) in
497: ( select ei.expenditure_item_id
498: from pa_tasks t,
499: pa_expenditure_items_all ei

Line 516: pa_draft_invoice_details_all did

512: where (mdi.draft_invoice_detail_id ) in
513: ( select did.draft_invoice_detail_id
514: from pa_tasks t,
515: pa_expenditure_items_all ei,
516: pa_draft_invoice_details_all did
517: where ei.task_id = t.task_id
518: and t.project_id = p_project_id
519: and t.project_id = did.project_id
520: )

Line 529: (select 1 from pa_draft_invoice_details_all did,

525: /* Commented out for MRC migration to SLA
526: delete from pa_mc_draft_inv_details_all mdi where
527: mdi.set_of_books_id > 0
528: and exists
529: (select 1 from pa_draft_invoice_details_all did,
530: pa_expenditure_items_all ei
531: where ei.expenditure_item_id = did.expenditure_item_id
532: and ei.project_id = p_project_id
533: and did.draft_invoice_detail_id = mdi.draft_invoice_detail_id)

Line 550: from pa_draft_invoice_details_all did

546: update pa_draft_invoices_all di
547: set di.purge_flag = 'Y'
548: where ( di.project_id, di.draft_invoice_num ) in
549: ( select did.project_id, did.draft_invoice_num
550: from pa_draft_invoice_details_all did
551: where did.cc_project_id = p_project_id
552: )
553: and rownum < l_commit_size;
554:

Line 556: delete from pa_draft_invoice_details_all did

552: )
553: and rownum < l_commit_size;
554:
555:
556: delete from pa_draft_invoice_details_all did
557: where (did.expenditure_item_id ) in
558: ( select ei.expenditure_item_id /* Bug#4943324 : Perf Issue : Removed the Task table */
559: from pa_expenditure_items_all ei
560: where ei.project_id = p_project_id

Line 570: pa_debug.debug( ' ->After delete from pa_draft_invoice_details_all ') ;

566:
567: end if;
568:
569:
570: pa_debug.debug( ' ->After delete from pa_draft_invoice_details_all ') ;
571:
572: end if ;
573:
574: /* Bug 2984871: Changed sql%rowcount to l_NoOfRecordsDel in the if condition below */

Line 591: p_table_name => 'PA_DRAFT_INVOICE_DETAILS_ALL',

587: pa_debug.debug( ' ->Calling pa_purge.CommitProcess ') ;
588: pa_purge.CommitProcess
589: (p_purge_batch_id => p_purge_batch_id,
590: p_project_id => p_project_id,
591: p_table_name => 'PA_DRAFT_INVOICE_DETAILS_ALL',
592: p_NoOfRecordsIns => l_NoOfRecordsIns,
593: p_NoOfRecordsDel => l_NoOfRecordsDel,
594: x_err_code => x_err_code,
595: x_err_stack => x_err_stack,