[Home] [Help]
1948: end if;
1949:
1950:
1951: l_stat_num := 80;
1952: INSERT INTO WIP_OPERATION_RESOURCES
1953: (WIP_ENTITY_ID,
1954: OPERATION_SEQ_NUM,
1955: RESOURCE_SEQ_NUM,
1956: ORGANIZATION_ID,
2006: AND ORS.RESOURCE_ID = RSC.RESOURCE_ID
2007: AND RSC.ORGANIZATION_ID = OPS.ORGANIZATION_ID
2008: AND ORS.OPERATION_SEQUENCE_ID = p_seq_id
2009: AND OPS.OPERATION_SEQ_NUM NOT IN (select WOR.OPERATION_SEQ_NUM
2010: from Wip_operation_resources WOR
2011: where WOR.wip_entity_id = p_wip_entity_id);
2012:
2013: if lbji_debug = 'Y' then
2014: fnd_file.put_line(fnd_file.log, 'Inserted '||SQL%ROWCOUNT||' rows into wor');
2166: FROM WSM_SM_RESULTING_JOBS
2167: WHERE ORGANIZATION_ID = p_organization_id
2168: AND WIP_ENTITY_ID = p_wip_entity_id)
2169: OR EXISTS (SELECT 'X'
2170: FROM WIP_OPERATION_RESOURCES
2171: WHERE ORGANIZATION_ID = p_organization_id
2172: AND WIP_ENTITY_ID = p_wip_entity_id
2173: AND APPLIED_RESOURCE_UNITS <> 0)
2174: /* for bug fix 16327585 */
2222: FROM WSM_SM_RESULTING_JOBS
2223: WHERE ORGANIZATION_ID = p_organization_id
2224: AND WIP_ENTITY_ID = p_wip_entity_id)
2225: OR EXISTS (SELECT 'X'
2226: FROM WIP_OPERATION_RESOURCES
2227: WHERE ORGANIZATION_ID = p_organization_id
2228: AND WIP_ENTITY_ID = p_wip_entity_id
2229: AND APPLIED_RESOURCE_UNITS <> 0));
2230: BEGIN
5590: end if;
5591:
5592: l_stmt_num := 700.2;
5593: delete from wip_operations where wip_entity_id = v_wlji_wip_entity_id(v_index);
5594: delete from wip_operation_resources where wip_entity_id = v_wlji_wip_entity_id(v_index);
5595: delete from wip_requirement_operations where wip_entity_id = v_wlji_wip_entity_id(v_index);
5596: delete from wip_operation_yields where wip_entity_id = v_wlji_wip_entity_id(v_index);
5597:
5598: l_stmt_num := 700.3;
6081: delete from wip_operations
6082: where wip_entity_id = v_wlji_wip_entity_id(v_index);
6083: delete from wip_operation_yields
6084: where wip_entity_id = v_wlji_wip_entity_id(v_index);
6085: delete from wip_operation_resources
6086: where wip_entity_id = v_wlji_wip_entity_id(v_index);
6087: delete from wip_requirement_operations
6088: where wip_entity_id = v_wlji_wip_entity_id(v_index);
6089: exception
6903: fnd_file.put_line(fnd_file.log, 'Updated '||SQL%ROWCOUNT||' rows into wo');
6904: end if;
6905:
6906: l_stmt_num := 1063;
6907: UPDATE WIP_OPERATION_RESOURCES
6908: SET START_DATE = decode(l_txnexist,
6909: 0, NVL(v_wlji_fusd(v_index), START_DATE), -- bug 3394520
6910: START_DATE),
6911: COMPLETION_DATE = decode(l_txnexist,