[Home] [Help]
2900: l_NoOfRecordsDel,
2901: x_err_code,
2902: x_err_stack,
2903: x_err_stage,
2904: /* 'PA_MC_EXP_ITEMS_AR', */
2905: 'PA_MC_EXP_ITEMS',
2906: x_MRC_NoOfRecordsIns,
2907: l_MRC_NoOfRecordsDel
2908: ) ;
4107: BEGIN
4108:
4109: l_old_err_stack := x_err_stack;
4110:
4111: x_err_stack := x_err_stack || ' ->Before insert into PA_MC_EXP_ITEMS_AR' ;
4112:
4113: x_err_stage := 'PA_MRCExpenditureItems: Before inserting records into PA_MC_EXP_ITEMS_AR';
4114:
4115: /* Note that purged_project_id in table PA_EXPENDITURE_ITEMS_AR is index
4109: l_old_err_stack := x_err_stack;
4110:
4111: x_err_stack := x_err_stack || ' ->Before insert into PA_MC_EXP_ITEMS_AR' ;
4112:
4113: x_err_stage := 'PA_MRCExpenditureItems: Before inserting records into PA_MC_EXP_ITEMS_AR';
4114:
4115: /* Note that purged_project_id in table PA_EXPENDITURE_ITEMS_AR is index
4116: * Will also need index on PA_MC_EXP_ITEMS_AR columns set_of_books_id and
4117: * expenditure_item_id.
4112:
4113: x_err_stage := 'PA_MRCExpenditureItems: Before inserting records into PA_MC_EXP_ITEMS_AR';
4114:
4115: /* Note that purged_project_id in table PA_EXPENDITURE_ITEMS_AR is index
4116: * Will also need index on PA_MC_EXP_ITEMS_AR columns set_of_books_id and
4117: * expenditure_item_id.
4118: * The NOT EXISTS section is to make sure that no attempt is made to insert a
4119: * duplicate record in table PA_MC_EXP_ITEMS_AR.
4120: */
4115: /* Note that purged_project_id in table PA_EXPENDITURE_ITEMS_AR is index
4116: * Will also need index on PA_MC_EXP_ITEMS_AR columns set_of_books_id and
4117: * expenditure_item_id.
4118: * The NOT EXISTS section is to make sure that no attempt is made to insert a
4119: * duplicate record in table PA_MC_EXP_ITEMS_AR.
4120: */
4121: INSERT INTO PA_MC_EXP_ITEMS_AR
4122: ( SET_OF_BOOKS_ID,
4123: EXPENDITURE_ITEM_ID,
4117: * expenditure_item_id.
4118: * The NOT EXISTS section is to make sure that no attempt is made to insert a
4119: * duplicate record in table PA_MC_EXP_ITEMS_AR.
4120: */
4121: INSERT INTO PA_MC_EXP_ITEMS_AR
4122: ( SET_OF_BOOKS_ID,
4123: EXPENDITURE_ITEM_ID,
4124: RAW_COST,
4125: RAW_COST_RATE,
4201: EI.PURGE_PROJECT_ID = P_PROJECT_ID
4202: AND MCEI.EXPENDITURE_ITEM_ID = EI.EXPENDITURE_ITEM_ID
4203: AND NOT EXISTS ( SELECT expenditure_item_id
4204: FROM
4205: PA_MC_EXP_ITEMS_AR
4206: WHERE
4207: purge_project_id = P_PROJECT_ID
4208: AND expenditure_item_id = mcei.expenditure_item_id
4209: AND set_of_books_id = mcei.set_of_books_id ) ;