DBA Data[Home] [Help]

APPS.EAM_PMDEF_PUB dependencies on EAM_PM_SCHEDULINGS

Line 161: from eam_pm_schedulings

157: Last_reviewed_by ,
158: /* ---PM reviewer--- end---- */
159: generate_next_work_order
160: into pm_header_row
161: from eam_pm_schedulings
162: where pm_schedule_id=p_pm_schedule_id;
163: exception
164: when no_data_found then
165: FND_MESSAGE.SET_NAME ('EAM', 'EAM_MT_SUPPLY_PARAMS');

Line 170: select eam_pm_schedulings_s.nextval into l_pm_schedule_id from dual;

166: FND_MSG_PUB.Add;
167: RAISE FND_API.G_EXC_ERROR;
168: end;
169:
170: select eam_pm_schedulings_s.nextval into l_pm_schedule_id from dual;
171:
172: -- If the source pm is not a template, raise error
173: if (not (pm_header_row.tmpl_flag = 'Y')) then
174: FND_MESSAGE.SET_NAME('EAM', 'EAM_PM_INST_NOT_TMPL');

Line 210: insert into eam_pm_schedulings (

206:
207:
208: if (l_validated) then
209:
210: insert into eam_pm_schedulings (
211: PM_SCHEDULE_ID,
212: ACTIVITY_ASSOCIATION_ID,
213: NON_SCHEDULED_FLAG,
214: FROM_EFFECTIVE_DATE,

Line 460: select EAM_LAST_CYCLIC_ACT into l_last_act from eam_pm_schedulings

456: (select initial_reading from CSI_COUNTERS_B where counter_id = a_pm_rule.meter_id
457: union
458: select initial_reading from CSI_COUNTER_TEMPLATE_B where counter_id = a_pm_rule.meter_id
459: );
460: select EAM_LAST_CYCLIC_ACT into l_last_act from eam_pm_schedulings
461: where pm_schedule_id = l_pm_schedule_id;
462:
463: -- for bug 7230256
464: l_count := 0;

Line 584: from eam_pm_schedulings eps, mtl_eam_asset_activities meaa, eam_pm_set_names epsn

580: -- of l_activity_assoc_id, that have auto_instantiation_flag as "Y"
581:
582: cursor pm_template_csr_old IS
583: select pm_schedule_id
584: from eam_pm_schedulings eps, mtl_eam_asset_activities meaa, eam_pm_set_names epsn
585: where eps.activity_association_id=meaa.source_tmpl_id
586: and meaa.activity_association_id=l_activity_assoc_id
587: and eps.tmpl_flag='Y'
588: and eps.auto_instantiation_flag='Y'

Line 594: from eam_pm_schedulings eps, eam_pm_activities epa,mtl_eam_asset_activities meaa, eam_pm_set_names epsn

590: and (epsn.end_date is null or (epsn.end_date > sysdate and epsn.end_date > nvl(eps.to_effective_date, sysdate)));
591:
592: cursor pm_template_csr IS
593: select distinct eps.pm_schedule_id
594: from eam_pm_schedulings eps, eam_pm_activities epa,mtl_eam_asset_activities meaa, eam_pm_set_names epsn
595: where eps.pm_schedule_id=epa.pm_schedule_id
596: and epa.activity_association_id=meaa.source_tmpl_id
597: and meaa.activity_association_id=l_activity_assoc_id
598: and eps.tmpl_flag='Y'

Line 853: select eam_pm_schedulings_s.nextval into l_pm_schedule_id from dual;

849: FND_MSG_PUB.Add;
850: RAISE FND_API.G_EXC_ERROR;
851: END IF;
852:
853: select eam_pm_schedulings_s.nextval into l_pm_schedule_id from dual;
854:
855:
856: insert into eam_pm_schedulings (
857: PM_SCHEDULE_ID,

Line 856: insert into eam_pm_schedulings (

852:
853: select eam_pm_schedulings_s.nextval into l_pm_schedule_id from dual;
854:
855:
856: insert into eam_pm_schedulings (
857: PM_SCHEDULE_ID,
858: ACTIVITY_ASSOCIATION_ID,
859: NON_SCHEDULED_FLAG,
860: FROM_EFFECTIVE_DATE,

Line 1317: update eam_pm_schedulings set

1313: l_act_names
1314: );
1315: if (l_validated and l_validated_act) then
1316:
1317: update eam_pm_schedulings set
1318: ACTIVITY_ASSOCIATION_ID=p_pm_schedule_rec.ACTIVITY_ASSOCIATION_ID,
1319: NON_SCHEDULED_FLAG=p_pm_schedule_rec.NON_SCHEDULED_FLAG,
1320: FROM_EFFECTIVE_DATE=p_pm_schedule_rec.FROM_EFFECTIVE_DATE,
1321: TO_EFFECTIVE_DATE=p_pm_schedule_rec.TO_EFFECTIVE_DATE,

Line 1655: FROM eam_pm_schedulings

1651: -- header validation: PM Name must be unique
1652: /* Bug # 3890075 : Modified the logic so that the query is executed only once. */
1653: BEGIN
1654: SELECT pm_schedule_id into l_pm_schedule_id
1655: FROM eam_pm_schedulings
1656: WHERE name=p_pm_schedule_rec.name
1657: AND tmpl_flag=p_pm_schedule_rec.tmpl_flag;
1658:
1659: if (p_pm_schedule_rec.pm_schedule_id is null) then

Line 2536: eam_pm_schedulings eps,eam_pm_activities epa

2532: /* Bug # 3890075 : Modified the logic so that the query is executed only once. */
2533: BEGIN
2534:
2535: select eps.pm_schedule_id into l_pm_schedule_id from
2536: eam_pm_schedulings eps,eam_pm_activities epa
2537: where eps.pm_schedule_id=epa.pm_schedule_id
2538: and epa.activity_association_id=p_pm_activity_grp_rec.activity_association_id
2539: and eps.set_name_id=p_pm_schedule_rec.set_name_id
2540: and eps.tmpl_flag=p_pm_schedule_rec.tmpl_flag;

Line 2571: eam_pm_schedulings eps,eam_pm_activities epa

2567: /* Bug # 3890075 : Modified the logic so that the query is executed only once. */
2568: BEGIN
2569:
2570: select eps.pm_schedule_id into l_pm_schedule_id from
2571: eam_pm_schedulings eps,eam_pm_activities epa
2572: where eps.pm_schedule_id=epa.pm_schedule_id
2573: and epa.activity_association_id=p_pm_activity_grp_rec.activity_association_id
2574: and eps.default_implement = 'Y'
2575: and eps.tmpl_flag=p_pm_schedule_rec.tmpl_flag;

Line 2665: eam_pm_schedulings eps,eam_pm_activities epa

2661: /* Bug # 3890075 : Modified the logic so that the query is executed only once. */
2662: BEGIN
2663:
2664: select eps.pm_schedule_id into l_pm_schedule_id from
2665: eam_pm_schedulings eps,eam_pm_activities epa
2666: where eps.pm_schedule_id=epa.pm_schedule_id
2667: and epa.activity_association_id=p_pm_activity_grp_rec.activity_association_id
2668: and eps.set_name_id=p_pm_schedule_rec.set_name_id
2669: and eps.tmpl_flag=p_pm_schedule_rec.tmpl_flag;

Line 2700: eam_pm_schedulings eps,eam_pm_activities epa

2696: /* Bug # 3890075 : Modified the logic so that the query is executed only once. */
2697: BEGIN
2698:
2699: select eps.pm_schedule_id into l_pm_schedule_id from
2700: eam_pm_schedulings eps,eam_pm_activities epa
2701: where eps.pm_schedule_id=epa.pm_schedule_id
2702: and epa.activity_association_id=p_pm_activity_grp_rec.activity_association_id
2703: and eps.default_implement = 'Y'
2704: and eps.tmpl_flag=p_pm_schedule_rec.tmpl_flag;

Line 2932: from eam_pm_schedulings

2928:
2929: --getting the scheduling option for the pm schedule
2930:
2931: select rescheduling_point,current_seq into l_rescheduling_point,l_current_seq
2932: from eam_pm_schedulings
2933: where pm_schedule_id = p_pm_schedule_id;
2934:
2935: --mandatory checking for rescheduling and current interval values
2936: if (l_rescheduling_point is null) then

Line 2957: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

2953:
2954: if (l_rescheduling_point in (1,5,6)) then
2955:
2956: select max(meaa.last_service_start_date) into l_last_service_date
2957: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
2958: where epa.activity_association_id=meaa.activity_association_id and
2959: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id and
2960: ((epa.ALLOW_REPEAT_IN_CYCLE='N' and epa.interval_multiple=eps.current_seq) or
2961: (epa.ALLOW_REPEAT_IN_CYCLE='Y' and mod(eps.current_seq, epa.interval_multiple)=0));

Line 2966: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

2962:
2963: elsif (l_rescheduling_point = 2) then
2964:
2965: select max(meaa.last_service_end_date) into l_last_service_date
2966: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
2967: where epa.activity_association_id=meaa.activity_association_id and
2968: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id and
2969: ((epa.ALLOW_REPEAT_IN_CYCLE='N' and epa.interval_multiple=eps.current_seq) or
2970: (epa.ALLOW_REPEAT_IN_CYCLE='Y' and mod(eps.current_seq, epa.interval_multiple)=0));

Line 2975: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

2971:
2972: elsif (l_rescheduling_point = 3) then
2973:
2974: select max(meaa.last_scheduled_start_date) into l_last_service_date
2975: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
2976: where epa.activity_association_id=meaa.activity_association_id and
2977: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id and
2978: ((epa.ALLOW_REPEAT_IN_CYCLE='N' and epa.interval_multiple=eps.current_seq) or
2979: (epa.ALLOW_REPEAT_IN_CYCLE='Y' and mod(eps.current_seq, epa.interval_multiple)=0));

Line 2984: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

2980:
2981: elsif (l_rescheduling_point = 4) then
2982:
2983: select max(meaa.last_scheduled_end_date) into l_last_service_date
2984: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
2985: where epa.activity_association_id=meaa.activity_association_id and
2986: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id and
2987: ((epa.ALLOW_REPEAT_IN_CYCLE='N' and epa.interval_multiple=eps.current_seq) or
2988: (epa.ALLOW_REPEAT_IN_CYCLE='Y' and mod(eps.current_seq, epa.interval_multiple)=0));

Line 2998: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

2994:
2995: if (l_rescheduling_point in (1,5,6)) then
2996:
2997: select max(meaa.last_service_start_date) into l_last_service_date
2998: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
2999: where epa.activity_association_id=meaa.activity_association_id and
3000: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id;
3001:
3002: elsif (l_rescheduling_point = 2) then

Line 3005: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

3001:
3002: elsif (l_rescheduling_point = 2) then
3003:
3004: select max(meaa.last_service_end_date) into l_last_service_date
3005: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
3006: where epa.activity_association_id=meaa.activity_association_id and
3007: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id;
3008:
3009: elsif (l_rescheduling_point = 3) then

Line 3012: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

3008:
3009: elsif (l_rescheduling_point = 3) then
3010:
3011: select max(meaa.last_scheduled_start_date) into l_last_service_date
3012: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
3013: where epa.activity_association_id=meaa.activity_association_id and
3014: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id;
3015:
3016: elsif (l_rescheduling_point = 4) then

Line 3019: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps

3015:
3016: elsif (l_rescheduling_point = 4) then
3017:
3018: select max(meaa.last_scheduled_end_date) into l_last_service_date
3019: from mtl_eam_asset_activities meaa, eam_pm_activities epa, eam_pm_schedulings eps
3020: where epa.activity_association_id=meaa.activity_association_id and
3021: epa.pm_schedule_id=eps.pm_schedule_id and eps.pm_schedule_id=p_pm_schedule_id;
3022:
3023: end if;

Line 3115: update eam_pm_schedulings set EAM_LAST_CYCLIC_ACT = l_act_assoc_id,

3111: end if;
3112:
3113: -- updating the eam_last_cyclic_act field
3114:
3115: update eam_pm_schedulings set EAM_LAST_CYCLIC_ACT = l_act_assoc_id,
3116: last_update_date=sysdate,
3117: last_updated_by=fnd_global.user_id,
3118: creation_date=sysdate,
3119: last_update_login=fnd_global.login_id,