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 497: /* delete from pa_draft_invoice_details_all did

493: and rownum < l_commit_size;
494:
495:
496: --Commenting out for bug#7701114 and taking out of loop
497: /* delete from pa_draft_invoice_details_all did
498: where (did.expenditure_item_id ) in
499: ( select ei.expenditure_item_id
500: from pa_tasks t,
501: pa_expenditure_items_all ei

Line 518: pa_draft_invoice_details_all did

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

Line 531: (select 1 from pa_draft_invoice_details_all did,

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

Line 552: from pa_draft_invoice_details_all did

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

Line 559: /*delete from pa_draft_invoice_details_all did

555: and rownum < l_commit_size;
556:
557:
558: --Commenting out for bug#7701114 and taking out of loop
559: /*delete from pa_draft_invoice_details_all did
560: where (did.expenditure_item_id ) in
561: ( select ei.expenditure_item_id /* Bug#4943324 : Perf Issue : Removed the Task table
562: from pa_expenditure_items_all ei
563: where ei.project_id = p_project_id

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

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

Line 594: p_table_name => 'PA_DRAFT_INVOICE_DETAILS_ALL',

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

Line 612: --Fix for bug#7701114 , creating a separate loop to delete records from pa_draft_invoice_details_all

608: END LOOP ;
609:
610: x_err_stack := l_old_err_stack ;
611:
612: --Fix for bug#7701114 , creating a separate loop to delete records from pa_draft_invoice_details_all
613: LOOP
614: IF p_archive_flag <> 'Y' THEN
615:
616: l_commit_size := pa_utils2.arpur_mrc_commit_size;

Line 619: delete from pa_draft_invoice_details_all did

615:
616: l_commit_size := pa_utils2.arpur_mrc_commit_size;
617:
618: IF p_txn_to_date is NOT NULL THEN
619: delete from pa_draft_invoice_details_all did
620: where (did.expenditure_item_id ) in
621: ( select ei.expenditure_item_id
622: from pa_tasks t,
623: pa_expenditure_items_all ei

Line 634: delete from pa_draft_invoice_details_all did

630: l_NoOfRecordsDel := SQL%ROWCOUNT ;
631:
632: ELSE
633:
634: delete from pa_draft_invoice_details_all did
635: where (did.expenditure_item_id ) in
636: ( select ei.expenditure_item_id
637: from --pa_tasks t, /* Bug#4943324 : Perf Issue : Removed the Task table */
638: pa_expenditure_items_all ei

Line 656: p_table_name => 'PA_DRAFT_INVOICE_DETAILS_ALL',

652: ELSE
653: pa_purge.CommitProcess
654: (p_purge_batch_id => p_purge_batch_id,
655: p_project_id => p_project_id,
656: p_table_name => 'PA_DRAFT_INVOICE_DETAILS_ALL',
657: p_NoOfRecordsIns => l_NoOfRecordsIns,
658: p_NoOfRecordsDel => l_NoOfRecordsDel,
659: x_err_code => x_err_code,
660: x_err_stack => x_err_stack,