250: l_old_err_stack := x_err_stack;
251: x_err_stack := x_err_stack || ' ->Before insert into Cost_Distribution_Lines_AR' ;
252:
253: /* If mrc is enabled and being used then set the commit size based on the number
254: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
255: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
256: */
257: IF (l_mrc_flag = 'Y') THEN
258: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
251: x_err_stack := x_err_stack || ' ->Before insert into Cost_Distribution_Lines_AR' ;
252:
253: /* If mrc is enabled and being used then set the commit size based on the number
254: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
255: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
256: */
257: IF (l_mrc_flag = 'Y') THEN
258: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
259: ELSE
254: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
255: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
256: */
257: IF (l_mrc_flag = 'Y') THEN
258: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
259: ELSE
260: l_commit_size := PA_UTILS2.ARPUR_Commit_Size;
261: END IF;
262: IF p_txn_to_date is not null THEN
256: */
257: IF (l_mrc_flag = 'Y') THEN
258: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
259: ELSE
260: l_commit_size := PA_UTILS2.ARPUR_Commit_Size;
261: END IF;
262: IF p_txn_to_date is not null THEN
263: OPEN cdl_open_projects;
264: ELSE
499: * counter tracking the number of records that deleted from
500: * the mrc table.
501: */
502: IF (l_mrc_flag = 'Y') THEN
503: pa_utils2.MRC_row_count := 0;
504: END IF;
505: x_err_stage := 'Before deleting records from pa_cost_distribution_lines_all' ;
506: FORALL exp_ind in l_cdl_rowid_tab.FIRST .. l_cdl_rowid_tab.LAST
507: DELETE FROM PA_COST_DISTRIBUTION_LINES_ALL cdl
507: DELETE FROM PA_COST_DISTRIBUTION_LINES_ALL cdl
508: WHERE CDL.rowid = l_cdl_rowid_tab(exp_ind);
509:
510: l_NoOfRecordsDel := SQL%ROWCOUNT;
511: l_MRC_NoOfRecordsDel := pa_utils2.MRC_row_count ;
512:
513: IF l_NoOfRecordsDel > 0 THEN
514: -- After "deleting" or "deleting and inserting" a set of records
515: -- the transaction is commited. This also creates a record in the
610:
611: x_err_stack := x_err_stack || ' ->Before insert into Cost_Distribution_Lines_AR' ;
612:
613: /* If mrc is enabled and being used then set the commit size based on the number
614: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
615: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
616: */
617: IF (l_mrc_flag = 'Y') THEN
618: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
611: x_err_stack := x_err_stack || ' ->Before insert into Cost_Distribution_Lines_AR' ;
612:
613: /* If mrc is enabled and being used then set the commit size based on the number
614: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
615: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
616: */
617: IF (l_mrc_flag = 'Y') THEN
618: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
619: ELSE
614: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
615: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
616: */
617: IF (l_mrc_flag = 'Y') THEN
618: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
619: ELSE
620: l_commit_size := PA_UTILS2.ARPUR_Commit_Size;
621: END IF;
622:
616: */
617: IF (l_mrc_flag = 'Y') THEN
618: l_commit_size := PA_UTILS2.ARPUR_MRC_Commit_Size;
619: ELSE
620: l_commit_size := PA_UTILS2.ARPUR_Commit_Size;
621: END IF;
622:
623: If p_txn_to_date is NOT NULL then
624: Open c_open_cc_lines;
809: * counter tracking the number of records that deleted from
810: * the mrc table.
811: */
812: IF (l_mrc_flag = 'Y') THEN
813: pa_utils2.MRC_row_count := 0;
814: END IF;
815:
816: If ( p_archive_flag = 'Y' and x_MRC_NoOfRecordsIns > 0 )Then
817: x_err_stage := 'Before deleting records from PA_MC_CC_DIST_LINES_ALL' ;
2352:
2353: x_err_stack := x_err_stack || ' ->Before insert into PA_Expenditure_Items_AR' ;
2354:
2355: /* If mrc is enabled and being used then set the commit size based on the number
2356: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
2357: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
2358: */
2359: IF (l_mrc_flag = 'Y') THEN
2360: l_commit_size := trunc(PA_UTILS2.ARPUR_MRC_Commit_Size/3);
2353: x_err_stack := x_err_stack || ' ->Before insert into PA_Expenditure_Items_AR' ;
2354:
2355: /* If mrc is enabled and being used then set the commit size based on the number
2356: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
2357: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
2358: */
2359: IF (l_mrc_flag = 'Y') THEN
2360: l_commit_size := trunc(PA_UTILS2.ARPUR_MRC_Commit_Size/3);
2361: ELSE
2356: * of reporting currencies using PA_UTILS2.ARPUR_MRC_Commit_Size.
2357: * Otherwise just set the commit using PA_UTILS2.ARPUR_Commit_Size.
2358: */
2359: IF (l_mrc_flag = 'Y') THEN
2360: l_commit_size := trunc(PA_UTILS2.ARPUR_MRC_Commit_Size/3);
2361: ELSE
2362: l_commit_size := trunc(PA_UTILS2.ARPUR_Commit_Size/3);
2363: END IF;
2364:
2358: */
2359: IF (l_mrc_flag = 'Y') THEN
2360: l_commit_size := trunc(PA_UTILS2.ARPUR_MRC_Commit_Size/3);
2361: ELSE
2362: l_commit_size := trunc(PA_UTILS2.ARPUR_Commit_Size/3);
2363: END IF;
2364:
2365: IF p_txn_to_date is not null THEN
2366: OPEN c_exp_open_projects;
2877: * counter tracking the number of records that deleted from
2878: * the mrc table.
2879: */
2880: IF (l_mrc_flag = 'Y') THEN
2881: pa_utils2.MRC_row_count := 0;
2882: END IF;
2883:
2884: -- We have a seperate delete statement if the archive option is
2885: -- selected because if archive option is selected the the records
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;
2896:
2897:
2898: IF l_NoOfRecordsDel > 0 THEN
2899: x_err_stage := 'PA_ExpenditureItems: Commiting the transaction' ;