83: p_number_of_days number;
84:
85: CURSOR getLastRunDate is
86: SELECT program_ref_date
87: FROM asp_program_run_dates
88: WHERE program_object_code = 'ASPEXPSC' --'SERVICE_CONTRACT'
89: and status_code = 'S'
90: and rownum < 2;
91:
209: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After opening getServiceContractsFreshRun');
210: end if;
211:
212: --program_ref_date = current_run_ref_date of this run + X of this run
213: delete asp_program_run_dates where PROGRAM_OBJECT_CODE = 'ASPEXPSC';
214: insert into asp_program_run_dates(
215: PROGRAM_RUN_ID,
216: PROGRAM_OBJECT_CODE,
217: STATUS_CODE,
210: end if;
211:
212: --program_ref_date = current_run_ref_date of this run + X of this run
213: delete asp_program_run_dates where PROGRAM_OBJECT_CODE = 'ASPEXPSC';
214: insert into asp_program_run_dates(
215: PROGRAM_RUN_ID,
216: PROGRAM_OBJECT_CODE,
217: STATUS_CODE,
218: DESCRIPTION,
230: LAST_UPDATE_DATE,
231: LAST_UPDATED_BY,
232: LAST_UPDATE_LOGIN
233: )values(
234: asp_program_run_dates_s.nextval,
235: 'ASPEXPSC', --'SERVICE_CONTRACT'
236: 'S',
237: null,
238: l_PROGRAM_START_DATE,
310: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After opening getServiceContractsDeltaRun');
311: end if;
312:
313: --program_ref_date = current_run_ref_date of this run + X of this run
314: update asp_program_run_dates
315: set program_ref_date = (l_current_run_ref_date + p_number_of_days)
316: where program_object_code = 'ASPEXPSC' --'SERVICE_CONTRACT'
317: and status_code = 'S';
318: commit;