DBA Data[Home] [Help]

APPS.MSC_CL_PURGE_STAGING dependencies on MSC_APPS_INSTANCES

Line 148: FROM msc_apps_instances

144:
145: BEGIN
146:
147: SELECT ST_STATUS INTO lv_staging_table_status
148: FROM msc_apps_instances
149: WHERE INSTANCE_CODE= pINSTANCE_CODE
150: FOR UPDATE;
151:
152: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Entered to check whether purge possible for the instance-'||pINSTANCE_CODE);

Line 214: UPDATE msc_apps_instances

210: RETURN FALSE;
211:
212:
213: ELSE
214: UPDATE msc_apps_instances
215: SET st_status=G_ST_PURGING
216: WHERE INSTANCE_CODE= pINSTANCE_CODE;
217: COMMIT;
218:

Line 255: FROM msc_apps_instances

251: AND LV.LOOKUP_TYPE = 'MSC_X_SETUP_ENTITY_CODE';
252:
253: CURSOR instance_codes ( cp_instance_id NUMBER ) IS
254: SELECT instance_code,instance_type,st_status
255: FROM msc_apps_instances
256: WHERE instance_id=cp_instance_id
257: UNION ALL
258: SELECT instance_code,instance_type,st_status
259: FROM msc_apps_instances

Line 259: FROM msc_apps_instances

255: FROM msc_apps_instances
256: WHERE instance_id=cp_instance_id
257: UNION ALL
258: SELECT instance_code,instance_type,st_status
259: FROM msc_apps_instances
260: WHERE cp_instance_id =-1;
261:
262: -- Cursor P and q are for update to lock the records before checking for the st_status.
263: CURSOR p IS

Line 265: FROM msc_apps_instances

261:
262: -- Cursor P and q are for update to lock the records before checking for the st_status.
263: CURSOR p IS
264: SELECT instance_code
265: FROM msc_apps_instances
266: WHERE st_status NOT IN (G_ST_PULLING,G_ST_COLLECTING,G_ST_PRE_PROCESSING)
267: FOR UPDATE;
268:
269: CURSOR q (cp_instance_id NUMBER ) IS

Line 271: FROM msc_apps_instances

267: FOR UPDATE;
268:
269: CURSOR q (cp_instance_id NUMBER ) IS
270: SELECT instance_code
271: FROM msc_apps_instances
272: WHERE st_status NOT IN (G_ST_PULLING,G_ST_COLLECTING,G_ST_PRE_PROCESSING)
273: AND instance_id=cp_instance_id
274: FOR UPDATE;
275:

Line 333: SELECT count(*) INTO lv_leg_inst_flag FROM msc_apps_instances WHERE instance_type = G_INS_OTHER ;

329: FROM dual;
330:
331:
332: IF (lv_trunc_profile = SYS_YES AND lv_p_del_rej_rec=SYS_NO ) THEN
333: SELECT count(*) INTO lv_leg_inst_flag FROM msc_apps_instances WHERE instance_type = G_INS_OTHER ;
334: SELECT count(*) INTO lv_inst_flag FROM msc_apps_instances;
335:
336: -- locking the records in msc_apps_instances before checking the st_status
337: IF (lv_p_instance_id <> -1) THEN

Line 334: SELECT count(*) INTO lv_inst_flag FROM msc_apps_instances;

330:
331:
332: IF (lv_trunc_profile = SYS_YES AND lv_p_del_rej_rec=SYS_NO ) THEN
333: SELECT count(*) INTO lv_leg_inst_flag FROM msc_apps_instances WHERE instance_type = G_INS_OTHER ;
334: SELECT count(*) INTO lv_inst_flag FROM msc_apps_instances;
335:
336: -- locking the records in msc_apps_instances before checking the st_status
337: IF (lv_p_instance_id <> -1) THEN
338: open q(lv_p_instance_id);

Line 336: -- locking the records in msc_apps_instances before checking the st_status

332: IF (lv_trunc_profile = SYS_YES AND lv_p_del_rej_rec=SYS_NO ) THEN
333: SELECT count(*) INTO lv_leg_inst_flag FROM msc_apps_instances WHERE instance_type = G_INS_OTHER ;
334: SELECT count(*) INTO lv_inst_flag FROM msc_apps_instances;
335:
336: -- locking the records in msc_apps_instances before checking the st_status
337: IF (lv_p_instance_id <> -1) THEN
338: open q(lv_p_instance_id);
339: close q;
340: ELSE

Line 345: SELECT count(*) INTO lv_st_status_flag FROM msc_apps_instances WHERE st_status IN ( G_ST_PULLING,G_ST_COLLECTING,G_ST_PRE_PROCESSING ) AND ((instance_id=lv_p_instance_id) OR (lv_p_instance_id=-1));

341: open p;
342: close p;
343: END IF;
344: -- Counting number of instances for which st_status is G_ST_PULLING , G_ST_COLLECTING and G_ST_PRE_PROCESSING
345: SELECT count(*) INTO lv_st_status_flag FROM msc_apps_instances WHERE st_status IN ( G_ST_PULLING,G_ST_COLLECTING,G_ST_PRE_PROCESSING ) AND ((instance_id=lv_p_instance_id) OR (lv_p_instance_id=-1));
346:
347: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Value of lv_st_status_flag-'||lv_st_status_flag);
348:
349: END IF;

Line 365: UPDATE msc_apps_instances

361:
362: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Truncation flag is YES. Entering in truncation LOOP');
363:
364:
365: UPDATE msc_apps_instances
366: SET st_status= G_ST_PURGING;
367: COMMIT;
368:
369: lv_retval := FND_INSTALLATION.GET_APP_INFO ( 'MSC', lv_dummy1, lv_dummy2, v_applsys_schema);

Line 408: UPDATE msc_apps_instances

404:
405: END LOOP;
406: CLOSE table_names;
407:
408: UPDATE msc_apps_instances
409: SET st_status= G_ST_EMPTY;
410: COMMIT;
411:
412: ELSE

Line 453: UPDATE msc_apps_instances

449:
450: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,' Instance type is LEGACY ,so setting st_status to empty');
451:
452:
453: UPDATE msc_apps_instances
454: SET st_status=G_ST_EMPTY
455: WHERE instance_code=lv_p_instance_code;
456: COMMIT;
457:

Line 463: UPDATE msc_apps_instances

459:
460: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Instance type is ERP ,so setting st_status to previous st_status-'||lv_st_status);
461:
462:
463: UPDATE msc_apps_instances
464: SET st_status=lv_st_status
465: WHERE instance_code=lv_p_instance_code;
466: COMMIT;
467:

Line 1960: FROM msc_apps_instances

1956:
1957: IF p_instance_id IS NOT NULL THEN
1958: SELECT instance_type, lrtype
1959: INTO lv_instance_type, lv_last_refresh_type
1960: FROM msc_apps_instances
1961: WHERE instance_id= p_instance_id;
1962: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'instance_type='||lv_instance_type);
1963: END IF;
1964: lv_pbs := nvl(TO_NUMBER(FND_PROFILE.VALUE('MRP_PURGE_BATCH_SIZE')), 2000);