DBA Data[Home] [Help]

APPS.AHL_PRD_WORKORDER_PVT dependencies on WIP_DISCRETE_JOBS

Line 203: FROM WIP_DISCRETE_JOBS

199: -- MANESING::Bug 13998940, 26-Apr-2012, added following cursor
200: -- Cursor to fetch instance id for the given work order
201: CURSOR get_instance_id_csr (c_wip_entity_id NUMBER) IS
202: SELECT maintenance_object_id
203: FROM WIP_DISCRETE_JOBS
204: WHERE wip_entity_id = c_wip_entity_id;
205:
206: -- added for bug# 8311856
207: -- In the case the Visit does not have a unit, it is always not guaranteed that the

Line 780: WIP_DISCRETE_JOBS

776: SELECT
777: TO_CHAR(scheduled_start_date, 'ss') schedule_start_sec,
778: TO_CHAR(scheduled_completion_date, 'ss') schedule_end_sec
779: FROM
780: WIP_DISCRETE_JOBS
781: WHERE
782: WIP_ENTITY_ID = c_wip_entity_id;
783:
784: -- Balaji added for Release NR error

Line 1022: WIP_DISCRETE_JOBS WIP

1018: WIP.SCHEDULED_START_DATE,
1019: WIP.SCHEDULED_COMPLETION_DATE,
1020: WIP.OWNING_DEPARTMENT
1021: FROM AHL_WORKORDERS AWOS,
1022: WIP_DISCRETE_JOBS WIP
1023: WHERE AWOS.WIP_ENTITY_ID = WIP.WIP_ENTITY_ID
1024: AND AWOS.workorder_id = c_workorder_id;
1025:
1026: l_old_workorder_rec get_old_wo_values%ROWTYPE;

Line 1137: FROM WIP_DISCRETE_JOBS WDJ,

1133: CURSOR get_visit_wo_dates(c_visit_id NUMBER)
1134: IS
1135: SELECT WDJ.scheduled_start_date,
1136: WDJ.scheduled_completion_date
1137: FROM WIP_DISCRETE_JOBS WDJ,
1138: AHL_WORKORDERS WO
1139: WHERE WDJ.wip_entity_id = WO.wip_entity_id
1140: AND WO.visit_task_id IS NULL
1141: AND WO.master_workorder_flag = 'Y'

Line 4422: WIP_DISCRETE_JOBS wipj

4418: WO.actual_start_date,
4419: WO.actual_end_date
4420: FROM AHL_WORKORDERS WO,
4421: WIP_SCHED_RELATIONSHIPS WOR,
4422: WIP_DISCRETE_JOBS wipj
4423: WHERE
4424: WIPJ.wip_entity_id = WO.wip_entity_id
4425: AND WO.wip_entity_id = WOR.parent_object_id
4426: AND WO.master_workorder_flag = 'Y'

Line 4441: FROM WIP_DISCRETE_JOBS WDJ,

4437: WDJ.scheduled_completion_date scheduled_end_date,
4438: WO.actual_start_date actual_start_date,
4439: WO.actual_end_date actual_end_date,
4440: WO.status_code status_code
4441: FROM WIP_DISCRETE_JOBS WDJ,
4442: AHL_WORKORDERS WO
4443: WHERE WDJ.wip_entity_id = WO.wip_entity_id
4444: AND WO.status_code <> G_JOB_STATUS_DELETED
4445: AND WO.wip_entity_id in

Line 4519: FROM WIP_DISCRETE_JOBS WDJ,

4515: CURSOR get_visit_wo_dates(c_visit_id NUMBER)
4516: IS
4517: SELECT WDJ.scheduled_start_date,
4518: WDJ.scheduled_completion_date
4519: FROM WIP_DISCRETE_JOBS WDJ,
4520: AHL_WORKORDERS WO
4521: WHERE WDJ.wip_entity_id = WO.wip_entity_id
4522: AND WO.visit_task_id IS NULL
4523: AND WO.master_workorder_flag = 'Y'

Line 4532: WIP_DISCRETE_JOBS WDJ

4528: SELECT
4529: WDJ.scheduled_start_date,
4530: WDJ.scheduled_completion_date
4531: FROM
4532: WIP_DISCRETE_JOBS WDJ
4533: WHERE
4534: WDJ.wip_entity_id = p_wip_entity_id;
4535:
4536: --pekambar Added new cursor to find master workorder flag :: ER # 9410221

Line 4544: WIP_DISCRETE_JOBS WDJ

4540: SELECT
4541: WO.master_workorder_flag
4542: FROM
4543: AHL_WORKORDERS WO,
4544: WIP_DISCRETE_JOBS WDJ
4545: WHERE WDJ.wip_entity_id = WO.wip_entity_id
4546: AND WDJ.wip_entity_id = p_wip_entity_id;
4547:
4548: -- End

Line 4639: ahl_workorders wo, wip_discrete_jobs wdj

4635: IS
4636: SELECT
4637: wo.status_code, wdj.firm_planned_flag
4638: FROM
4639: ahl_workorders wo, wip_discrete_jobs wdj
4640: WHERE
4641: wo.wip_entity_id = wdj.wip_entity_id
4642: and wo.workorder_id = p_workorder_id;
4643:

Line 4678: WIP_DISCRETE_JOBS WDJ,

4674: IS
4675: SELECT
4676: WDJ.firm_planned_flag
4677: FROM
4678: WIP_DISCRETE_JOBS WDJ,
4679: AHL_WORKORDERS AWO
4680: WHERE
4681: AWO.wip_entity_id = WDJ.wip_entity_id AND
4682: AWO.workorder_id = c_workorder_id;

Line 4745: wip_discrete_jobs wdj

4741: FROM AHL_MR_HEADERS_B AMH,
4742: AHL_WORKORDERS AW,
4743: AHL_VISITS_B AV,
4744: AHL_VISIT_TASKS_B AVT,
4745: wip_discrete_jobs wdj
4746: WHERE AW.VISIT_TASK_ID = AVT.VISIT_TASK_ID
4747: AND AV.VISIT_ID = AVT.VISIT_ID
4748: AND AVT.MR_ID = AMH.MR_HEADER_ID (+)
4749: AND AW.MASTER_WORKORDER_FLAG = 'N'

Line 8623: FROM AHL_WORKORDERS AWO, WIP_DISCRETE_JOBS WDJ

8619: -- cursor to check if all workorders in a visit are cancelled.
8620: CURSOR chk_cmplt_wo_exists(c_wip_entity_id NUMBER )
8621: IS
8622: SELECT 'x'
8623: FROM AHL_WORKORDERS AWO, WIP_DISCRETE_JOBS WDJ
8624: WHERE awo.wip_entity_id = wdj.wip_entity_id
8625: AND wdj.date_completed IS NOT NULL
8626: --AND master_workorder_flag = 'N'
8627: --AND status_code NOT IN ('7', '22', '12')

Line 9930: WIP_DISCRETE_JOBS WIP

9926: AWO.STATUS_CODE,
9927: WIP.SCHEDULED_START_DATE,
9928: WIP.SCHEDULED_COMPLETION_DATE
9929: FROM AHL_WORKORDERS AWO,
9930: WIP_DISCRETE_JOBS WIP
9931: WHERE AWO.VISIT_ID=c_visit_id
9932: AND AWO.VISIT_TASK_ID IS NULL
9933: AND AWO.MASTER_WORKORDER_FLAG = 'Y'
9934: AND AWO.WIP_ENTITY_ID = WIP.WIP_ENTITY_ID

Line 9943: FROM wip_discrete_jobs

9939: CURSOR get_latest_schedule_dates(c_wip_entity_id IN NUMBER)
9940: IS
9941: SELECT scheduled_start_date,
9942: scheduled_completion_date
9943: FROM wip_discrete_jobs
9944: WHERE wip_entity_id = c_wip_entity_id;
9945:
9946: latest_schedule_dates_rec get_latest_schedule_dates%ROWTYPE;
9947:

Line 9961: WIP_DISCRETE_JOBS WIP

9957: WIP.SCHEDULED_COMPLETION_DATE SCHEDULED_END_DATE,
9958: level
9959: FROM AHL_WORKORDERS CWO,
9960: WIP_SCHED_RELATIONSHIPS REL,
9961: WIP_DISCRETE_JOBS WIP
9962: WHERE CWO.wip_entity_id = REL.parent_object_id
9963: AND CWO.wip_entity_id = WIP.WIP_ENTITY_ID
9964: AND WIP.firm_planned_flag = '1'
9965: AND CWO.status_code NOT IN ('22','7','4','5','12')

Line 9970: (select wos.wip_entity_id from ahl_workorders wos, WIP_DISCRETE_JOBS WIPS

9966: AND CWO.master_workorder_flag = 'Y'
9967: AND REL.parent_object_type_id = 1
9968: AND REL.child_object_type_id = 1
9969: START WITH REL.child_object_id IN
9970: (select wos.wip_entity_id from ahl_workorders wos, WIP_DISCRETE_JOBS WIPS
9971: where wos.wip_entity_id = wips.wip_entity_id
9972: and wips.date_completed IS NOT NULL
9973: and exists (Select 'X' from WIP_DISCRETE_JOBS WIPSP,WIP_SCHED_RELATIONSHIPS RELP
9974: where RELP.child_object_id = wips.wip_entity_id

Line 9973: and exists (Select 'X' from WIP_DISCRETE_JOBS WIPSP,WIP_SCHED_RELATIONSHIPS RELP

9969: START WITH REL.child_object_id IN
9970: (select wos.wip_entity_id from ahl_workorders wos, WIP_DISCRETE_JOBS WIPS
9971: where wos.wip_entity_id = wips.wip_entity_id
9972: and wips.date_completed IS NOT NULL
9973: and exists (Select 'X' from WIP_DISCRETE_JOBS WIPSP,WIP_SCHED_RELATIONSHIPS RELP
9974: where RELP.child_object_id = wips.wip_entity_id
9975: and RELP.parent_object_id = WIPSP.wip_entity_id
9976: and DECODE(c_offset_direction, 1,WIPSP.scheduled_start_date+c_offset,WIPS.scheduled_completion_date + c_offset)
9977: > DECODE(c_offset_direction, 1,WIPS.scheduled_start_date ,WIPSP.scheduled_completion_date))

Line 10000: wip_discrete_jobs wip

9996: WHERE cwo.visit_id = c_visit_id
9997: and cwo.status_code NOT IN ('22', '7', '4', '5', '12')
9998: AND cwo.master_workorder_flag = 'Y') cwo,
9999: wip_sched_relationships rel,
10000: wip_discrete_jobs wip
10001: WHERE cwo.wip_entity_id = rel.parent_object_id
10002: AND cwo.wip_entity_id = wip.wip_entity_id
10003: AND wip.firm_planned_flag = '1'
10004: AND rel.parent_object_type_id = 1

Line 10008: FROM wip_discrete_jobs wips, wip_discrete_jobs wipsp,

10004: AND rel.parent_object_type_id = 1
10005: AND rel.child_object_type_id = 1
10006: START WITH rel.child_object_id IN (
10007: SELECT distinct wos.wip_entity_id
10008: FROM wip_discrete_jobs wips, wip_discrete_jobs wipsp,
10009: wip_sched_relationships relp, ahl_workorders wos
10010: WHERE wos.visit_id = c_visit_id
10011: AND wos.wip_entity_id = wips.wip_entity_id
10012: AND wips.date_completed IS NOT NULL

Line 10037: WIP_DISCRETE_JOBS WIP

10033: WIP.SCHEDULED_START_DATE,
10034: WIP.SCHEDULED_COMPLETION_DATE
10035: FROM AHL_WORKORDERS CWO,
10036: WIP_SCHED_RELATIONSHIPS REL,
10037: WIP_DISCRETE_JOBS WIP
10038: WHERE CWO.wip_entity_id = REL.parent_object_id
10039: AND CWO.wip_entity_id = WIP.WIP_ENTITY_ID
10040: AND WIP.firm_planned_flag = '1'
10041: AND CWO.status_code NOT IN ('22','7','4','5','12')

Line 10046: (select wos.wip_entity_id from ahl_workorders wos, WIP_DISCRETE_JOBS WIPS

10042: AND CWO.master_workorder_flag = 'Y'
10043: AND REL.parent_object_type_id = 1
10044: AND REL.child_object_type_id = 1
10045: START WITH REL.child_object_id IN
10046: (select wos.wip_entity_id from ahl_workorders wos, WIP_DISCRETE_JOBS WIPS
10047: where wos.wip_entity_id = wips.wip_entity_id
10048: and wips.date_completed IS NOT NULL
10049: and wos.visit_id = c_visit_id)
10050: AND REL.relationship_type = 1

Line 10060: FROM wip_discrete_jobs wips, ahl_workorders wos

10056: CURSOR get_minmax_comp_schedule_dates(c_visit_id IN NUMBER)
10057: IS
10058: SELECT min(scheduled_start_date) max_start_date,
10059: max(scheduled_completion_date) min_end_date
10060: FROM wip_discrete_jobs wips, ahl_workorders wos
10061: WHERE wips.wip_entity_id = wos.wip_entity_id
10062: and wips.date_completed IS NOT NULL
10063: and wos.visit_id = c_visit_id
10064: group by wos.visit_id;

Line 10813: WIP_DISCRETE_JOBS WDJ,

10809: FROM
10810: AHL_WORKORDERS WO,
10811: AHL_VISITS_B VST,
10812: AHL_VISIT_TASKS_B VTS,
10813: WIP_DISCRETE_JOBS WDJ,
10814: CSI_ITEM_INSTANCES CSI
10815: WHERE
10816: WDJ.WIP_ENTITY_ID = WO.WIP_ENTITY_ID
10817: AND WO.VISIT_TASK_ID = VTS.VISIT_TASK_ID

Line 10899: FROM AHL_WORKORDERS WO,WIP_DISCRETE_JOBS WDJ,

10895: WO.visit_task_id,
10896: WO.STATUS_CODE,
10897: WDJ.SCHEDULED_START_DATE SCHEDULED_START_DATE,
10898: WDJ.scheduled_completion_date scheduled_end_date
10899: FROM AHL_WORKORDERS WO,WIP_DISCRETE_JOBS WDJ,
10900: WIP_SCHED_RELATIONSHIPS WOR
10901: WHERE WO.WIP_ENTITY_ID = WOR.PARENT_OBJECT_ID
10902: AND WDJ.wip_entity_id = WO.wip_entity_id
10903: AND WO.master_workorder_flag = 'Y'

Line 10921: FROM WIP_DISCRETE_JOBS WDJ,

10917: WDJ.scheduled_completion_date scheduled_end_date,
10918: WO.actual_start_date actual_start_date,
10919: WO.actual_end_date actual_end_date,
10920: WO.status_code status_code
10921: FROM WIP_DISCRETE_JOBS WDJ,
10922: AHL_WORKORDERS WO
10923: WHERE WDJ.wip_entity_id = WO.wip_entity_id
10924: AND WO.status_code <> '22'
10925: AND WO.wip_entity_id in

Line 11353: WIP_DISCRETE_JOBS WDJ

11349: --sukhwsin::VEE Changes- included workorder_id
11350: WO.workorder_id
11351: FROM AHL_WORKORDERS WO,
11352: WIP_SCHED_RELATIONSHIPS WOR,
11353: WIP_DISCRETE_JOBS WDJ
11354: WHERE WO.wip_entity_id = WOR.parent_object_id
11355: AND WDJ.wip_entity_id = WO.wip_entity_id
11356: AND WO.master_workorder_flag = 'Y'
11357: AND WO.status_code = G_JOB_STATUS_CLOSED

Line 11499: UPDATE wip_discrete_jobs

11495: FOR mwo_rec in get_closed_mwo_csr(l_wip_entity_id)
11496: LOOP
11497: IF(WIP_CLOSE_UTILITIES.Unclose_Job(mwo_rec.wip_entity_id,mwo_rec.organization_id,mwo_rec.class_code) = 1) THEN
11498:
11499: UPDATE wip_discrete_jobs
11500: SET date_closed = NULL,
11501: status_type = G_JOB_STATUS_COMPLETE
11502: WHERE organization_id = mwo_rec.organization_id
11503: AND WIP_ENTITY_ID = mwo_rec.wip_entity_id;

Line 11534: UPDATE wip_discrete_jobs

11530: END LOOP;
11531:
11532: -- After Unclosing all the MWO to Status Complete
11533:
11534: UPDATE wip_discrete_jobs
11535: SET date_closed = NULL,
11536: status_type = G_JOB_STATUS_COMPLETE
11537: WHERE organization_id = l_organization_id
11538: AND WIP_ENTITY_ID = l_wip_entity_id;

Line 11634: WIP_DISCRETE_JOBS WIP

11630: SELECT WIP.WIP_ENTITY_ID,
11631: WIP.SCHEDULED_START_DATE,
11632: WIP.SCHEDULED_COMPLETION_DATE SCHEDULED_END_DATE
11633: FROM AHL_WORKORDERS AWO,
11634: WIP_DISCRETE_JOBS WIP
11635: WHERE AWO.VISIT_ID = p_visit_id
11636: AND AWO.VISIT_TASK_ID IS NULL
11637: AND AWO.MASTER_WORKORDER_FLAG = 'Y'
11638: AND AWO.WIP_ENTITY_ID = WIP.WIP_ENTITY_ID

Line 11655: WIP_DISCRETE_JOBS WIP

11651: WIP.SCHEDULED_COMPLETION_DATE SCHEDULED_END_DATE,
11652: level
11653: FROM AHL_WORKORDERS CWO,
11654: WIP_SCHED_RELATIONSHIPS REL,
11655: WIP_DISCRETE_JOBS WIP
11656: WHERE CWO.wip_entity_id = REL.parent_object_id
11657: AND CWO.wip_entity_id = WIP.WIP_ENTITY_ID
11658: AND CWO.master_workorder_flag = 'Y'
11659: AND REL.parent_object_type_id = 1

Line 12410: WIP_DISCRETE_JOBS WIP

12406:
12407: CURSOR get_wip_date_released( c_wo_id NUMBER ) IS
12408: SELECT WIP.DATE_RELEASED
12409: FROM AHL_WORKORDERS WO,
12410: WIP_DISCRETE_JOBS WIP
12411: WHERE WO.workorder_id = c_wo_id
12412: AND WO.wip_entity_id = WIP.wip_entity_id;
12413:
12414: l_released_date DATE := NULL;

Line 12641: WIP_DISCRETE_JOBS WDJ

12637: WDJ.COMPLETION_SUBINVENTORY COMPLETION_SUBINVENTORY,
12638: WDJ.COMPLETION_LOCATOR_ID COMPLETION_LOCATOR_ID,
12639: WDJ.PRIORITY PRIORITY
12640: FROM AHL_WORKORDERS WO,
12641: WIP_DISCRETE_JOBS WDJ
12642: WHERE WDJ.WIP_ENTITY_ID = WO.WIP_ENTITY_ID
12643: AND WO.STATUS_CODE NOT IN (4, 5, 7, 12, 15, 17, 22)
12644: AND WO.WORKORDER_ID = P_WORKORDER_ID;
12645: