DBA Data[Home] [Help]

APPS.PA_PURGE_COSTING dependencies on PA_EXPENDITURE_ITEMS_ALL

Line 238: pa_expenditure_items_all ei

234: l_fetch_complete BOOLEAN := FALSE;
235: cursor cdl_open_projects is
236: select cdl.rowid
237: from pa_cost_distribution_lines_all cdl,
238: pa_expenditure_items_all ei
239: where cdl.expenditure_item_id = ei.expenditure_item_id
240: and ei.expenditure_item_date <= p_txn_to_date
241: and ei.project_id = p_project_id;
242:

Line 596: from pa_expenditure_items_all ei,

592: l_fetch_complete BOOLEAN := FALSE;
593:
594: cursor c_open_cc_lines is
595: select cdl1.rowid
596: from pa_expenditure_items_all ei,
597: pa_cc_dist_lines_all cdl1
598: where cdl1.expenditure_item_id = ei.expenditure_item_id
599: and ei.expenditure_item_date <= p_txn_to_date
600: and ei.project_id = p_project_id;

Line 830: from pa_expenditure_items_all ei,

826: If ( l_mrc_flag = 'Y' and p_archive_flag <> 'Y' )Then
827: delete from pa_mc_cc_dist_lines_all cdl
828: where cdl.rowid in
829: ( select cdl1.rowid
830: from pa_expenditure_items_all ei,
831: pa_mc_cc_dist_lines_all cdl1
832: where cdl1.expenditure_item_id = ei.expenditure_item_id
833: and ei.project_id = p_project_id
834: and rownum < l_commit_size

Line 939: From pa_expenditure_items_all ei,

935: l_fetch_complete BOOLEAN := FALSE;
936:
937: Cursor c_open_exp_comm is
938: Select ec1.rowid
939: From pa_expenditure_items_all ei,
940: pa_expenditure_comments ec1
941: Where ei.expenditure_item_id = ec1.expenditure_item_id
942: And ei.expenditure_item_date <= p_txn_to_date
943: And ei.project_id = p_project_id;

Line 947: From pa_expenditure_items_all ei,

943: And ei.project_id = p_project_id;
944:
945: Cursor c_close_exp_comm is
946: Select ec1.rowid
947: From pa_expenditure_items_all ei,
948: pa_expenditure_comments ec1
949: Where ei.expenditure_item_id = ec1.expenditure_item_id
950: And ei.project_id = p_project_id;
951:

Line 1072: from pa_expenditure_items_all ei,

1068: if p_txn_to_date is NOT NULL then
1069: delete from pa_expenditure_comments ec
1070: where ( ec.rowid )
1071: in ( select ec1.rowid
1072: from pa_expenditure_items_all ei,
1073: pa_expenditure_comments ec1
1074: where ei.expenditure_item_id = ec1.expenditure_item_id
1075: and ei.expenditure_item_date <= p_txn_to_date
1076: and ei.project_id = p_project_id

Line 1083: from pa_expenditure_items_all ei,

1079: else
1080: delete from pa_expenditure_comments ec
1081: where ( ec.rowid )
1082: in ( select ec1.rowid
1083: from pa_expenditure_items_all ei,
1084: pa_expenditure_comments ec1
1085: where ei.expenditure_item_id = ec1.expenditure_item_id
1086: and ei.project_id = p_project_id
1087: and rownum <= p_commit_size

Line 1181: from pa_expenditure_items_all ei,

1177: l_fetch_complete BOOLEAN := FALSE;
1178:
1179: cursor c_open_exp_adj is
1180: Select eia1.rowid
1181: from pa_expenditure_items_all ei,
1182: pa_expend_item_adj_activities eia1
1183: where ei.expenditure_item_date <= p_txn_to_date
1184: and ei.expenditure_item_id = eia1.expenditure_item_id
1185: and ei.project_id = p_project_id;

Line 1189: from pa_expenditure_items_all ei,

1185: and ei.project_id = p_project_id;
1186:
1187: cursor c_close_exp_adj is
1188: Select eia1.rowid
1189: from pa_expenditure_items_all ei,
1190: pa_expend_item_adj_activities eia1
1191: where ei.expenditure_item_id = eia1.expenditure_item_id
1192: and ei.project_id = p_project_id;
1193:

Line 1293: from pa_expenditure_items_all ei,

1289:
1290: l_NoOfRecordsDel := SQL%ROWCOUNT;
1291: /*s22 start of comment for performance changes
1292: ( select eia1.rowid
1293: from pa_expenditure_items_all ei,
1294: pa_expend_item_adj_activities eia1
1295: where ei.expenditure_item_date <= p_txn_to_date
1296: and ei.expenditure_item_id = eia1.expenditure_item_id
1297: and ei.project_id = p_project_id

Line 1342: from pa_expenditure_items_all ei,

1338: p_project_id
1339: from pa_expend_item_adj_activities eia
1340: where (eia.rowid ) in
1341: ( select eia1.rowid
1342: from pa_expenditure_items_all ei,
1343: pa_expend_item_adj_activities eia1
1344: where ei.expenditure_item_id = eia1.expenditure_item_id
1345: and ei.project_id = p_project_id
1346: and rownum < p_commit_size

Line 1380: from pa_expenditure_items_all ei,

1376: if p_txn_to_date is NOT NULL then
1377: delete from pa_expend_item_adj_activities eia
1378: where (eia.rowid ) in
1379: ( select eia1.rowid
1380: from pa_expenditure_items_all ei,
1381: pa_expend_item_adj_activities eia1
1382: where ei.expenditure_item_date <= p_txn_to_date
1383: and ei.expenditure_item_id = eia1.expenditure_item_id
1384: and ei.project_id = p_project_id

Line 1392: from pa_expenditure_items_all ei,

1388: else
1389: delete from pa_expend_item_adj_activities eia
1390: where (eia.rowid ) in
1391: ( select eia1.rowid
1392: from pa_expenditure_items_all ei,
1393: pa_expend_item_adj_activities eia1
1394: where ei.expenditure_item_id = eia1.expenditure_item_id
1395: and ei.project_id = p_project_id
1396: and rownum < p_commit_size

Line 2340: select rowid,expenditure_item_id from pa_expenditure_items_all ei

2336: l_exp_item_id_tab_empty PA_PLSQL_DATATYPES.IdTabTyp;
2337: l_request_id NUMBER;
2338:
2339: cursor c_exp_open_projects is
2340: select rowid,expenditure_item_id from pa_expenditure_items_all ei
2341: where ei.expenditure_item_date <= p_txn_to_date
2342: and ei.project_id = p_project_id;
2343:
2344: cursor c_exp_close_projects is

Line 2345: select rowid,expenditure_item_id from pa_expenditure_items_all ei

2341: where ei.expenditure_item_date <= p_txn_to_date
2342: and ei.project_id = p_project_id;
2343:
2344: cursor c_exp_close_projects is
2345: select rowid,expenditure_item_id from pa_expenditure_items_all ei
2346: where ei.project_id = p_project_id;
2347:
2348: begin
2349:

Line 2805: from pa_expenditure_items_all ei

2801: ei.document_type, -- R12 Change
2802: ei.document_distribution_type -- R12 Change
2803: ,ei.location_id /*Payroll Intergration*/
2804: ,ei.pay_element_type_id
2805: from pa_expenditure_items_all ei
2806: where ei.rowid = l_ei_rowid_tab(exp_ind);
2807: l_NoOfRecordsIns := SQL%ROWCOUNT ;
2808: end if;
2809:

Line 2858: from pa_expenditure_items_all ei

2854: 'SOURCE PURGED',
2855: 'PURGE PROCESS',
2856: g_user,
2857: l_request_id
2858: from pa_expenditure_items_all ei
2859: where ei.transferred_from_exp_item_id = l_exp_item_id_tab(exp_ind)
2860: and ei.transferred_from_exp_item_id is not null
2861: and not exists ( select pp.project_id
2862: from pa_purge_projects pp

Line 2867: update pa_expenditure_items_all ei

2863: where pp.project_id = ei.project_id
2864: and pp.purge_batch_id = p_purge_batch_id ) ;
2865:
2866: FORALL exp_ind IN l_exp_item_id_tab.FIRST .. l_exp_item_id_tab.LAST
2867: update pa_expenditure_items_all ei
2868: set ei.transferred_from_exp_item_id = NULL
2869: where ei.transferred_from_exp_item_id = l_exp_item_id_tab(exp_ind)
2870: and ei.transferred_from_exp_item_id is not null
2871: and not exists ( select pp.project_id

Line 2889: x_err_stage := 'PA_ExpenditureItems: Before deleting records from pa_expenditure_items_all';

2885: -- selected because if archive option is selected the the records
2886: -- being purged will be those records which are already archived.
2887: -- table and
2888:
2889: x_err_stage := 'PA_ExpenditureItems: Before deleting records from pa_expenditure_items_all';
2890: FORALL exp_ind IN l_ei_rowid_tab.FIRST .. l_ei_rowid_tab.LAST
2891: DELETE FROM PA_EXPENDITURE_ITEMS_ALL EI
2892: WHERE EI.ROWID = l_ei_rowid_tab(exp_ind);
2893:

Line 2891: DELETE FROM PA_EXPENDITURE_ITEMS_ALL EI

2887: -- table and
2888:
2889: x_err_stage := 'PA_ExpenditureItems: Before deleting records from pa_expenditure_items_all';
2890: FORALL exp_ind IN l_ei_rowid_tab.FIRST .. l_ei_rowid_tab.LAST
2891: DELETE FROM PA_EXPENDITURE_ITEMS_ALL EI
2892: WHERE EI.ROWID = l_ei_rowid_tab(exp_ind);
2893:
2894: l_NoOfRecordsDel := SQL%ROWCOUNT;
2895: l_MRC_NoOfRecordsDel := pa_utils2.MRC_row_count;

Line 3013: from pa_expenditure_items_all ei

3009: 'SOURCE PURGED',
3010: 'PURGE PROCESS',
3011: g_user,
3012: l_request_id
3013: from pa_expenditure_items_all ei
3014: where ei.transferred_from_exp_item_id in ( select ei1.expenditure_item_id
3015: from pa_expenditure_items_all ei1
3016: where ei1.expenditure_item_date <= p_txn_to_date
3017: and ei1.project_id = p_project_id )

Line 3015: from pa_expenditure_items_all ei1

3011: g_user,
3012: l_request_id
3013: from pa_expenditure_items_all ei
3014: where ei.transferred_from_exp_item_id in ( select ei1.expenditure_item_id
3015: from pa_expenditure_items_all ei1
3016: where ei1.expenditure_item_date <= p_txn_to_date
3017: and ei1.project_id = p_project_id )
3018: and ei.transferred_from_exp_item_id is not null
3019: and rownum < l_commit_size

Line 3047: from pa_tasks t,pa_expenditure_items_all ei

3043: 'SOURCE PURGED',
3044: 'PURGE PROCESS',
3045: g_user,
3046: l_request_id
3047: from pa_tasks t,pa_expenditure_items_all ei
3048: where ei.transferred_from_exp_item_id in ( select ei1.expenditure_item_id
3049: from pa_expenditure_items_all ei1,
3050: pa_tasks t1
3051: where ei1.task_id = t1.task_id

Line 3049: from pa_expenditure_items_all ei1,

3045: g_user,
3046: l_request_id
3047: from pa_tasks t,pa_expenditure_items_all ei
3048: where ei.transferred_from_exp_item_id in ( select ei1.expenditure_item_id
3049: from pa_expenditure_items_all ei1,
3050: pa_tasks t1
3051: where ei1.task_id = t1.task_id
3052: and t1.project_id = p_project_id )
3053: and ei.task_id = t.task_id

Line 3450: from pa_expenditure_items_all ei

3446: ei.posted_project_burdened_cost,
3447: ei.posted_projfunc_burdened_cost,
3448: ei.posted_acct_burdened_cost,
3449: ei.adjustment_type
3450: from pa_expenditure_items_all ei
3451: where ei.expenditure_item_id in ( select ei1.transferred_from_exp_item_id
3452: from Pa_Expend_item_Adj_Activities eia,
3453: pa_expenditure_items_all ei1
3454: where ei1.expenditure_item_id = eia.expenditure_item_id

Line 3453: pa_expenditure_items_all ei1

3449: ei.adjustment_type
3450: from pa_expenditure_items_all ei
3451: where ei.expenditure_item_id in ( select ei1.transferred_from_exp_item_id
3452: from Pa_Expend_item_Adj_Activities eia,
3453: pa_expenditure_items_all ei1
3454: where ei1.expenditure_item_id = eia.expenditure_item_id
3455: and eia.request_id = l_request_id
3456: and eia.exception_activity_code= 'SOURCE PURGED'
3457: and ei1.transferred_from_exp_item_id is not null ) ;

Line 3464: x_err_stage := 'PA_ExpItemsSrcPurge: Deleting records into pa_expenditure_items_all';

3460: l_NoOfRecordsIns := SQL%ROWCOUNT ;
3461:
3462: end if ;
3463:
3464: x_err_stage := 'PA_ExpItemsSrcPurge: Deleting records into pa_expenditure_items_all';
3465: delete from pa_expenditure_items_all ei
3466: where ei.expenditure_item_id in ( select ei1.transferred_from_exp_item_id
3467: from Pa_Expend_item_Adj_Activities eia,
3468: pa_expenditure_items_all ei1

Line 3465: delete from pa_expenditure_items_all ei

3461:
3462: end if ;
3463:
3464: x_err_stage := 'PA_ExpItemsSrcPurge: Deleting records into pa_expenditure_items_all';
3465: delete from pa_expenditure_items_all ei
3466: where ei.expenditure_item_id in ( select ei1.transferred_from_exp_item_id
3467: from Pa_Expend_item_Adj_Activities eia,
3468: pa_expenditure_items_all ei1
3469: where ei1.expenditure_item_id = eia.expenditure_item_id

Line 3468: pa_expenditure_items_all ei1

3464: x_err_stage := 'PA_ExpItemsSrcPurge: Deleting records into pa_expenditure_items_all';
3465: delete from pa_expenditure_items_all ei
3466: where ei.expenditure_item_id in ( select ei1.transferred_from_exp_item_id
3467: from Pa_Expend_item_Adj_Activities eia,
3468: pa_expenditure_items_all ei1
3469: where ei1.expenditure_item_id = eia.expenditure_item_id
3470: and eia.request_id = l_request_id
3471: and eia.exception_activity_code= 'SOURCE PURGED'
3472: and ei1.transferred_from_exp_item_id is not null ) ;

Line 3479: update pa_expenditure_items_all ei

3475: l_NoOfRecordsDel := SQL%ROWCOUNT ;
3476: */
3477:
3478: x_err_stage := 'PA_ExpItemsSrcPurge: Deleting the links between expenditure items' ;
3479: update pa_expenditure_items_all ei
3480: set ei.transferred_from_exp_item_id = NULL
3481: where ei.expenditure_item_id in ( select eia.expenditure_item_id
3482: from Pa_Expend_item_Adj_Activities eia
3483: where eia.request_id = l_request_id

Line 3549: from pa_expenditure_items_all ei

3545: l_fetch_complete BOOLEAN:= FALSE;
3546:
3547: cursor c_exp_open_lines is
3548: select ei.transferred_from_exp_item_id
3549: from pa_expenditure_items_all ei
3550: where ei.expenditure_item_date <= p_txn_to_date
3551: and ei.transferred_from_exp_item_id is not null
3552: and ei.project_id = p_project_id;
3553:

Line 3556: from pa_expenditure_items_all ei

3552: and ei.project_id = p_project_id;
3553:
3554: cursor c_exp_close_lines is
3555: select ei.transferred_from_exp_item_id
3556: from pa_expenditure_items_all ei
3557: where ei.transferred_from_exp_item_id is not null
3558: and ei.project_id = p_project_id;
3559:
3560: l_exp_item_id_tab PA_PLSQL_DATATYPES.IdTabTyp;

Line 3629: from pa_expenditure_items_all ei

3625: 'DESTINATION PURGED',
3626: 'PURGE PROCESS',
3627: g_user,
3628: l_Request_Id
3629: from pa_expenditure_items_all ei
3630: where ei.expenditure_item_id = l_exp_item_id_tab(l_exp_ind)
3631: /* in ( select ei1.transferred_from_exp_item_id
3632: from pa_expenditure_items_all ei1
3633: where ei1.expenditure_item_date <= p_txn_to_date

Line 3632: from pa_expenditure_items_all ei1

3628: l_Request_Id
3629: from pa_expenditure_items_all ei
3630: where ei.expenditure_item_id = l_exp_item_id_tab(l_exp_ind)
3631: /* in ( select ei1.transferred_from_exp_item_id
3632: from pa_expenditure_items_all ei1
3633: where ei1.expenditure_item_date <= p_txn_to_date
3634: and ei1.transferred_from_exp_item_id is not null
3635: and ei1.project_id = p_project_id )
3636: and rownum < l_commit_size */

Line 3989: from pa_expenditure_items_all ei

3985: where (x.rowid ) in
3986: ( select x1.rowid
3987: from pa_expenditures_all x1
3988: where not exists ( select ei.expenditure_id
3989: from pa_expenditure_items_all ei
3990: where ei.expenditure_id = x1.expenditure_id)
3991: and x1.expenditure_status_code = 'APPROVED'
3992: and rownum < l_commit_size
3993: ) ;

Line 4028: from pa_expenditure_items_all ei

4024: where (x.rowid ) in
4025: ( select x1.rowid
4026: from pa_expenditures_all x1
4027: where not exists ( select ei.expenditure_id
4028: from pa_expenditure_items_all ei
4029: where ei.expenditure_id = x1.expenditure_id)
4030: and x1.expenditure_status_code = 'APPROVED'
4031: and rownum < l_commit_size
4032: ) ;