DBA Data[Home] [Help]

APPS.PA_PURGE_PJR_TXNS dependencies on PA_FORECAST_ITEMS

Line 108: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */

104: ELSE
105: l_last_fetch := 'N';
106: END IF;
107:
108: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */
109:
110: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
111: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
112:

Line 114: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,

110: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
111: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
112:
113:
114: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,
115: p_project_id =>p_project_id,
116: p_purge_release =>p_purge_release,
117: p_assignment_id_tab =>l_requirement_id_tab,
118: p_archive_flag =>p_archive_flag,

Line 235: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */

231: ELSE
232: l_last_fetch := 'N';
233: END IF;
234:
235: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */
236:
237: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
238: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
239:

Line 240: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,

236:
237: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
238: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
239:
240: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,
241: p_project_id =>p_project_id,
242: p_purge_release =>p_purge_release,
243: p_assignment_id_tab =>l_requirement_id_tab,
244: p_archive_flag =>p_archive_flag,

Line 430: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */

426: ELSE
427: l_last_fetch := 'N';
428: END IF;
429:
430: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */
431:
432: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
433: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
434:

Line 435: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,

431:
432: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
433: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
434:
435: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,
436: p_project_id =>p_project_id,
437: p_purge_release =>p_purge_release,
438: p_assignment_id_tab =>l_assignment_id_tab,
439: p_archive_flag =>p_archive_flag,

Line 559: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */

555: ELSE
556: l_last_fetch := 'N';
557: END IF;
558:
559: /* Call forecast API to archive/purge data from pa_forecast_items and detail table */
560:
561: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
562: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
563:

Line 564: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,

560:
561: pa_debug.debug(' About to purge Forecast Items and Forecast Item Details ') ;
562: x_err_stage := 'About to purge forecast items for project '||to_char(p_project_id) ;
563:
564: pa_purge_pjr_txns.pa_forecast_items_purge( p_purge_batch_id =>p_purge_batch_id,
565: p_project_id =>p_project_id,
566: p_purge_release =>p_purge_release,
567: p_assignment_id_tab =>l_assignment_id_tab,
568: p_archive_flag =>p_archive_flag,

Line 665: -- API name : PA_FORECAST_ITEMS_PURGE

661:
662: end PA_ASSIGNMENTS_PURGE;
663:
664: -- Start of comments
665: -- API name : PA_FORECAST_ITEMS_PURGE
666: -- Type : Public
667: -- Pre-reqs : None
668: -- Function : Purge procedure for Purging records from tables PA_FORECAST_ITEMS and PA_FORECAST_ITEM_DETAILS
669:

Line 668: -- Function : Purge procedure for Purging records from tables PA_FORECAST_ITEMS and PA_FORECAST_ITEM_DETAILS

664: -- Start of comments
665: -- API name : PA_FORECAST_ITEMS_PURGE
666: -- Type : Public
667: -- Pre-reqs : None
668: -- Function : Purge procedure for Purging records from tables PA_FORECAST_ITEMS and PA_FORECAST_ITEM_DETAILS
669:
670:
671: Procedure PA_FORECAST_ITEMS_PURGE ( p_purge_batch_id in NUMBER,
672: p_project_id in NUMBER,

Line 671: Procedure PA_FORECAST_ITEMS_PURGE ( p_purge_batch_id in NUMBER,

667: -- Pre-reqs : None
668: -- Function : Purge procedure for Purging records from tables PA_FORECAST_ITEMS and PA_FORECAST_ITEM_DETAILS
669:
670:
671: Procedure PA_FORECAST_ITEMS_PURGE ( p_purge_batch_id in NUMBER,
672: p_project_id in NUMBER,
673: p_purge_release in VARCHAR2,
674: p_assignment_id_tab in PA_PLSQL_DATATYPES.IdTabTyp,
675: p_archive_flag in VARCHAR2,

Line 680: l_forecast_item_id Pa_forecast_items.forecast_item_id%TYPE;

676: x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
677: x_err_stage in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
678: x_err_code in OUT NOCOPY NUMBER ) IS --File.Sql.39 bug 4440895
679:
680: l_forecast_item_id Pa_forecast_items.forecast_item_id%TYPE;
681: I PLS_INTEGER;
682: l_assignment_id pa_forecast_items.assignment_id%TYPE;
683: l_nos_fi_inserted NUMBER ;
684: l_nos_fid_inserted NUMBER ;

Line 682: l_assignment_id pa_forecast_items.assignment_id%TYPE;

678: x_err_code in OUT NOCOPY NUMBER ) IS --File.Sql.39 bug 4440895
679:
680: l_forecast_item_id Pa_forecast_items.forecast_item_id%TYPE;
681: I PLS_INTEGER;
682: l_assignment_id pa_forecast_items.assignment_id%TYPE;
683: l_nos_fi_inserted NUMBER ;
684: l_nos_fid_inserted NUMBER ;
685: l_nos_fi_deleted NUMBER ;
686: l_nos_fid_deleted NUMBER ;

Line 691: SELECT forecast_item_id from pa_forecast_items

687: l_nos_fi_amt_inserted NUMBER;
688: l_nos_fi_amt_deleted NUMBER;
689:
690: CURSOR Cur_forecast_items(x_assignment_id In NUMBER) IS
691: SELECT forecast_item_id from pa_forecast_items
692: WHERE assignment_id =x_assignment_id;
693:
694: l_old_err_stack VARCHAR2(2000); -- Added for bug 4227589
695:

Line 755: pa_debug.debug('Inserting Records into pa_forecast_items_AR table ') ;

751: /* If archive flag is YES, archiving of data needs to be done. Insert data into correspodning AR tables */
752:
753: IF p_archive_flag='Y' THEN
754:
755: pa_debug.debug('Inserting Records into pa_forecast_items_AR table ') ;
756: x_err_stage := 'Inserting Records into pa_forecast_items_AR table for forecast item '||to_char(l_forecast_item_id) ;
757:
758: INSERT INTO pa_frcst_items_AR
759: (PURGE_BATCH_ID,

Line 756: x_err_stage := 'Inserting Records into pa_forecast_items_AR table for forecast item '||to_char(l_forecast_item_id) ;

752:
753: IF p_archive_flag='Y' THEN
754:
755: pa_debug.debug('Inserting Records into pa_forecast_items_AR table ') ;
756: x_err_stage := 'Inserting Records into pa_forecast_items_AR table for forecast item '||to_char(l_forecast_item_id) ;
757:
758: INSERT INTO pa_frcst_items_AR
759: (PURGE_BATCH_ID,
760: PURGE_RELEASE,

Line 916: FROM pa_forecast_items

912: Over_Prov_Conf_Qty,
913: Confirmed_Qty,
914: Provisional_Qty,
915: Job_Id
916: FROM pa_forecast_items
917: WHERE forecast_item_id = l_forecast_item_id;
918:
919: /*Increase the value of l_nos_fi_inserted to indicate number of records inserted in forecast_items table.
920: The value will increase for each loop(forecast item id*/

Line 1179: /*To keep the count of no os records deleted from pa_forecast_items and pa_forecast_item_details, manipulate the

1175: l_nos_fi_amt_inserted := l_nos_fi_amt_inserted + SQL%ROWCOUNT;
1176:
1177: END IF;
1178:
1179: /*To keep the count of no os records deleted from pa_forecast_items and pa_forecast_item_details, manipulate the
1180: count of l_nos_of fi_deleted and l_nos_fis_deleted. */
1181:
1182: pa_debug.debug('Deleting Records from pa_fi_amount_details table ') ;
1183: x_err_stage := 'Deleting Records from pa_fi_amount_details table for id '||to_char(l_forecast_item_id) ;

Line 1198: pa_debug.debug('Deleting Records from pa_forecast_items table ') ;

1194: WHERE forecast_item_id =l_forecast_item_id;
1195:
1196: l_nos_fid_deleted :=l_nos_fid_deleted + SQL%ROWCOUNT;
1197:
1198: pa_debug.debug('Deleting Records from pa_forecast_items table ') ;
1199: x_err_stage := 'Deleting Records from pa_forecast_items table for id '||to_char(l_forecast_item_id) ;
1200:
1201:
1202: DELETE PA_FORECAST_ITEMS

Line 1199: x_err_stage := 'Deleting Records from pa_forecast_items table for id '||to_char(l_forecast_item_id) ;

1195:
1196: l_nos_fid_deleted :=l_nos_fid_deleted + SQL%ROWCOUNT;
1197:
1198: pa_debug.debug('Deleting Records from pa_forecast_items table ') ;
1199: x_err_stage := 'Deleting Records from pa_forecast_items table for id '||to_char(l_forecast_item_id) ;
1200:
1201:
1202: DELETE PA_FORECAST_ITEMS
1203: WHERE forecast_item_id=l_forecast_item_id;

Line 1202: DELETE PA_FORECAST_ITEMS

1198: pa_debug.debug('Deleting Records from pa_forecast_items table ') ;
1199: x_err_stage := 'Deleting Records from pa_forecast_items table for id '||to_char(l_forecast_item_id) ;
1200:
1201:
1202: DELETE PA_FORECAST_ITEMS
1203: WHERE forecast_item_id=l_forecast_item_id;
1204:
1205: l_nos_fi_deleted :=l_nos_fi_deleted + SQL%ROWCOUNT;
1206:

Line 1213: The procedure is called once for pa_forecast_items and once for pa_forecast_item_details */

1209: Close cur_forecast_items;
1210: END LOOP;
1211:
1212: /*After "deleting" or "deleting and inserting" a set of records the transaction is commited. This also creates a record in the Pa_Purge_Project_details, which will show the no. of records that are purged from each table.
1213: The procedure is called once for pa_forecast_items and once for pa_forecast_item_details */
1214:
1215: pa_purge.CommitProcess(p_purge_batch_id,
1216: p_project_id,
1217: 'PA_FORECAST_ITEMS',

Line 1217: 'PA_FORECAST_ITEMS',

1213: The procedure is called once for pa_forecast_items and once for pa_forecast_item_details */
1214:
1215: pa_purge.CommitProcess(p_purge_batch_id,
1216: p_project_id,
1217: 'PA_FORECAST_ITEMS',
1218: l_nos_fi_inserted,
1219: l_nos_fi_deleted,
1220: x_err_code,
1221: x_err_stack,

Line 1264: end pa_forecast_items_purge;

1260:
1261: RAISE PA_PROJECT_UTILS2.PA_Arch_Pur_Subroutine_Error ;
1262:
1263:
1264: end pa_forecast_items_purge;
1265:
1266:
1267: -- Start of comments
1268: -- API name : PA_SCHEDULES_PURGE

Line 1286: l_assignment_id pa_forecast_items.assignment_id%TYPE;

1282:
1283: l_schedule_id pa_schedules.schedule_id%TYPE;
1284: l_schedule_exception_id pa_schedule_except_history.schedule_exception_id%TYPE;
1285: I PLS_INTEGER;
1286: l_assignment_id pa_forecast_items.assignment_id%TYPE;
1287: l_nos_schedule_inserted NUMBER ;
1288: l_nos_schedule_his_inserted NUMBER ;
1289: l_nos_schedule_exp_inserted NUMBER ;
1290: l_nos_schedule_deleted NUMBER ;

Line 1485: /*To keep the count of no os records deleted from pa_forecast_items and pa_forecast_item_details, manipulate the

1481: l_nos_schedule_his_inserted := l_nos_schedule_his_inserted + SQL%ROWCOUNT;
1482:
1483: END IF;
1484:
1485: /*To keep the count of no os records deleted from pa_forecast_items and pa_forecast_item_details, manipulate the
1486: count of l_nos_of fi_deleted and l_nos_fis_deleted. */
1487:
1488: pa_debug.debug('Deleting Records from pa_schedule_history table ') ;
1489: x_err_stage := 'Deleting Records from pa_schedules_history table for id '||to_char(l_schedule_id) ;

Line 1691: l_assignment_id pa_forecast_items.assignment_id%TYPE;

1687:
1688:
1689: l_candidate_id pa_candidates.candidate_id%TYPE;
1690: I PLS_INTEGER;
1691: l_assignment_id pa_forecast_items.assignment_id%TYPE;
1692: l_nos_candidate_inserted NUMBER ;
1693: l_nos_candidate_rev_inserted NUMBER ;
1694: l_nos_candidate_deleted NUMBER ;
1695: l_nos_candidate_rev_deleted NUMBER ;

Line 1997: l_assignment_id pa_forecast_items.assignment_id%TYPE;

1993: x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
1994: x_err_stage in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
1995: x_err_code in OUT NOCOPY NUMBER ) IS --File.Sql.39 bug 4440895
1996:
1997: l_assignment_id pa_forecast_items.assignment_id%TYPE;
1998: l_nos_conflicts_inserted NUMBER ;
1999: l_nos_conflicts_deleted NUMBER ;
2000:
2001: ----------------------------------------------------------------------------------

Line 2199: l_assignment_id pa_forecast_items.assignment_id%TYPE;

2195: x_err_stage in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
2196: x_err_code in OUT NOCOPY NUMBER ) IS --File.Sql.39 bug 4440895
2197:
2198:
2199: l_assignment_id pa_forecast_items.assignment_id%TYPE;
2200: l_nos_assignments_inserted NUMBER ;
2201: l_nos_assignments_his_inserted NUMBER ;
2202: l_nos_assignments_deleted NUMBER ;
2203: l_nos_assignments_his_deleted NUMBER ;

Line 2769: l_assignment_id pa_forecast_items.assignment_id%TYPE;

2765: x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
2766: x_err_stage in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
2767: x_err_code in OUT NOCOPY NUMBER ) IS --File.Sql.39 bug 4440895
2768:
2769: l_assignment_id pa_forecast_items.assignment_id%TYPE;
2770: l_nos_parties_inserted NUMBER ;
2771: l_nos_parties_deleted NUMBER ;
2772: l_old_err_stack VARCHAR2(2000); -- Added for bug 4227589
2773:

Line 2910: l_assignment_id pa_forecast_items.assignment_id%TYPE;

2906: x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
2907: x_err_stage in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
2908: x_err_code in OUT NOCOPY NUMBER ) IS --File.Sql.39 bug 4440895
2909:
2910: l_assignment_id pa_forecast_items.assignment_id%TYPE;
2911: l_action_set_id pa_action_sets.action_set_id%TYPE;
2912: l_nos_action_sets_inserted NUMBER;
2913: l_nos_set_lines_inserted NUMBER;
2914: l_nos_lines_cond_inserted NUMBER;