DBA Data[Home] [Help]

APPS.PA_PURGE_BILLING dependencies on PA_DRAFT_INVOICES_ALL

Line 3023: -- Function : Archive and Purge data for table PA_DRAFT_INVOICES_ALL

3019: -- Start of comments
3020: -- API name : PA_DraftInvoices
3021: -- Type : Private
3022: -- Pre-reqs : None
3023: -- Function : Archive and Purge data for table PA_DRAFT_INVOICES_ALL
3024: -- Parameters : See common list above
3025: -- End of comments
3026: procedure PA_DraftInvoices
3027: ( p_purge_batch_id IN NUMBER,

Line 3238: from pa_draft_invoices_all

3234: UBR_UER_PROCESS_FLAG,
3235: PJI_SUMMARIZED_FLAG,
3236: RETENTION_INVOICE_FLAG,
3237: RETN_CODE_COMBINATION_ID
3238: from pa_draft_invoices_all
3239: where (
3240: project_id = p_project_id
3241: and rownum <= l_commit_size
3242: ) ;

Line 3253: pa_debug.debug( ' ->Before delete from pa_draft_invoices_all ') ;

3249: -- selected because if archive option is selected the the records
3250: -- being purged will be those records which are already archived.
3251: -- table and
3252:
3253: pa_debug.debug( ' ->Before delete from pa_draft_invoices_all ') ;
3254: /* commented and modified as below for performance reasons. Archive Purge 11.5
3255: delete from pa_draft_invoices_all di
3256: where (di.rowid)
3257: in

Line 3255: delete from pa_draft_invoices_all di

3251: -- table and
3252:
3253: pa_debug.debug( ' ->Before delete from pa_draft_invoices_all ') ;
3254: /* commented and modified as below for performance reasons. Archive Purge 11.5
3255: delete from pa_draft_invoices_all di
3256: where (di.rowid)
3257: in
3258: ( select di1.rowid
3259: from pa_draft_invoices_all di1,

Line 3259: from pa_draft_invoices_all di1,

3255: delete from pa_draft_invoices_all di
3256: where (di.rowid)
3257: in
3258: ( select di1.rowid
3259: from pa_draft_invoices_all di1,
3260: pa_draft_invoices_ar di2
3261: where di2.draft_invoice_num = di1.draft_invoice_num
3262: and di1.project_id = di2.project_id
3263: and di2.purge_project_id = p_project_id

Line 3267: delete from pa_draft_invoices_all di

3263: and di2.purge_project_id = p_project_id
3264: ) ;
3265: */
3266:
3267: delete from pa_draft_invoices_all di
3268: where (di.project_id, di.draft_invoice_num) in
3269: ( select di2.project_id, di2.draft_invoice_num
3270: from pa_draft_invoices_ar di2
3271: where di2.purge_project_id = p_project_id

Line 3274: pa_debug.debug( ' ->After delete from pa_draft_invoices_all ') ;

3270: from pa_draft_invoices_ar di2
3271: where di2.purge_project_id = p_project_id
3272: ) ;
3273:
3274: pa_debug.debug( ' ->After delete from pa_draft_invoices_all ') ;
3275:
3276: l_NoOfRecordsDel := SQL%ROWCOUNT ;
3277: end if ;
3278: else

Line 3285: pa_debug.debug( ' ->Before delete from pa_draft_invoices_all ') ;

3281:
3282: -- If the archive option is not selected then the delete will
3283: -- be based on the commit size.
3284:
3285: pa_debug.debug( ' ->Before delete from pa_draft_invoices_all ') ;
3286: /* commented and modified as below for performance reasons. Archive Purge 11.5
3287: delete from pa_draft_invoices_all di
3288: where (di.rowid)
3289: in

Line 3287: delete from pa_draft_invoices_all di

3283: -- be based on the commit size.
3284:
3285: pa_debug.debug( ' ->Before delete from pa_draft_invoices_all ') ;
3286: /* commented and modified as below for performance reasons. Archive Purge 11.5
3287: delete from pa_draft_invoices_all di
3288: where (di.rowid)
3289: in
3290: ( select di1.rowid
3291: from pa_draft_invoices_all di1

Line 3291: from pa_draft_invoices_all di1

3287: delete from pa_draft_invoices_all di
3288: where (di.rowid)
3289: in
3290: ( select di1.rowid
3291: from pa_draft_invoices_all di1
3292: where di1.project_id = p_project_id
3293: and rownum <= l_commit_size
3294: ) ;
3295: */

Line 3297: delete from pa_draft_invoices_all di

3293: and rownum <= l_commit_size
3294: ) ;
3295: */
3296:
3297: delete from pa_draft_invoices_all di
3298: where di.project_id = p_project_id
3299: and rownum <= l_commit_size;
3300:
3301: /*Code Changes for Bug No.2984871 start */

Line 3304: pa_debug.debug( ' ->After delete from pa_draft_invoices_all ') ;

3300:
3301: /*Code Changes for Bug No.2984871 start */
3302: l_NoOfRecordsDel := SQL%ROWCOUNT ;
3303: /*Code Changes for Bug No.2984871 end */
3304: pa_debug.debug( ' ->After delete from pa_draft_invoices_all ') ;
3305: end if ;
3306:
3307: if l_NoOfRecordsDel = 0 then
3308: -- Once the SqlCount becomes 0, which means that there are

Line 3323: p_table_name => 'PA_DRAFT_INVOICES_ALL',

3319: pa_debug.debug( ' ->Calling pa_purge.CommitProcess ') ;
3320: pa_purge.CommitProcess
3321: (p_purge_batch_id => p_purge_batch_id,
3322: p_project_id => p_project_id,
3323: p_table_name => 'PA_DRAFT_INVOICES_ALL',
3324: p_NoOfRecordsIns => l_NoOfRecordsIns,
3325: p_NoOfRecordsDel => l_NoOfRecordsDel,
3326: x_err_code => x_err_code,
3327: x_err_stack => x_err_stack,