DBA Data[Home] [Help]

APPS.PA_PURGE_BILLING dependencies on PA_DRAFT_INVOICE_ITEMS

Line 1917: -- Function : Archive and Purge data for table PA_DRAFT_INVOICE_ITEMS

1913: -- Start of comments
1914: -- API name : PA_DraftInvItems
1915: -- Type : Private
1916: -- Pre-reqs : None
1917: -- Function : Archive and Purge data for table PA_DRAFT_INVOICE_ITEMS
1918: -- Parameters : See common list above
1919: -- End of comments
1920: procedure PA_DraftInvItems
1921: ( p_purge_batch_id IN NUMBER,

Line 1942: x_err_stack := x_err_stack || ' ->Entering PA_DRAFT_INVOICE_ITEMS' ;

1938: begin
1939:
1940: l_old_err_stack := x_err_stack;
1941:
1942: x_err_stack := x_err_stack || ' ->Entering PA_DRAFT_INVOICE_ITEMS' ;
1943:
1944: pa_debug.debug(x_err_stack);
1945:
1946: LOOP

Line 2088: from pa_draft_invoice_items

2084: RETENTION_RULE_ID,
2085: RETAINED_AMOUNT,
2086: RETN_DRAFT_INVOICE_NUM,
2087: RETN_DRAFT_INVOICE_LINE_NUM
2088: from pa_draft_invoice_items
2089: where (
2090: project_id = p_project_id
2091: and rownum <= l_commit_size
2092: ) ;

Line 2120: pa_debug.debug( ' ->Before delete from pa_draft_invoice_items ') ;

2116: x_err_stack => x_err_stack,
2117: x_err_stage => x_err_stage
2118: ) ;
2119:
2120: pa_debug.debug( ' ->Before delete from pa_draft_invoice_items ') ;
2121: /* commented and modified as below for performance reasons. Archive Purge 11.5
2122: delete from pa_draft_invoice_items dii
2123: where (dii.rowid)
2124: in

Line 2122: delete from pa_draft_invoice_items dii

2118: ) ;
2119:
2120: pa_debug.debug( ' ->Before delete from pa_draft_invoice_items ') ;
2121: /* commented and modified as below for performance reasons. Archive Purge 11.5
2122: delete from pa_draft_invoice_items dii
2123: where (dii.rowid)
2124: in
2125: ( select dii1.rowid
2126: from pa_draft_invoice_items dii1,

Line 2126: from pa_draft_invoice_items dii1,

2122: delete from pa_draft_invoice_items dii
2123: where (dii.rowid)
2124: in
2125: ( select dii1.rowid
2126: from pa_draft_invoice_items dii1,
2127: PA_DRAFT_INV_ITEMS_AR dii2
2128: where dii2.draft_invoice_num = dii1.draft_invoice_num
2129: and dii2.line_num = dii1.line_num
2130: and dii2.project_id = dii1.project_id

Line 2135: /* delete from pa_draft_invoice_items dii

2131: and dii2.purge_project_id = p_project_id
2132: ) ;
2133: */
2134: /* Commented the delete statement and added the modified code below not to correlate queries */
2135: /* delete from pa_draft_invoice_items dii
2136: where (dii.project_id, dii.draft_invoice_num) in
2137: ( select dii2.project_id, dii2.draft_invoice_num
2138: from PA_DRAFT_INV_ITEMS_AR dii2
2139: where dii2.line_num = dii.line_num

Line 2143: delete from pa_draft_invoice_items dii

2139: where dii2.line_num = dii.line_num
2140: and dii2.purge_project_id = p_project_id
2141: ) ;
2142: */
2143: delete from pa_draft_invoice_items dii
2144: where (dii.project_id, dii.draft_invoice_num, dii.line_num) in
2145: ( select dii2.project_id, dii2.draft_invoice_num, dii2.line_num
2146: from PA_DRAFT_INV_ITEMS_AR dii2
2147: where dii2.purge_project_id = p_project_id

Line 2155: pa_debug.debug( ' ->After delete from pa_draft_invoice_items ') ;

2151: l_NoOfRecordsDel := SQL%ROWCOUNT ;
2152: l_MC_NoOfRecordsDel := PA_UTILS2.mrc_row_count;
2153: /*Code Changes for Bug No.2984871 end */
2154:
2155: pa_debug.debug( ' ->After delete from pa_draft_invoice_items ') ;
2156:
2157: end if ;
2158: else
2159:

Line 2165: pa_debug.debug( ' ->Before delete from pa_draft_invoice_items ') ;

2161:
2162: -- If the archive option is not selected then the delete will
2163: -- be based on the commit size.
2164:
2165: pa_debug.debug( ' ->Before delete from pa_draft_invoice_items ') ;
2166: /* commented and modified as below for performance reasons. Archive Purge 11.5
2167: delete from pa_draft_invoice_items dii
2168: where (dii.rowid)
2169: in

Line 2167: delete from pa_draft_invoice_items dii

2163: -- be based on the commit size.
2164:
2165: pa_debug.debug( ' ->Before delete from pa_draft_invoice_items ') ;
2166: /* commented and modified as below for performance reasons. Archive Purge 11.5
2167: delete from pa_draft_invoice_items dii
2168: where (dii.rowid)
2169: in
2170: ( select dii1.rowid
2171: from pa_draft_invoice_items dii1

Line 2171: from pa_draft_invoice_items dii1

2167: delete from pa_draft_invoice_items dii
2168: where (dii.rowid)
2169: in
2170: ( select dii1.rowid
2171: from pa_draft_invoice_items dii1
2172: where dii1.project_id = p_project_id
2173: and rownum <= l_commit_size
2174: ) ;
2175: */

Line 2177: delete from pa_draft_invoice_items dii

2173: and rownum <= l_commit_size
2174: ) ;
2175: */
2176:
2177: delete from pa_draft_invoice_items dii
2178: where dii.project_id = p_project_id
2179: and rownum <= l_commit_size;
2180: /*Code Changes for Bug No.2984871 start */
2181: l_NoOfRecordsDel := SQL%ROWCOUNT ;

Line 2185: pa_debug.debug( ' ->After delete from pa_draft_invoice_items ') ;

2181: l_NoOfRecordsDel := SQL%ROWCOUNT ;
2182: l_MC_NoOfRecordsDel := PA_UTILS2.mrc_row_count;
2183: /*Code Changes for Bug No.2984871 end */
2184:
2185: pa_debug.debug( ' ->After delete from pa_draft_invoice_items ') ;
2186:
2187: end if ;
2188:
2189: /*Code Changes for Bug No.2984871 start */

Line 2207: p_table_name => 'PA_DRAFT_INVOICE_ITEMS',

2203: pa_debug.debug( ' ->Calling pa_purge.CommitProcess ') ;
2204: pa_purge.CommitProcess
2205: (p_purge_batch_id => p_purge_batch_id,
2206: p_project_id => p_project_id,
2207: p_table_name => 'PA_DRAFT_INVOICE_ITEMS',
2208: p_NoOfRecordsIns => l_NoOfRecordsIns,
2209: p_NoOfRecordsDel => l_NoOfRecordsDel,
2210: x_err_code => x_err_code,
2211: x_err_stack => x_err_stack,