450: from wip_operations
451: where wip_entity_id = i_wip_entity_id;
452:
453: if (l_wo_start_date is not null and l_wo_completion_date is not null) then
454: update wip_discrete_jobs set
455: scheduled_start_date = l_wo_start_date,
456: scheduled_completion_date = l_wo_completion_date
457: where wip_entity_id = i_wip_entity_id;
458: end if;
503: into l_wo_start_date, l_wo_completion_date
504: from wip_operations
505: where wip_entity_id = i_wip_entity_id;
506:
507: update wip_discrete_jobs set
508: scheduled_start_date = l_wo_start_date,
509: scheduled_completion_date = l_wo_completion_date
510: where wip_entity_id = i_wip_entity_id;
511: EXCEPTION
1000:
1001: -- bug fix 2675869: removed 'distinct' from following query and added additonal ROWNUM<=1
1002: SELECT '1'
1003: into charges_exist_1
1004: FROM WIP_DISCRETE_JOBS DJ, WIP_PERIOD_BALANCES WPB
1005: WHERE DJ.WIP_ENTITY_ID = WPB.WIP_ENTITY_ID
1006: AND DJ.ORGANIZATION_ID = WPB.ORGANIZATION_ID
1007: AND DJ.WIP_ENTITY_ID = x_wip_id
1008: AND DJ.ORGANIZATION_ID = x_org_id
1294: begin
1295: -- bug fix 2675869: removed 'distinct' from following query and added additonal ROWNUM<=1
1296: SELECT '1'
1297: into charges_exist_1
1298: FROM WIP_DISCRETE_JOBS DJ, WIP_PERIOD_BALANCES WPB
1299: WHERE DJ.WIP_ENTITY_ID = WPB.WIP_ENTITY_ID
1300: AND DJ.ORGANIZATION_ID = WPB.ORGANIZATION_ID
1301: AND DJ.WIP_ENTITY_ID = x_wip_id
1302: AND DJ.ORGANIZATION_ID = x_org_id
1941:
1942: -- Initialize API return status to success
1943: x_return_status := FND_API.G_RET_STS_SUCCESS;
1944:
1945: UPDATE WIP_DISCRETE_JOBS
1946: SET estimation_status = 2
1947: WHERE wip_entity_id = p_wip_entity_id
1948: AND organization_id = p_organization_id;
1949:
1978:
1979:
1980: SELECT wdj.maintenance_object_id
1981: bulk collect into l_maint_objid_tbl
1982: FROM WIP_DISCRETE_JOBS wdj
1983: WHERE wdj.parent_wip_entity_id = p_wip_entity_id
1984: AND wdj.organization_id = p_organization_id
1985: AND wdj.manual_rebuild_flag = 'N'
1986: AND wdj.maintenance_object_type = 3;