499: --check if workorder is pm suggested workorder or not
500: BEGIN
501: SELECT wdj.pm_schedule_id,ewod.cycle_id,ewod.seq_id
502: INTO l_pm_schedule_id,l_cycle_id,l_seq_id
503: FROM WIP_DISCRETE_JOBS wdj,EAM_WORK_ORDER_DETAILS ewod
504: WHERE wdj.wip_entity_id = p_wip_entity_id and
505: ewod.wip_entity_id = wdj.wip_entity_id ;
506:
507: if ( l_pm_schedule_id is not null) then
618: --check if workorder is pm suggested workorder or not
619: BEGIN
620: SELECT wdj.pm_schedule_id,ewod.cycle_id,ewod.seq_id
621: INTO l_pm_schedule_id,l_cycle_id,l_seq_id
622: FROM WIP_DISCRETE_JOBS wdj,EAM_WORK_ORDER_DETAILS ewod
623: WHERE wdj.wip_entity_id = p_wip_entity_id and
624: ewod.wip_entity_id = wdj.wip_entity_id ;
625:
626: if(l_pm_schedule_id is not null) then
777: p_end_date, --added for bug #4096193
778: wdj.wip_entity_id,
779: ewod.pm_suggested_start_date,
780: ewod.pm_suggested_end_date
781: from wip_discrete_jobs wdj, eam_work_order_details ewod
782: where wdj.wip_entity_id=p_wip_entity_id
783: and wdj.wip_entity_id = ewod.wip_entity_id)
784: where meaa.activity_association_id = p_activity_assoc_id
785: and (( decode(l_schedule_option,3,last_scheduled_start_date,